From dfc9dcbb6b592d5639f5e9232bd022b85090a5b1 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 4 May 2026 17:57:20 +0200 Subject: Testing forwarding simplifications --- modules/codec-unit/tests/codec-unit.cpp | 4 ++-- modules/codec/c++/data.hpp | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/codec-unit/tests/codec-unit.cpp b/modules/codec-unit/tests/codec-unit.cpp index 1321316..88277c6 100644 --- a/modules/codec-unit/tests/codec-unit.cpp +++ b/modules/codec-unit/tests/codec-unit.cpp @@ -25,7 +25,7 @@ using FantasySquareMeter = Unit< SAW_TEST("Codec Unit/Addition"){ using namespace saw; - data a{{5}}, b{{4}}; + data a{5}, b{{4}}; auto c = a + b; @@ -45,7 +45,7 @@ SAW_TEST("Codec Unit/Subtraction"){ SAW_TEST("Codec Unit/Multiplication"){ using namespace saw; - data a{{5}}, b{{4}}; + data a{5}, b{4}; auto c = a * b; diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 217a53f..b9924c7 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -326,6 +326,14 @@ public: { } + /* + template + requires (sizeof...(Args) == ct_multiply::value) && + (std::constructible_from, Args> && ...) + constexpr data(Args&&... args): + value_{ { std::forward(args)... } } {} + */ + SAW_DEFAULT_COPY(data); SAW_DEFAULT_MOVE(data); -- cgit v1.2.3