From 8607772d4f9e21f53c1abfd9379737403b97f430 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 5 Jan 2025 15:25:45 +0100 Subject: Fix a few mistakes in option, and make it trivial when possible --- asl/tests/box_tests.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'asl/tests/box_tests.cpp') diff --git a/asl/tests/box_tests.cpp b/asl/tests/box_tests.cpp index 53b6dda..0395e5f 100644 --- a/asl/tests/box_tests.cpp +++ b/asl/tests/box_tests.cpp @@ -55,6 +55,8 @@ ASL_TEST(arrow) ASL_TEST(niche) { + static_assert(sizeof(asl::box) == sizeof(asl::option>)); + asl::option> opt; ASL_TEST_EXPECT(!opt.has_value()); @@ -66,7 +68,7 @@ ASL_TEST(niche) ASL_TEST_EXPECT(!opt.has_value()); bool destroyed = false; - asl::option> opt2 = asl::make_box(&destroyed); + asl::option opt2 = asl::make_box(&destroyed); ASL_TEST_EXPECT(opt2.has_value()); ASL_TEST_EXPECT(!destroyed); -- cgit