mirror of
https://github.com/boostorg/optional.git
synced 2025-07-29 12:07:21 +02:00
doc: added relnotes for 1.59
This commit is contained in:
@ -18,9 +18,6 @@ import testing ;
|
||||
{
|
||||
test-suite optional :
|
||||
[ run optional_test.cpp ]
|
||||
[ run ak_test_vc14_noexcept.cpp ]
|
||||
[ run ak_test_trait_noexcept_default.cpp ]
|
||||
[ run ak_test_rvalue_references.cpp ]
|
||||
[ run optional_test_swap.cpp ]
|
||||
[ run optional_test_conversions_from_U.cpp ]
|
||||
[ run optional_test_tie.cpp ]
|
||||
|
@ -1,31 +0,0 @@
|
||||
// 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_RVALUE_REFERENCES
|
||||
BOOST_STATIC_ASSERT_MSG(false, "absent rvalue refs");
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,26 +0,0 @@
|
||||
#include <boost/type_traits/has_nothrow_constructor.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
namespace some_namespace
|
||||
{
|
||||
class base_class
|
||||
{
|
||||
public:
|
||||
base_class & operator=(const base_class &){ throw int(); }
|
||||
virtual ~base_class() {}
|
||||
};
|
||||
|
||||
class class_without_default_ctor : public base_class
|
||||
{
|
||||
public:
|
||||
char data;
|
||||
explicit class_without_default_ctor(char arg) : data(arg) {}
|
||||
};
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_TRAIT_FALSE((boost::has_nothrow_default_constructor<some_namespace::class_without_default_ctor>));
|
||||
return boost::report_errors();
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
// 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
|
||||
|
||||
// these 4 classes have different noexcept signatures in move operations
|
||||
struct NothrowBoth {
|
||||
NothrowBoth() BOOST_NOEXCEPT {};
|
||||
NothrowBoth(NothrowBoth&&) BOOST_NOEXCEPT_IF(true) {};
|
||||
void operator=(NothrowBoth&&) BOOST_NOEXCEPT_IF(true) {};
|
||||
};
|
||||
struct NothrowCtor {
|
||||
NothrowCtor(NothrowCtor&&) BOOST_NOEXCEPT_IF(true) {};
|
||||
void operator=(NothrowCtor&&) BOOST_NOEXCEPT_IF(false) {};
|
||||
};
|
||||
struct NothrowAssign {
|
||||
NothrowAssign(NothrowAssign&&) BOOST_NOEXCEPT_IF(false) {};
|
||||
void operator=(NothrowAssign&&) BOOST_NOEXCEPT_IF(true) {};
|
||||
};
|
||||
struct NothrowNone {
|
||||
NothrowNone(NothrowNone&&) BOOST_NOEXCEPT_IF(false) {};
|
||||
void operator=(NothrowNone&&) BOOST_NOEXCEPT_IF(false) {};
|
||||
};
|
||||
|
||||
NothrowBoth ntb;
|
||||
BOOST_STATIC_ASSERT( BOOST_NOEXCEPT_EXPR( ntb = NothrowBoth() ));
|
||||
|
||||
void test_noexcept_as_defined() // this is a compile-time test
|
||||
{
|
||||
BOOST_STATIC_ASSERT(::boost::is_nothrow_move_constructible<NothrowBoth>::value);
|
||||
BOOST_STATIC_ASSERT(::boost::is_nothrow_move_assignable<NothrowBoth>::value);
|
||||
|
||||
BOOST_STATIC_ASSERT(::boost::is_nothrow_move_constructible<NothrowCtor>::value);
|
||||
BOOST_STATIC_ASSERT(!::boost::is_nothrow_move_assignable<NothrowCtor>::value);
|
||||
|
||||
BOOST_STATIC_ASSERT(!::boost::is_nothrow_move_constructible<NothrowAssign>::value);
|
||||
BOOST_STATIC_ASSERT(::boost::is_nothrow_move_assignable<NothrowAssign>::value);
|
||||
|
||||
BOOST_STATIC_ASSERT(!::boost::is_nothrow_move_constructible<NothrowNone>::value);
|
||||
BOOST_STATIC_ASSERT(!::boost::is_nothrow_move_assignable<NothrowNone>::value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user