diff --git a/src/beman/optional26/tests/optional.t.cpp b/src/beman/optional26/tests/optional.t.cpp index 0191509..93a9337 100644 --- a/src/beman/optional26/tests/optional.t.cpp +++ b/src/beman/optional26/tests/optional.t.cpp @@ -900,11 +900,7 @@ TEST(OptionalTest, HashTest) { } TEST(OptionalTest, CanHoldValueOfImmovableType) { - struct immovable { - explicit immovable() = default; - immovable(const immovable&) = delete; - immovable& operator=(const immovable&) = delete; - }; + using beman::optional26::tests::immovable; beman::optional26::optional o1(beman::optional26::in_place); EXPECT_TRUE(o1); diff --git a/src/beman/optional26/tests/test_types.hpp b/src/beman/optional26/tests/test_types.hpp index 3a566df..6e3e919 100644 --- a/src/beman/optional26/tests/test_types.hpp +++ b/src/beman/optional26/tests/test_types.hpp @@ -65,6 +65,12 @@ class Point { bool operator==(const Point&) const = default; }; +struct immovable { + explicit immovable() = default; + immovable(const immovable&) = delete; + immovable& operator=(const immovable&) = delete; +}; + } // namespace beman::optional26::tests #endif // BEMAN_OPTIONAL26_TESTS_TEST_TYPES_HPP