diff --git a/test/optional_test_make_optional.cpp b/test/optional_test_make_optional.cpp index 92e2520..c4c8dc8 100644 --- a/test/optional_test_make_optional.cpp +++ b/test/optional_test_make_optional.cpp @@ -24,6 +24,14 @@ using boost::optional; using boost::make_optional; +using boost::core::is_same; + +template +void verify_type(Deduced) +{ + BOOST_TEST_TRAIT_TRUE(( is_same )); +} + #if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) struct MoveOnly { @@ -42,14 +50,6 @@ MoveOnly makeMoveOnly(int i) return MoveOnly(i); } -using boost::core::is_same; - -template -void verify_type(Deduced) -{ - BOOST_TEST_TRAIT_TRUE(( is_same )); -} - void test_make_optional_for_move_only_type() { verify_type< optional >(make_optional(makeMoveOnly(2))); @@ -67,6 +67,8 @@ void test_make_optional_for_move_only_type() BOOST_TEST (!oN); } +#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + void test_make_optional_for_optional() { optional oi; @@ -108,8 +110,6 @@ void test_nested_make_optional() BOOST_TEST (!oo4); } -#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES - int main() { #if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)