mirror of
https://github.com/boostorg/optional.git
synced 2025-07-29 03:57:20 +02:00
bug fixes
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
using boost::optional;
|
||||
using boost::none;
|
||||
|
||||
#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
class Guard
|
||||
{
|
||||
@ -90,7 +90,7 @@ void test_emplace()
|
||||
|
||||
#endif
|
||||
|
||||
#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
||||
|
||||
|
||||
struct ThrowOnMove
|
||||
@ -120,7 +120,7 @@ struct Thrower
|
||||
|
||||
private:
|
||||
Thrower(Thrower const&);
|
||||
#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
||||
Thrower(Thrower&&);
|
||||
#endif
|
||||
};
|
||||
@ -192,10 +192,10 @@ void test_emplace()
|
||||
|
||||
int main()
|
||||
{
|
||||
#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
test_emplace();
|
||||
#endif
|
||||
#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
||||
test_no_moves_on_emplacement();
|
||||
#endif
|
||||
test_clear_on_throw();
|
||||
|
@ -24,7 +24,7 @@ using boost::none;
|
||||
//#ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT
|
||||
//#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
|
||||
enum State
|
||||
{
|
||||
@ -334,7 +334,7 @@ void test_optional_ref_to_movables()
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
test_move_ctor_from_U();
|
||||
test_move_ctor_form_T();
|
||||
test_move_ctor_from_optional_T();
|
||||
|
@ -20,7 +20,7 @@
|
||||
using boost::optional;
|
||||
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
#ifndef BOOST_NO_CXX11_NOEXCEPT
|
||||
|
||||
// these 4 classes have different noexcept signatures in move operations
|
||||
@ -106,7 +106,7 @@ void test_noexcept_optional_with_operator() // compile-time test
|
||||
}
|
||||
|
||||
#endif // !defned BOOST_NO_CXX11_NOEXCEPT
|
||||
#endif // !defined BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -175,7 +175,7 @@ void test_const_move()
|
||||
}
|
||||
|
||||
|
||||
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
||||
struct MoveOnly
|
||||
{
|
||||
explicit MoveOnly(int){}
|
||||
|
Reference in New Issue
Block a user