diff --git a/include/flatmemory/details/types/tuple.hpp b/include/flatmemory/details/types/tuple.hpp index 3bf16f4..324d0ba 100644 --- a/include/flatmemory/details/types/tuple.hpp +++ b/include/flatmemory/details/types/tuple.hpp @@ -137,11 +137,11 @@ class Builder> : public IBuilder>> * Constructors */ - // Builder(std::conditional_t, Ts, Builder>&&... args) - // requires(sizeof...(Ts) > 0) - // : m_data(std::forward, Ts, Builder>>(args)...), m_buffer() - //{ - // } + Builder(std::conditional_t, Ts, Builder>&&... args) + requires(sizeof...(Ts) > 0) + : m_data(std::forward, Ts, Builder>>(args)...), m_buffer() + { + } Builder() : m_data(), m_buffer() {} diff --git a/tests/unit/types/tuple.cpp b/tests/unit/types/tuple.cpp index 168eb3c..69b6a3a 100644 --- a/tests/unit/types/tuple.cpp +++ b/tests/unit/types/tuple.cpp @@ -136,23 +136,23 @@ TEST(FlatmemoryTests, TypesTupleEqualToAndHashTest) EXPECT_EQ(const_view1, view3); } -// TEST(FlatmemoryTests, TypesTupleSerializeViewsTest) -//{ -// using BitsetVectorLayout = Vector>; -// -// auto builder1 = Builder(); -// builder1.resize(2); -// builder1[0].set(4); -// builder1[1].set(64); -// builder1.finish(); -// -// using BitsetTupleLayout = Tuple, ConstView>; -// -// auto builder2 = Builder(View(builder1.buffer().data()), ConstView(builder1.buffer().data())); -// builder2.finish(); -// -// EXPECT_EQ(builder2.get<0>(), builder2.get<1>()); -// } +TEST(FlatmemoryTests, TypesTupleSerializeViewsTest) +{ + using BitsetVectorLayout = Vector>; + + auto builder1 = Builder(); + builder1.resize(2); + builder1[0].set(4); + builder1[1].set(64); + builder1.finish(); + + using BitsetTupleLayout = Tuple, ConstView>; + + auto builder2 = Builder(View(builder1.buffer().data()), ConstView(builder1.buffer().data())); + builder2.finish(); + + EXPECT_EQ(builder2.get<0>(), builder2.get<1>()); +} TEST(FlatmemoryTests, TypesTupleViewMutateTest) {