summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp54
-rw-r--r--libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp62
-rw-r--r--libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp64
-rw-r--r--libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp30
-rw-r--r--libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp38
-rw-r--r--libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp63
-rw-r--r--libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp5
-rw-r--r--libcxx/test/support/archetypes.hpp9
-rw-r--r--libcxx/test/support/archetypes.ipp86
9 files changed, 45 insertions, 366 deletions
diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp
deleted file mode 100644
index 6a3e613e9dc..00000000000
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03
-
-// <utility>
-
-// template <class T1, class T2> struct pair
-
-// template<class U, class V> pair(U&& x, V&& y);
-
-#include <utility>
-
-
-struct ExplicitT {
- constexpr explicit ExplicitT(int x) : value(x) {}
- int value;
-};
-
-struct ImplicitT {
- constexpr ImplicitT(int x) : value(x) {}
- int value;
-};
-
-struct ExplicitNothrowT {
- explicit ExplicitNothrowT(int x) noexcept : value(x) {}
- int value;
-};
-
-struct ImplicitNothrowT {
- ImplicitNothrowT(int x) noexcept : value(x) {}
- int value;
-};
-
-int main() {
- { // explicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>, int, int>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitT>, int, int>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitNothrowT>, int, int>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitNothrowT>, int, int>::value, "");
- }
- { // implicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitT>, int, int>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitT>, int, int>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitNothrowT>, int, int>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>, int, int>::value, "");
- }
-}
diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp
deleted file mode 100644
index 6a240122375..00000000000
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03
-
-// <utility>
-
-// template <class T1, class T2> struct pair
-
-// pair(const T1& x, const T2& y);
-
-#include <utility>
-
-
-struct ExplicitT {
- constexpr explicit ExplicitT(int x) : value(x) {}
- constexpr explicit ExplicitT(ExplicitT const& o) : value(o.value) {}
- int value;
-};
-
-struct ImplicitT {
- constexpr ImplicitT(int x) : value(x) {}
- constexpr ImplicitT(ImplicitT const& o) : value(o.value) {}
- int value;
-};
-
-struct ExplicitNothrowT {
- explicit ExplicitNothrowT(ExplicitNothrowT const&) noexcept {}
-};
-
-struct ImplicitNothrowT {
- ImplicitNothrowT(ImplicitNothrowT const&) noexcept {}
-};
-
-int main() {
- { // explicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>,
- ExplicitT const&, ExplicitT const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitT>,
- ExplicitNothrowT const&, ExplicitT const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitNothrowT>,
- ExplicitT const&, ExplicitNothrowT const&>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitNothrowT>,
- ExplicitNothrowT const&, ExplicitNothrowT const&>::value, "");
- }
- { // implicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitT>,
- ImplicitT const&, ImplicitT const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitT>,
- ImplicitNothrowT const&, ImplicitT const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitNothrowT>,
- ImplicitT const&, ImplicitNothrowT const&>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>,
- ImplicitNothrowT const&, ImplicitNothrowT const&>::value, "");
- }
-}
diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp
deleted file mode 100644
index edb3bbf64af..00000000000
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03
-
-// <utility>
-
-// template <class T1, class T2> struct pair
-
-// template <class U, class V> EXPLICIT constexpr pair(const pair<U, V>& p);
-
-#include <utility>
-
-
-struct ExplicitT {
- constexpr explicit ExplicitT(int x) : value(x) {}
- constexpr explicit ExplicitT(ExplicitT const& o) : value(o.value) {}
- int value;
-};
-
-struct ImplicitT {
- constexpr ImplicitT(int x) : value(x) {}
- constexpr ImplicitT(ImplicitT const& o) : value(o.value) {}
- int value;
-};
-
-struct ExplicitNothrowT {
- explicit ExplicitNothrowT(int x) noexcept : value(x) {}
- int value;
-};
-
-struct ImplicitNothrowT {
- ImplicitNothrowT(int x) noexcept : value(x) {}
- int value;
-};
-
-int main() {
- { // explicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>,
- std::pair<int, int> const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitT>,
- std::pair<int, int> const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitNothrowT>,
- std::pair<int, int> const&>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitNothrowT>,
- std::pair<int, int> const&>::value, "");
- }
- { // implicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitT>,
- std::pair<int, int> const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitT>,
- std::pair<int, int> const&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitNothrowT>,
- std::pair<int, int> const&>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>,
- std::pair<int, int> const&>::value, "");
- }
-}
diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp
deleted file mode 100644
index e513d55fb3b..00000000000
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// <utility>
-
-// template <class T1, class T2> struct pair
-
-// constexpr pair();
-
-
-#include <utility>
-#include <type_traits>
-
-#include "archetypes.hpp"
-
-
-int main() {
- using NonThrowingDefault = NonThrowingTypes::DefaultOnly;
- using ThrowingDefault = NonTrivialTypes::DefaultOnly;
- static_assert(!std::is_nothrow_default_constructible<std::pair<ThrowingDefault, ThrowingDefault>>::value, "");
- static_assert(!std::is_nothrow_default_constructible<std::pair<NonThrowingDefault, ThrowingDefault>>::value, "");
- static_assert(!std::is_nothrow_default_constructible<std::pair<ThrowingDefault, NonThrowingDefault>>::value, "");
- static_assert( std::is_nothrow_default_constructible<std::pair<NonThrowingDefault, NonThrowingDefault>>::value, "");
-}
diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp
deleted file mode 100644
index 81dad3bc2ff..00000000000
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03
-
-// <utility>
-
-// template <class T1, class T2> struct pair
-
-// template <class... Args1, class... Args2>
-// pair(piecewise_construct_t, tuple<Args1...> first_args,
-// tuple<Args2...> second_args);
-
-#include <tuple>
-#include <type_traits>
-#include <utility>
-
-#include "archetypes.hpp"
-
-
-int main() {
- using NonThrowingConvert = NonThrowingTypes::ConvertingType;
- using ThrowingConvert = NonTrivialTypes::ConvertingType;
- static_assert(!std::is_nothrow_constructible<std::pair<ThrowingConvert, ThrowingConvert>,
- std::piecewise_construct_t, std::tuple<int, int>, std::tuple<long, long>>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<NonThrowingConvert, ThrowingConvert>,
- std::piecewise_construct_t, std::tuple<int, int>, std::tuple<long, long>>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ThrowingConvert, NonThrowingConvert>,
- std::piecewise_construct_t, std::tuple<int, int>, std::tuple<long, long>>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<NonThrowingConvert, NonThrowingConvert>,
- std::piecewise_construct_t, std::tuple<int, int>, std::tuple<long, long>>::value, "");
-}
diff --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp
deleted file mode 100644
index 5d8d36262f1..00000000000
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03
-
-// <utility>
-
-// template <class T1, class T2> struct pair
-
-// template <class U, class V> pair(pair<U, V>&& p);
-
-#include <type_traits>
-#include <utility>
-
-
-struct ExplicitT {
- constexpr explicit ExplicitT(int x) : value(x) {}
- int value;
-};
-
-struct ImplicitT {
- constexpr ImplicitT(int x) : value(x) {}
- int value;
-};
-
-struct ExplicitNothrowT {
- explicit ExplicitNothrowT(int x) noexcept : value(x) {}
- int value;
-};
-
-struct ImplicitNothrowT {
- ImplicitNothrowT(int x) noexcept : value(x) {}
- int value;
-};
-
-int main() {
- { // explicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitT>,
- std::pair<int, int>&&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitT>,
- std::pair<int, int>&&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ExplicitT, ExplicitNothrowT>,
- std::pair<int, int>&&>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ExplicitNothrowT, ExplicitNothrowT>,
- std::pair<int, int>&&>::value, "");
- }
- { // implicit noexcept test
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitT>,
- std::pair<int, int>&&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitT>,
- std::pair<int, int>&&>::value, "");
- static_assert(!std::is_nothrow_constructible<std::pair<ImplicitT, ImplicitNothrowT>,
- std::pair<int, int>&&>::value, "");
- static_assert( std::is_nothrow_constructible<std::pair<ImplicitNothrowT, ImplicitNothrowT>,
- std::pair<int, int>&&>::value, "");
- }
-}
diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp
index aa86949dd5b..c738adad7d7 100644
--- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp
@@ -17,10 +17,9 @@
// pair(piecewise_construct_t, tuple<Args1...> first_args,
// tuple<Args2...> second_args);
-#include <cassert>
-#include <tuple>
#include <utility>
-
+#include <tuple>
+#include <cassert>
int main()
{
diff --git a/libcxx/test/support/archetypes.hpp b/libcxx/test/support/archetypes.hpp
index a0ea7c3ce8e..1695a6fc686 100644
--- a/libcxx/test/support/archetypes.hpp
+++ b/libcxx/test/support/archetypes.hpp
@@ -225,6 +225,7 @@ namespace ExplicitTypes {
#include "archetypes.ipp"
}
+
//============================================================================//
//
namespace NonConstexprTypes {
@@ -241,17 +242,11 @@ namespace NonLiteralTypes {
}
//============================================================================//
-// Non-throwing implicit test types
-namespace NonThrowingTypes {
-#define DEFINE_NOEXCEPT noexcept
-#include "archetypes.ipp"
-}
-
-//============================================================================//
// Non-Trivially Copyable Implicit Test Types
namespace NonTrivialTypes {
#define DEFINE_CTOR {}
#define DEFINE_ASSIGN { return *this; }
+#define DEFINE_DEFAULT_CTOR = default
#include "archetypes.ipp"
}
diff --git a/libcxx/test/support/archetypes.ipp b/libcxx/test/support/archetypes.ipp
index 943dcf9f5d8..36045017907 100644
--- a/libcxx/test/support/archetypes.ipp
+++ b/libcxx/test/support/archetypes.ipp
@@ -5,9 +5,6 @@
#ifndef DEFINE_EXPLICIT
#define DEFINE_EXPLICIT
#endif
-#ifndef DEFINE_NOEXCEPT
-#define DEFINE_NOEXCEPT
-#endif
#ifndef DEFINE_CONSTEXPR
#ifdef TEST_WORKAROUND_EDG_EXPLICIT_CONSTEXPR
#define DEFINE_CONSTEXPR
@@ -39,114 +36,114 @@ struct AllCtors : DEFINE_BASE(AllCtors) {
using Base = DEFINE_BASE(AllCtors);
using Base::Base;
using Base::operator=;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR AllCtors() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR AllCtors(AllCtors const&) DEFINE_NOEXCEPT DEFINE_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR AllCtors(AllCtors &&) DEFINE_NOEXCEPT DEFINE_CTOR;
- DEFINE_ASSIGN_CONSTEXPR AllCtors& operator=(AllCtors const&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
- DEFINE_ASSIGN_CONSTEXPR AllCtors& operator=(AllCtors &&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR AllCtors() DEFINE_DEFAULT_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR AllCtors(AllCtors const&) DEFINE_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR AllCtors(AllCtors &&) DEFINE_CTOR;
+ DEFINE_ASSIGN_CONSTEXPR AllCtors& operator=(AllCtors const&) DEFINE_ASSIGN;
+ DEFINE_ASSIGN_CONSTEXPR AllCtors& operator=(AllCtors &&) DEFINE_ASSIGN;
DEFINE_DTOR(AllCtors)
};
struct NoCtors : DEFINE_BASE(NoCtors) {
using Base = DEFINE_BASE(NoCtors);
- DEFINE_EXPLICIT NoCtors() DEFINE_NOEXCEPT = delete;
- DEFINE_EXPLICIT NoCtors(NoCtors const&) DEFINE_NOEXCEPT = delete;
- NoCtors& operator=(NoCtors const&) DEFINE_NOEXCEPT = delete;
+ DEFINE_EXPLICIT NoCtors() = delete;
+ DEFINE_EXPLICIT NoCtors(NoCtors const&) = delete;
+ NoCtors& operator=(NoCtors const&) = delete;
DEFINE_DTOR(NoCtors)
};
struct NoDefault : DEFINE_BASE(NoDefault) {
using Base = DEFINE_BASE(NoDefault);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR NoDefault() DEFINE_NOEXCEPT = delete;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR NoDefault() = delete;
DEFINE_DTOR(NoDefault)
};
struct DefaultOnly : DEFINE_BASE(DefaultOnly) {
using Base = DEFINE_BASE(DefaultOnly);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR DefaultOnly() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
- DefaultOnly(DefaultOnly const&) DEFINE_NOEXCEPT = delete;
- DefaultOnly& operator=(DefaultOnly const&) DEFINE_NOEXCEPT = delete;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR DefaultOnly() DEFINE_DEFAULT_CTOR;
+ DefaultOnly(DefaultOnly const&) = delete;
+ DefaultOnly& operator=(DefaultOnly const&) = delete;
DEFINE_DTOR(DefaultOnly)
};
struct Copyable : DEFINE_BASE(Copyable) {
using Base = DEFINE_BASE(Copyable);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR Copyable() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR Copyable(Copyable const &) DEFINE_NOEXCEPT DEFINE_CTOR;
- Copyable &operator=(Copyable const &) DEFINE_NOEXCEPT DEFINE_ASSIGN;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR Copyable() DEFINE_DEFAULT_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR Copyable(Copyable const &) DEFINE_CTOR;
+ Copyable &operator=(Copyable const &) DEFINE_ASSIGN;
DEFINE_DTOR(Copyable)
};
struct CopyOnly : DEFINE_BASE(CopyOnly) {
using Base = DEFINE_BASE(CopyOnly);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly(CopyOnly const &) DEFINE_NOEXCEPT DEFINE_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly(CopyOnly &&) DEFINE_NOEXCEPT = delete;
- CopyOnly &operator=(CopyOnly const &) DEFINE_NOEXCEPT DEFINE_ASSIGN;
- CopyOnly &operator=(CopyOnly &&) DEFINE_NOEXCEPT = delete;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly() DEFINE_DEFAULT_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly(CopyOnly const &) DEFINE_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly(CopyOnly &&) = delete;
+ CopyOnly &operator=(CopyOnly const &) DEFINE_ASSIGN;
+ CopyOnly &operator=(CopyOnly &&) = delete;
DEFINE_DTOR(CopyOnly)
};
struct NonCopyable : DEFINE_BASE(NonCopyable) {
using Base = DEFINE_BASE(NonCopyable);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR NonCopyable() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR NonCopyable(NonCopyable const &) DEFINE_NOEXCEPT = delete;
- NonCopyable &operator=(NonCopyable const &) DEFINE_NOEXCEPT = delete;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR NonCopyable() DEFINE_DEFAULT_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR NonCopyable(NonCopyable const &) = delete;
+ NonCopyable &operator=(NonCopyable const &) = delete;
DEFINE_DTOR(NonCopyable)
};
struct MoveOnly : DEFINE_BASE(MoveOnly) {
using Base = DEFINE_BASE(MoveOnly);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR MoveOnly() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR MoveOnly(MoveOnly &&) DEFINE_NOEXCEPT DEFINE_CTOR;
- MoveOnly &operator=(MoveOnly &&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR MoveOnly() DEFINE_DEFAULT_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR MoveOnly(MoveOnly &&) DEFINE_CTOR;
+ MoveOnly &operator=(MoveOnly &&) DEFINE_ASSIGN;
DEFINE_DTOR(MoveOnly)
};
struct CopyAssignable : DEFINE_BASE(CopyAssignable) {
using Base = DEFINE_BASE(CopyAssignable);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyAssignable() DEFINE_NOEXCEPT = delete;
- CopyAssignable& operator=(CopyAssignable const&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyAssignable() = delete;
+ CopyAssignable& operator=(CopyAssignable const&) DEFINE_ASSIGN;
DEFINE_DTOR(CopyAssignable)
};
struct CopyAssignOnly : DEFINE_BASE(CopyAssignOnly) {
using Base = DEFINE_BASE(CopyAssignOnly);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyAssignOnly() DEFINE_NOEXCEPT = delete;
- CopyAssignOnly& operator=(CopyAssignOnly const&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
- CopyAssignOnly& operator=(CopyAssignOnly &&) DEFINE_NOEXCEPT = delete;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyAssignOnly() = delete;
+ CopyAssignOnly& operator=(CopyAssignOnly const&) DEFINE_ASSIGN;
+ CopyAssignOnly& operator=(CopyAssignOnly &&) = delete;
DEFINE_DTOR(CopyAssignOnly)
};
struct MoveAssignOnly : DEFINE_BASE(MoveAssignOnly) {
using Base = DEFINE_BASE(MoveAssignOnly);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR MoveAssignOnly() DEFINE_NOEXCEPT = delete;
- MoveAssignOnly& operator=(MoveAssignOnly const&) DEFINE_NOEXCEPT = delete;
- MoveAssignOnly& operator=(MoveAssignOnly &&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR MoveAssignOnly() = delete;
+ MoveAssignOnly& operator=(MoveAssignOnly const&) = delete;
+ MoveAssignOnly& operator=(MoveAssignOnly &&) DEFINE_ASSIGN;
DEFINE_DTOR(MoveAssignOnly)
};
struct ConvertingType : DEFINE_BASE(ConvertingType) {
using Base = DEFINE_BASE(ConvertingType);
using Base::Base;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType(ConvertingType const&) DEFINE_NOEXCEPT DEFINE_CTOR;
- DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType(ConvertingType &&) DEFINE_NOEXCEPT DEFINE_CTOR;
- ConvertingType& operator=(ConvertingType const&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
- ConvertingType& operator=(ConvertingType &&) DEFINE_NOEXCEPT DEFINE_ASSIGN;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType() DEFINE_DEFAULT_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType(ConvertingType const&) DEFINE_CTOR;
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType(ConvertingType &&) DEFINE_CTOR;
+ ConvertingType& operator=(ConvertingType const&) DEFINE_ASSIGN;
+ ConvertingType& operator=(ConvertingType &&) DEFINE_ASSIGN;
template <class ...Args>
- DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType(Args&&...) DEFINE_NOEXCEPT {}
+ DEFINE_EXPLICIT DEFINE_CONSTEXPR ConvertingType(Args&&...) {}
template <class Arg>
- ConvertingType& operator=(Arg&&) DEFINE_NOEXCEPT { return *this; }
+ ConvertingType& operator=(Arg&&) { return *this; }
DEFINE_DTOR(ConvertingType)
};
@@ -168,7 +165,6 @@ using ApplyTypes = List<
#undef DEFINE_BASE
#undef DEFINE_EXPLICIT
-#undef DEFINE_NOEXCEPT
#undef DEFINE_CONSTEXPR
#undef DEFINE_ASSIGN_CONSTEXPR
#undef DEFINE_CTOR
OpenPOWER on IntegriCloud