Remove BOOST_NOEXCEPT

This commit is contained in:
Christian Mazakas
2023-09-27 11:44:44 -07:00
parent 6b65c8f230
commit aa16d1b8a9
10 changed files with 427 additions and 499 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ template <class T> int implicit_construct()
#endif
#if !defined(BOOST_NO_CXX11_NOEXCEPT)
#define TEST_NOEXCEPT_EXPR(x) BOOST_STATIC_ASSERT((BOOST_NOEXCEPT_EXPR(x)));
#define TEST_NOEXCEPT_EXPR(x) BOOST_STATIC_ASSERT((noexcept(x)));
#else
#define TEST_NOEXCEPT_EXPR(x)
#endif
+6 -8
View File
@@ -62,8 +62,7 @@ namespace noexcept_tests {
typedef boost::hash<int> base;
public:
hash_nothrow(BOOST_RV_REF(hash_nothrow))
BOOST_NOEXCEPT_IF(nothrow_move_construct)
hash_nothrow(BOOST_RV_REF(hash_nothrow)) noexcept(nothrow_move_construct)
{
if (!nothrow_move_construct) {
test_throw("Move Constructor");
@@ -78,7 +77,7 @@ namespace noexcept_tests {
return *this;
}
hash_nothrow& operator=(BOOST_RV_REF(hash_nothrow))
BOOST_NOEXCEPT_IF(nothrow_move_assign)
noexcept(nothrow_move_assign)
{
if (!nothrow_move_assign) {
test_throw("Move Assign");
@@ -90,8 +89,7 @@ namespace noexcept_tests {
test_throw("Operator");
return static_cast<base const&>(*this)(x);
}
friend void swap(hash_nothrow&, hash_nothrow&)
BOOST_NOEXCEPT_IF(nothrow_swap)
friend void swap(hash_nothrow&, hash_nothrow&) noexcept(nothrow_swap)
{
if (!nothrow_swap) {
test_throw("Swap");
@@ -113,7 +111,7 @@ namespace noexcept_tests {
public:
equal_to_nothrow(BOOST_RV_REF(equal_to_nothrow))
BOOST_NOEXCEPT_IF(nothrow_move_construct)
noexcept(nothrow_move_construct)
{
if (!nothrow_move_construct) {
test_throw("Move Constructor");
@@ -128,7 +126,7 @@ namespace noexcept_tests {
return *this;
}
equal_to_nothrow& operator=(BOOST_RV_REF(equal_to_nothrow))
BOOST_NOEXCEPT_IF(nothrow_move_assign)
noexcept(nothrow_move_assign)
{
if (!nothrow_move_assign) {
test_throw("Move Assign");
@@ -141,7 +139,7 @@ namespace noexcept_tests {
return x == y;
}
friend void swap(equal_to_nothrow&, equal_to_nothrow&)
BOOST_NOEXCEPT_IF(nothrow_swap)
noexcept(nothrow_swap)
{
if (!nothrow_swap) {
test_throw("Swap");
+2 -2
View File
@@ -24,7 +24,7 @@ template <typename T> struct A
A() : i(++count) {}
template <class U> A(const A<U>& a) BOOST_NOEXCEPT : i(a.i) {}
template <class U> A(const A<U>& a) noexcept : i(a.i) {}
T* allocate(std::size_t n)
{
@@ -33,7 +33,7 @@ template <typename T> struct A
return (T*)std::calloc(n, sizeof(T));
}
void deallocate(T* p, std::size_t n) BOOST_NOEXCEPT
void deallocate(T* p, std::size_t n) noexcept
{
total_allocation -= n * sizeof(T);
std::free(p);