forked from boostorg/optional
using macro BOOST_NO_CXX11_NOEXCEPT
This commit is contained in:
@ -18,6 +18,7 @@ import testing ;
|
||||
{
|
||||
test-suite optional :
|
||||
[ run optional_test.cpp ]
|
||||
[ run ak_test_vc14_noexcept.cpp ]
|
||||
[ run optional_test_swap.cpp ]
|
||||
[ run optional_test_conversions_from_U.cpp ]
|
||||
[ run optional_test_tie.cpp ]
|
||||
|
31
test/ak_test_vc14_noexcept.cpp
Normal file
31
test/ak_test_vc14_noexcept.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2014 Andrzej Krzemienski.
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/lib/optional for documentation.
|
||||
//
|
||||
// You are welcome to contact the author at:
|
||||
// akrzemi1@gmail.com
|
||||
|
||||
#include "boost/static_assert.hpp"
|
||||
#include "boost/optional/optional.hpp"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
|
||||
using boost::optional;
|
||||
|
||||
#if defined BOOST_NO_CXX11_NOEXCEPT
|
||||
BOOST_STATIC_ASSERT_MSG(false, "absent noexcept");
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ using boost::optional;
|
||||
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#ifndef BOOST_NO_NOEXCEPT
|
||||
#ifndef BOOST_NO_CXX11_NOEXCEPT
|
||||
|
||||
// these 4 classes have different noexcept signatures in move operations
|
||||
struct NothrowBoth {
|
||||
@ -105,7 +105,7 @@ void test_noexcept_optional_with_operator() // compile-time test
|
||||
BOOST_STATIC_ASSERT(!BOOST_NOEXCEPT_EXPR( onx0 = ONx0() ));
|
||||
}
|
||||
|
||||
#endif // !defned BOOST_NO_NOEXCEPT
|
||||
#endif // !defned BOOST_NO_CXX11_NOEXCEPT
|
||||
#endif // !defined BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
|
Reference in New Issue
Block a user