summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/callable_traits/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/boost/libs/callable_traits/test
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/callable_traits/test')
-rw-r--r--src/boost/libs/callable_traits/test/CMakeLists.txt41
-rw-r--r--src/boost/libs/callable_traits/test/Jamfile.v222
-rw-r--r--src/boost/libs/callable_traits/test/add_member_const.cpp103
-rw-r--r--src/boost/libs/callable_traits/test/add_member_cv.cpp104
-rw-r--r--src/boost/libs/callable_traits/test/add_member_lvalue_reference.cpp206
-rw-r--r--src/boost/libs/callable_traits/test/add_member_rvalue_reference.cpp167
-rw-r--r--src/boost/libs/callable_traits/test/add_member_volatile.cpp76
-rw-r--r--src/boost/libs/callable_traits/test/add_noexcept.cpp45
-rw-r--r--src/boost/libs/callable_traits/test/add_noexcept_constraints.cpp51
-rw-r--r--src/boost/libs/callable_traits/test/add_transaction_safe.cpp45
-rw-r--r--src/boost/libs/callable_traits/test/add_transaction_safe_constraints.cpp51
-rw-r--r--src/boost/libs/callable_traits/test/add_varargs.cpp188
-rw-r--r--src/boost/libs/callable_traits/test/add_varargs_constraints.cpp45
-rw-r--r--src/boost/libs/callable_traits/test/apply_member_pointer_constraints.cpp32
-rw-r--r--src/boost/libs/callable_traits/test/apply_member_pointer_function.cpp114
-rw-r--r--src/boost/libs/callable_traits/test/apply_member_pointer_pmd.cpp31
-rw-r--r--src/boost/libs/callable_traits/test/apply_member_pointer_pmf.cpp95
-rw-r--r--src/boost/libs/callable_traits/test/args.cpp67
-rw-r--r--src/boost/libs/callable_traits/test/args_constraints.cpp46
-rw-r--r--src/boost/libs/callable_traits/test/class_of.cpp52
-rw-r--r--src/boost/libs/callable_traits/test/class_of_constraints.cpp45
-rw-r--r--src/boost/libs/callable_traits/test/collapse_flags.cpp38
-rw-r--r--src/boost/libs/callable_traits/test/function_type.cpp96
-rw-r--r--src/boost/libs/callable_traits/test/function_type_constraints.cpp46
-rw-r--r--src/boost/libs/callable_traits/test/has_member_qualifiers.cpp128
-rw-r--r--src/boost/libs/callable_traits/test/has_member_qualifiers_simple.cpp58
-rw-r--r--src/boost/libs/callable_traits/test/has_varargs.cpp214
-rw-r--r--src/boost/libs/callable_traits/test/has_void_return.cpp58
-rw-r--r--src/boost/libs/callable_traits/test/is_const_member.cpp121
-rw-r--r--src/boost/libs/callable_traits/test/is_cv_member.cpp121
-rw-r--r--src/boost/libs/callable_traits/test/is_invocable.cpp381
-rw-r--r--src/boost/libs/callable_traits/test/is_invocable_r.cpp328
-rw-r--r--src/boost/libs/callable_traits/test/is_lvalue_reference_member.cpp126
-rw-r--r--src/boost/libs/callable_traits/test/is_noexcept.cpp43
-rw-r--r--src/boost/libs/callable_traits/test/is_rvalue_reference_member.cpp126
-rw-r--r--src/boost/libs/callable_traits/test/is_transaction_safe.cpp41
-rw-r--r--src/boost/libs/callable_traits/test/is_volatile_member.cpp121
-rw-r--r--src/boost/libs/callable_traits/test/qualified_class_of.cpp52
-rw-r--r--src/boost/libs/callable_traits/test/qualified_class_of_constraints.cpp52
-rw-r--r--src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.cpp48
-rw-r--r--src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.hpp48
-rw-r--r--src/boost/libs/callable_traits/test/remove_member_const.cpp106
-rw-r--r--src/boost/libs/callable_traits/test/remove_member_reference.cpp78
-rw-r--r--src/boost/libs/callable_traits/test/remove_member_volatile.cpp77
-rw-r--r--src/boost/libs/callable_traits/test/remove_noexcept.cpp36
-rw-r--r--src/boost/libs/callable_traits/test/remove_noexcept_constraints.cpp51
-rw-r--r--src/boost/libs/callable_traits/test/remove_transaction_safe.cpp39
-rw-r--r--src/boost/libs/callable_traits/test/remove_transaction_safe_constraints.cpp51
-rw-r--r--src/boost/libs/callable_traits/test/remove_varargs.cpp190
-rw-r--r--src/boost/libs/callable_traits/test/remove_varargs_constraints.hpp45
-rw-r--r--src/boost/libs/callable_traits/test/return_type.cpp56
-rw-r--r--src/boost/libs/callable_traits/test/test.hpp56
52 files changed, 4657 insertions, 0 deletions
diff --git a/src/boost/libs/callable_traits/test/CMakeLists.txt b/src/boost/libs/callable_traits/test/CMakeLists.txt
new file mode 100644
index 00000000..640a787c
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/CMakeLists.txt
@@ -0,0 +1,41 @@
+
+# Copyright Louis Dionne 2015
+# Modified Work Copyright Barrett Adair 2015-2017
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+
+add_custom_target(tests COMMENT "Build all the unit tests.")
+add_custom_target(tests.quick COMMENT "Build a subset of all the unit tests to finish faster.")
+
+##############################################################################
+# callable_traits_add_unit_test(<name> ...)
+#
+# Equivalent to `callable_traits_add_test`, except the test is also added as a
+# dependency of the `tests` target.
+##############################################################################
+
+function(boost_callable_traits_add_unit_test name)
+ boost_callable_traits_add_test(${ARGV})
+ add_dependencies(tests ${name})
+ if ((NOT "${name}" MATCHES "\\.ext\\.") AND (NOT "${name}" MATCHES "_mcd"))
+ add_dependencies(tests.quick ${name})
+ endif()
+endfunction()
+
+include_directories(${boost_callable_traits_SOURCE_DIR}/include)
+include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
+include_directories(${CMAKE_CURRENT_LIST_DIR})
+
+file(GLOB_RECURSE UNIT_TESTS "*.cpp")
+
+foreach(_file IN LISTS UNIT_TESTS)
+ boost_callable_traits_target_name_for(_target "${_file}")
+ add_executable(${_target} EXCLUDE_FROM_ALL "${_file}")
+ set(lazy_target "lazy_${_target}")
+ add_executable(${lazy_target} EXCLUDE_FROM_ALL "${_file}")
+ target_compile_definitions(${lazy_target} INTERFACE -DUSE_LAZY_TYPES)
+ boost_callable_traits_add_unit_test(${_target} ${CMAKE_CURRENT_BINARY_DIR}/${_target})
+ boost_callable_traits_add_unit_test(${lazy_target} ${CMAKE_CURRENT_BINARY_DIR}/${_target})
+endforeach()
+
+add_dependencies(callable_traits_check tests)
diff --git a/src/boost/libs/callable_traits/test/Jamfile.v2 b/src/boost/libs/callable_traits/test/Jamfile.v2
new file mode 100644
index 00000000..bce5f231
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/Jamfile.v2
@@ -0,0 +1,22 @@
+# Copyright Louis Dionne 2013-2016
+# Modified Work Copyright Barrett Adair 2016-2017
+# Copyright 2017 Peter Dimov
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+
+import testing ;
+import ../../config/checks/config : requires ;
+
+project :
+ requirements
+ [ requires cxx11_constexpr ]
+ <toolset>clang:<cxxflags>"-pedantic -Wall -Wextra"
+ <toolset>darwin:<cxxflags>"-pedantic -Wall -Wextra"
+;
+
+for local source in [ glob *.cpp ]
+{
+ run $(source) ;
+ run $(source) : : : <define>USE_LAZY_TYPES : $(source:B)__lazy ;
+}
diff --git a/src/boost/libs/callable_traits/test/add_member_const.cpp b/src/boost/libs/callable_traits/test/add_member_const.cpp
new file mode 100644
index 00000000..5a5faed3
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_member_const.cpp
@@ -0,0 +1,103 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/add_member_const.hpp>
+#include "test.hpp"
+
+struct foo {};
+
+int main() {
+
+ {
+ using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...);
+ using l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) LREF;
+ using r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) RREF ;
+ using c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const;
+ using cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const LREF;
+ using cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const RREF;
+ using v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile;
+ using vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile LREF;
+ using vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile RREF;
+ using cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile;
+ using cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile LREF;
+ using cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<c, TRAIT(add_member_const, f)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(add_member_const, c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_const, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_const, cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_const, r)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_const, cr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_const, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_const, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_const, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_const, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_const, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_const, cvr)>{});
+ }
+
+ {
+ using f = void(foo::*)(int, int);
+ using l = void(foo::*)(int, int) LREF;
+ using r = void(foo::*)(int, int) RREF ;
+ using c = void(foo::*)(int, int) const;
+ using cl = void(foo::*)(int, int) const LREF;
+ using cr = void(foo::*)(int, int) const RREF;
+ using v = void(foo::*)(int, int) volatile;
+ using vl = void(foo::*)(int, int) volatile LREF;
+ using vr = void(foo::*)(int, int) volatile RREF;
+ using cv = void(foo::*)(int, int) const volatile;
+ using cvl = void(foo::*)(int, int) const volatile LREF;
+ using cvr = void(foo::*)(int, int) const volatile RREF;
+
+ CT_ASSERT(std::is_same<c, TRAIT(add_member_const, f)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(add_member_const, c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_const, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_const, cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_const, r)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_const, cr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_const, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_const, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_const, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_const, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_const, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_const, cvr)>{});
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ CT_ASSERT(std::is_same<c, TRAIT(add_member_const, f)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(add_member_const, c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_const, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_const, cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_const, r)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_const, cr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_const, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_const, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_const, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_const, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_const, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_const, cvr)>{});
+ }
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+}
diff --git a/src/boost/libs/callable_traits/test/add_member_cv.cpp b/src/boost/libs/callable_traits/test/add_member_cv.cpp
new file mode 100644
index 00000000..cb4e04f5
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_member_cv.cpp
@@ -0,0 +1,104 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/add_member_cv.hpp>
+#include "test.hpp"
+
+struct foo {};
+
+int main() {
+
+ {
+ using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...);
+ using l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) LREF;
+ using r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) RREF;
+ using c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const;
+ using cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const LREF;
+ using cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const RREF;
+ using v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile;
+ using vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile LREF;
+ using vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile RREF;
+ using cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile;
+ using cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile LREF;
+ using cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, f)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, c)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, l)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, cl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, r)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, cr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, cvr)>{});
+ }
+
+ {
+ using f = void(foo::*)(int, int);
+ using l = void(foo::*)(int, int) LREF;
+ using r = void(foo::*)(int, int) RREF;
+ using c = void(foo::*)(int, int) const;
+ using cl = void(foo::*)(int, int) const LREF;
+ using cr = void(foo::*)(int, int) const RREF;
+ using v = void(foo::*)(int, int) volatile;
+ using vl = void(foo::*)(int, int) volatile LREF;
+ using vr = void(foo::*)(int, int) volatile RREF;
+ using cv = void(foo::*)(int, int) const volatile;
+ using cvl = void(foo::*)(int, int) const volatile LREF;
+ using cvr = void(foo::*)(int, int) const volatile RREF;
+
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, f)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, c)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, l)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, cl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, r)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, cr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, cvr)>{});
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, f)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, c)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, l)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, cl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, r)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, cr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_cv, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_cv, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_cv, cvr)>{});
+ }
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+}
diff --git a/src/boost/libs/callable_traits/test/add_member_lvalue_reference.cpp b/src/boost/libs/callable_traits/test/add_member_lvalue_reference.cpp
new file mode 100644
index 00000000..b3207542
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_member_lvalue_reference.cpp
@@ -0,0 +1,206 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/add_member_lvalue_reference.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+int main(){ return 0; }
+#else
+
+struct foo{};
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() &&;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cvl)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_lvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<cr, TRAIT(add_member_lvalue_reference, cr)>{});
+ CT_ASSERT(!std::is_same<vr, TRAIT(add_member_lvalue_reference, vr)>{});
+ CT_ASSERT(!std::is_same<cvr, TRAIT(add_member_lvalue_reference, cvr)>{});
+ }
+
+ {
+ using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...);
+ using l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) &;
+ using r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) &&;
+ using c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const;
+ using cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const &;
+ using cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const &&;
+ using v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile;
+ using vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile &;
+ using vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile &&;
+ using cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile;
+ using cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile &;
+ using cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile &&;
+
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cvl)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_lvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<cr, TRAIT(add_member_lvalue_reference, cr)>{});
+ CT_ASSERT(!std::is_same<vr, TRAIT(add_member_lvalue_reference, vr)>{});
+ CT_ASSERT(!std::is_same<cvr, TRAIT(add_member_lvalue_reference, cvr)>{});
+ }
+
+ {
+ using f = void(...);
+ using l = void(...) &;
+ using r = void(...) &&;
+ using c = void(...) const;
+ using cl = void(...) const &;
+ using cr = void(...) const &&;
+ using v = void(...) volatile;
+ using vl = void(...) volatile &;
+ using vr = void(...) volatile &&;
+ using cv = void(...) const volatile;
+ using cvl = void(...) const volatile &;
+ using cvr = void(...) const volatile &&;
+
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cvl)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_lvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<cr, TRAIT(add_member_lvalue_reference, cr)>{});
+ CT_ASSERT(!std::is_same<vr, TRAIT(add_member_lvalue_reference, vr)>{});
+ CT_ASSERT(!std::is_same<cvr, TRAIT(add_member_lvalue_reference, cvr)>{});
+ }
+
+ #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+ {
+ using f = void(...) transaction_safe;
+ using l = void(...) & transaction_safe;
+ using r = void(...) && transaction_safe;
+ using c = void(...) const transaction_safe;
+ using cl = void(...) const & transaction_safe;
+ using cr = void(...) const && transaction_safe;
+ using v = void(...) volatile transaction_safe;
+ using vl = void(...) volatile & transaction_safe;
+ using vr = void(...) volatile && transaction_safe;
+ using cv = void(...) const volatile transaction_safe;
+ using cvl = void(...) const volatile & transaction_safe;
+ using cvr = void(...) const volatile && transaction_safe;
+
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cvl)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_lvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<cr, TRAIT(add_member_lvalue_reference, cr)>{});
+ CT_ASSERT(!std::is_same<vr, TRAIT(add_member_lvalue_reference, vr)>{});
+ CT_ASSERT(!std::is_same<cvr, TRAIT(add_member_lvalue_reference, cvr)>{});
+
+ }
+ #endif // #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+
+ #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+ {
+ using f = void(...) noexcept;
+ using l = void(...) & noexcept;
+ using r = void(...) && noexcept;
+ using c = void(...) const noexcept;
+ using cl = void(...) const & noexcept;
+ using cr = void(...) const && noexcept;
+ using v = void(...) volatile noexcept;
+ using vl = void(...) volatile & noexcept;
+ using vr = void(...) volatile && noexcept;
+ using cv = void(...) const volatile noexcept;
+ using cvl = void(...) const volatile & noexcept;
+ using cvr = void(...) const volatile && noexcept;
+
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cvl)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_lvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<cr, TRAIT(add_member_lvalue_reference, cr)>{});
+ CT_ASSERT(!std::is_same<vr, TRAIT(add_member_lvalue_reference, vr)>{});
+ CT_ASSERT(!std::is_same<cvr, TRAIT(add_member_lvalue_reference, cvr)>{});
+ }
+ #endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+
+ #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+ #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+ {
+ using f = void(...) transaction_safe noexcept;
+ using l = void(...) & transaction_safe noexcept;
+ using r = void(...) && transaction_safe noexcept;
+ using c = void(...) const transaction_safe noexcept;
+ using cl = void(...) const & transaction_safe noexcept;
+ using cr = void(...) const && transaction_safe noexcept;
+ using v = void(...) volatile transaction_safe noexcept;
+ using vl = void(...) volatile & transaction_safe noexcept;
+ using vr = void(...) volatile && transaction_safe noexcept;
+ using cv = void(...) const volatile transaction_safe noexcept;
+ using cvl = void(...) const volatile & transaction_safe noexcept;
+ using cvr = void(...) const volatile && transaction_safe noexcept;
+
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_lvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_lvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_lvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_lvalue_reference, cvl)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_lvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<cr, TRAIT(add_member_lvalue_reference, cr)>{});
+ CT_ASSERT(!std::is_same<vr, TRAIT(add_member_lvalue_reference, vr)>{});
+ CT_ASSERT(!std::is_same<cvr, TRAIT(add_member_lvalue_reference, cvr)>{});
+ }
+ #endif // #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+ #endif // #ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+}
+
+#endif //#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+
diff --git a/src/boost/libs/callable_traits/test/add_member_rvalue_reference.cpp b/src/boost/libs/callable_traits/test/add_member_rvalue_reference.cpp
new file mode 100644
index 00000000..e7d3e870
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_member_rvalue_reference.cpp
@@ -0,0 +1,167 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+int main(){ return 0; }
+#else
+
+
+struct foo{};
+
+int main() {
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() &&;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_rvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_rvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_rvalue_reference, cvl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, cr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cvr)>{});
+ }
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() &&;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_rvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_rvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_rvalue_reference, cvl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, cr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cvr)>{});
+ }
+
+ {
+ using f = void(foo::*)(...);
+ using l = void(foo::*)(...) &;
+ using r = void(foo::*)(...) &&;
+ using c = void(foo::*)(...) const;
+ using cl = void(foo::*)(...) const &;
+ using cr = void(foo::*)(...) const &&;
+ using v = void(foo::*)(...) volatile;
+ using vl = void(foo::*)(...) volatile &;
+ using vr = void(foo::*)(...) volatile &&;
+ using cv = void(foo::*)(...) const volatile;
+ using cvl = void(foo::*)(...) const volatile &;
+ using cvr = void(foo::*)(...) const volatile &&;
+
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_rvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_rvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_rvalue_reference, cvl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, cr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cvr)>{});
+ }
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() &&;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_rvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_rvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_rvalue_reference, cvl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, cr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cvr)>{});
+ }
+
+ {
+ using f = void();
+ using l = void() &;
+ using r = void() &&;
+ using c = void() const;
+ using cl = void() const &;
+ using cr = void() const &&;
+ using v = void() volatile;
+ using vl = void() volatile &;
+ using vr = void() volatile &&;
+ using cv = void() const volatile;
+ using cvl = void() const volatile &;
+ using cvr = void() const volatile &&;
+
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, f)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, c)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, v)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cv)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(add_member_rvalue_reference, cl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_rvalue_reference, vl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_rvalue_reference, cvl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(add_member_rvalue_reference, r)>{});
+ CT_ASSERT(!std::is_same<r, TRAIT(add_member_rvalue_reference, l)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(add_member_rvalue_reference, cr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_rvalue_reference, vr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_rvalue_reference, cvr)>{});
+ }
+}
+
+#endif //#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
diff --git a/src/boost/libs/callable_traits/test/add_member_volatile.cpp b/src/boost/libs/callable_traits/test/add_member_volatile.cpp
new file mode 100644
index 00000000..a76e02e6
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_member_volatile.cpp
@@ -0,0 +1,76 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/add_member_volatile.hpp>
+#include "test.hpp"
+
+struct foo{};
+
+int main() {
+
+ {
+ using f = int(foo::*)(int);
+ using l = int(foo::*)(int) LREF;
+ using r = int(foo::*)(int) RREF;
+ using c = int(foo::*)(int) const;
+ using cl = int(foo::*)(int) const LREF;
+ using cr = int(foo::*)(int) const RREF;
+ using v = int(foo::*)(int) volatile;
+ using vl = int(foo::*)(int) volatile LREF;
+ using vr = int(foo::*)(int) volatile RREF;
+ using cv = int(foo::*)(int) const volatile;
+ using cvl = int(foo::*)(int) const volatile LREF;
+ using cvr = int(foo::*)(int) const volatile RREF;
+
+ CT_ASSERT(std::is_same<v, TRAIT(add_member_volatile, f)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(add_member_volatile, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_volatile, l)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_volatile, vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_volatile, r)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_volatile, vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_volatile, c)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_volatile, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_volatile, cl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_volatile, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_volatile, cr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_volatile, cvr)>{});
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = foo();
+ using l = foo() LREF;
+ using r = foo() RREF;
+ using c = foo() const;
+ using cl = foo() const LREF;
+ using cr = foo() const RREF;
+ using v = foo() volatile;
+ using vl = foo() volatile LREF;
+ using vr = foo() volatile RREF;
+ using cv = foo() const volatile;
+ using cvl = foo() const volatile LREF;
+ using cvr = foo() const volatile RREF;
+
+ CT_ASSERT(std::is_same<v, TRAIT(add_member_volatile, f)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(add_member_volatile, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_volatile, l)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(add_member_volatile, vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_volatile, r)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(add_member_volatile, vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_volatile, c)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(add_member_volatile, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_volatile, cl)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(add_member_volatile, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_volatile, cr)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(add_member_volatile, cvr)>{});
+ }
+
+#endif
+}
diff --git a/src/boost/libs/callable_traits/test/add_noexcept.cpp b/src/boost/libs/callable_traits/test/add_noexcept.cpp
new file mode 100644
index 00000000..c13251a6
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_noexcept.cpp
@@ -0,0 +1,45 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+#include <boost/callable_traits/detail/config.hpp>
+
+
+#ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+int main(){}
+#else
+
+#include <boost/callable_traits/add_noexcept.hpp>
+#include "test.hpp"
+
+template<typename Noexcept, typename NotNoexcept>
+void test() {
+
+ CT_ASSERT(std::is_same<Noexcept, TRAIT(add_noexcept, NotNoexcept)>::value);
+
+ //sanity check
+ CT_ASSERT(!std::is_same<Noexcept, NotNoexcept>::value);
+}
+
+#define TEST_NOEXCEPT(not_noexcept) test<not_noexcept noexcept, not_noexcept>()
+
+int main() {
+
+ TEST_NOEXCEPT(int(int) &);
+ TEST_NOEXCEPT(int(*)(int));
+ TEST_NOEXCEPT(int(int, ...) &&);
+ TEST_NOEXCEPT(int(*)(int, ...));
+
+ struct foo;
+
+ TEST_NOEXCEPT(int(foo::*)(int));
+ TEST_NOEXCEPT(int(foo::*)(int) const);
+ TEST_NOEXCEPT(int(foo::*)(int, ...));
+ TEST_NOEXCEPT(int(foo::*)(int, ...) volatile);
+}
+
+#endif // #ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+
diff --git a/src/boost/libs/callable_traits/test/add_noexcept_constraints.cpp b/src/boost/libs/callable_traits/test/add_noexcept_constraints.cpp
new file mode 100644
index 00000000..e6f59cb5
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_noexcept_constraints.cpp
@@ -0,0 +1,51 @@
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/add_noexcept.hpp>
+#include <tuple>
+#include "test.hpp"
+
+#ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+int main(){}
+#else
+
+struct foo;
+
+template<typename T>
+struct is_substitution_failure_add_noexcept {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(add_noexcept, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_add_noexcept<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<int>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<int &>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<int (* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<int (foo::* &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<int (foo::* const)()>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<int (foo::* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<int (foo::* volatile)()>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<void>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<void*>::value);
+ CT_ASSERT(is_substitution_failure_add_noexcept<void(**)()>::value);
+}
+
+#endif //#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
diff --git a/src/boost/libs/callable_traits/test/add_transaction_safe.cpp b/src/boost/libs/callable_traits/test/add_transaction_safe.cpp
new file mode 100644
index 00000000..a02f0092
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_transaction_safe.cpp
@@ -0,0 +1,45 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+#include <boost/callable_traits/detail/config.hpp>
+
+
+#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+int main(){}
+#else
+
+#include <boost/callable_traits/add_transaction_safe.hpp>
+#include "test.hpp"
+
+template<typename Safe, typename NotSafe>
+void test() {
+
+ CT_ASSERT(std::is_same<Safe, TRAIT(add_transaction_safe, NotSafe)>::value);
+
+ //sanity check
+ CT_ASSERT(!std::is_same<Safe, NotSafe>::value);
+}
+
+#define TEST_TRANSACTION_SAFE(not_safe) test<not_safe transaction_safe, not_safe>()
+
+int main() {
+
+ TEST_TRANSACTION_SAFE(int(int) &);
+ TEST_TRANSACTION_SAFE(int(*)(int));
+ TEST_TRANSACTION_SAFE(int(int, ...) &&);
+ TEST_TRANSACTION_SAFE(int(*)(int, ...));
+
+ struct foo;
+
+ TEST_TRANSACTION_SAFE(int(foo::*)(int));
+ TEST_TRANSACTION_SAFE(int(foo::*)(int) const);
+ TEST_TRANSACTION_SAFE(int(foo::*)(int, ...));
+ TEST_TRANSACTION_SAFE(int(foo::*)(int, ...) volatile);
+}
+
+#endif
+
diff --git a/src/boost/libs/callable_traits/test/add_transaction_safe_constraints.cpp b/src/boost/libs/callable_traits/test/add_transaction_safe_constraints.cpp
new file mode 100644
index 00000000..bb74cdc1
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_transaction_safe_constraints.cpp
@@ -0,0 +1,51 @@
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/add_transaction_safe.hpp>
+#include <tuple>
+#include "test.hpp"
+
+#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+int main(){}
+#else
+
+struct foo;
+
+template<typename T>
+struct is_substitution_failure_add_tx_safe {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(add_transaction_safe, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_add_tx_safe<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<int>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<int &>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<int (* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<int (foo::* &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<int (foo::* const)()>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<int (foo::* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<int (foo::* volatile)()>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<void>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<void*>::value);
+ CT_ASSERT(is_substitution_failure_add_tx_safe<void(**)()>::value);
+}
+
+#endif //#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
diff --git a/src/boost/libs/callable_traits/test/add_varargs.cpp b/src/boost/libs/callable_traits/test/add_varargs.cpp
new file mode 100644
index 00000000..c1d0ca05
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_varargs.cpp
@@ -0,0 +1,188 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/add_varargs.hpp>
+#include "test.hpp"
+
+struct foo {};
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() LREF;
+ using r = void(foo::*)() RREF ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const LREF;
+ using cr = void(foo::*)() const RREF;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile LREF;
+ using vr = void(foo::*)() volatile RREF;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile LREF;
+ using cvr = void(foo::*)() const volatile RREF;
+
+ using va_f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...);
+ using va_l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) LREF;
+ using va_r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) RREF ;
+ using va_c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const;
+ using va_cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const LREF;
+ using va_cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const RREF;
+ using va_v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile;
+ using va_vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile LREF;
+ using va_vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile RREF;
+ using va_cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile;
+ using va_cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile LREF;
+ using va_cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<va_f, TRAIT(add_varargs, f)>{});
+ CT_ASSERT(std::is_same<va_l, TRAIT(add_varargs, l)>{});
+ CT_ASSERT(std::is_same<va_r, TRAIT(add_varargs, r)>{});
+ CT_ASSERT(std::is_same<va_c, TRAIT(add_varargs, c)>{});
+ CT_ASSERT(std::is_same<va_cl, TRAIT(add_varargs, cl)>{});
+ CT_ASSERT(std::is_same<va_cr, TRAIT(add_varargs, cr)>{});
+ CT_ASSERT(std::is_same<va_v, TRAIT(add_varargs, v)>{});
+ CT_ASSERT(std::is_same<va_vl, TRAIT(add_varargs, vl)>{});
+ CT_ASSERT(std::is_same<va_vr, TRAIT(add_varargs, vr)>{});
+ CT_ASSERT(std::is_same<va_cv, TRAIT(add_varargs, cv)>{});
+ CT_ASSERT(std::is_same<va_cvl, TRAIT(add_varargs, cvl)>{});
+ CT_ASSERT(std::is_same<va_cvr, TRAIT(add_varargs, cvr)>{});
+
+ CT_ASSERT(std::is_same<va_f, TRAIT(add_varargs, va_f)>{});
+ CT_ASSERT(std::is_same<va_l, TRAIT(add_varargs, va_l)>{});
+ CT_ASSERT(std::is_same<va_r, TRAIT(add_varargs, va_r)>{});
+ CT_ASSERT(std::is_same<va_c, TRAIT(add_varargs, va_c)>{});
+ CT_ASSERT(std::is_same<va_cl, TRAIT(add_varargs, va_cl)>{});
+ CT_ASSERT(std::is_same<va_cr, TRAIT(add_varargs, va_cr)>{});
+ CT_ASSERT(std::is_same<va_v, TRAIT(add_varargs, va_v)>{});
+ CT_ASSERT(std::is_same<va_vl, TRAIT(add_varargs, va_vl)>{});
+ CT_ASSERT(std::is_same<va_vr, TRAIT(add_varargs, va_vr)>{});
+ CT_ASSERT(std::is_same<va_cv, TRAIT(add_varargs, va_cv)>{});
+ CT_ASSERT(std::is_same<va_cvl, TRAIT(add_varargs, va_cvl)>{});
+ CT_ASSERT(std::is_same<va_cvr, TRAIT(add_varargs, va_cvr)>{});
+ }
+
+ {
+ using f = void(foo::*)(int&, int&&);
+ using l = void(foo::*)(int&, int&&) LREF;
+ using r = void(foo::*)(int&, int&&) RREF ;
+ using c = void(foo::*)(int&, int&&) const;
+ using cl = void(foo::*)(int&, int&&) const LREF;
+ using cr = void(foo::*)(int&, int&&) const RREF;
+ using v = void(foo::*)(int&, int&&) volatile;
+ using vl = void(foo::*)(int&, int&&) volatile LREF;
+ using vr = void(foo::*)(int&, int&&) volatile RREF;
+ using cv = void(foo::*)(int&, int&&) const volatile;
+ using cvl = void(foo::*)(int&, int&&) const volatile LREF;
+ using cvr = void(foo::*)(int&, int&&) const volatile RREF;
+
+ using va_f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...);
+ using va_l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) LREF;
+ using va_r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) RREF ;
+ using va_c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const;
+ using va_cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const LREF;
+ using va_cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const RREF;
+ using va_v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) volatile;
+ using va_vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) volatile LREF;
+ using va_vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) volatile RREF;
+ using va_cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const volatile;
+ using va_cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const volatile LREF;
+ using va_cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<va_f, TRAIT(add_varargs, f)>{});
+ CT_ASSERT(std::is_same<va_l, TRAIT(add_varargs, l)>{});
+ CT_ASSERT(std::is_same<va_r, TRAIT(add_varargs, r)>{});
+ CT_ASSERT(std::is_same<va_c, TRAIT(add_varargs, c)>{});
+ CT_ASSERT(std::is_same<va_cl, TRAIT(add_varargs, cl)>{});
+ CT_ASSERT(std::is_same<va_cr, TRAIT(add_varargs, cr)>{});
+ CT_ASSERT(std::is_same<va_v, TRAIT(add_varargs, v)>{});
+ CT_ASSERT(std::is_same<va_vl, TRAIT(add_varargs, vl)>{});
+ CT_ASSERT(std::is_same<va_vr, TRAIT(add_varargs, vr)>{});
+ CT_ASSERT(std::is_same<va_cv, TRAIT(add_varargs, cv)>{});
+ CT_ASSERT(std::is_same<va_cvl, TRAIT(add_varargs, cvl)>{});
+ CT_ASSERT(std::is_same<va_cvr, TRAIT(add_varargs, cvr)>{});
+
+ CT_ASSERT(std::is_same<va_f, TRAIT(add_varargs, va_f)>{});
+ CT_ASSERT(std::is_same<va_l, TRAIT(add_varargs, va_l)>{});
+ CT_ASSERT(std::is_same<va_r, TRAIT(add_varargs, va_r)>{});
+ CT_ASSERT(std::is_same<va_c, TRAIT(add_varargs, va_c)>{});
+ CT_ASSERT(std::is_same<va_cl, TRAIT(add_varargs, va_cl)>{});
+ CT_ASSERT(std::is_same<va_cr, TRAIT(add_varargs, va_cr)>{});
+ CT_ASSERT(std::is_same<va_v, TRAIT(add_varargs, va_v)>{});
+ CT_ASSERT(std::is_same<va_vl, TRAIT(add_varargs, va_vl)>{});
+ CT_ASSERT(std::is_same<va_vr, TRAIT(add_varargs, va_vr)>{});
+ CT_ASSERT(std::is_same<va_cv, TRAIT(add_varargs, va_cv)>{});
+ CT_ASSERT(std::is_same<va_cvl, TRAIT(add_varargs, va_cvl)>{});
+ CT_ASSERT(std::is_same<va_cvr, TRAIT(add_varargs, va_cvr)>{});
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ using va_f = void(...);
+ using va_l = void(...) LREF;
+ using va_r = void(...) RREF ;
+ using va_c = void(...) const;
+ using va_cl = void(...) const LREF;
+ using va_cr = void(...) const RREF;
+ using va_v = void(...) volatile;
+ using va_vl = void(...) volatile LREF;
+ using va_vr = void(...) volatile RREF;
+ using va_cv = void(...) const volatile;
+ using va_cvl = void(...) const volatile LREF;
+ using va_cvr = void(...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<va_f, TRAIT(add_varargs, f)>{});
+ CT_ASSERT(std::is_same<va_l, TRAIT(add_varargs, l)>{});
+ CT_ASSERT(std::is_same<va_r, TRAIT(add_varargs, r)>{});
+ CT_ASSERT(std::is_same<va_c, TRAIT(add_varargs, c)>{});
+ CT_ASSERT(std::is_same<va_cl, TRAIT(add_varargs, cl)>{});
+ CT_ASSERT(std::is_same<va_cr, TRAIT(add_varargs, cr)>{});
+ CT_ASSERT(std::is_same<va_v, TRAIT(add_varargs, v)>{});
+ CT_ASSERT(std::is_same<va_vl, TRAIT(add_varargs, vl)>{});
+ CT_ASSERT(std::is_same<va_vr, TRAIT(add_varargs, vr)>{});
+ CT_ASSERT(std::is_same<va_cv, TRAIT(add_varargs, cv)>{});
+ CT_ASSERT(std::is_same<va_cvl, TRAIT(add_varargs, cvl)>{});
+ CT_ASSERT(std::is_same<va_cvr, TRAIT(add_varargs, cvr)>{});
+
+ CT_ASSERT(std::is_same<va_f, TRAIT(add_varargs, va_f)>{});
+ CT_ASSERT(std::is_same<va_l, TRAIT(add_varargs, va_l)>{});
+ CT_ASSERT(std::is_same<va_r, TRAIT(add_varargs, va_r)>{});
+ CT_ASSERT(std::is_same<va_c, TRAIT(add_varargs, va_c)>{});
+ CT_ASSERT(std::is_same<va_cl, TRAIT(add_varargs, va_cl)>{});
+ CT_ASSERT(std::is_same<va_cr, TRAIT(add_varargs, va_cr)>{});
+ CT_ASSERT(std::is_same<va_v, TRAIT(add_varargs, va_v)>{});
+ CT_ASSERT(std::is_same<va_vl, TRAIT(add_varargs, va_vl)>{});
+ CT_ASSERT(std::is_same<va_vr, TRAIT(add_varargs, va_vr)>{});
+ CT_ASSERT(std::is_same<va_cv, TRAIT(add_varargs, va_cv)>{});
+ CT_ASSERT(std::is_same<va_cvl, TRAIT(add_varargs, va_cvl)>{});
+ CT_ASSERT(std::is_same<va_cvr, TRAIT(add_varargs, va_cvr)>{});
+ }
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void(&)();
+ using va_f = void(&)(...);
+ CT_ASSERT(std::is_same<va_f, TRAIT(add_varargs, f)>{});
+ }
+}
diff --git a/src/boost/libs/callable_traits/test/add_varargs_constraints.cpp b/src/boost/libs/callable_traits/test/add_varargs_constraints.cpp
new file mode 100644
index 00000000..baa63dcd
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/add_varargs_constraints.cpp
@@ -0,0 +1,45 @@
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/add_varargs.hpp>
+#include <tuple>
+#include "test.hpp"
+
+struct foo;
+
+template<typename T>
+struct is_substitution_failure_add_varargs {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(add_varargs, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_add_varargs<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<int>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<int &>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<int (* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<int (foo::* &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<int (foo::* const)()>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<int (foo::* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<int (foo::* volatile)()>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<void>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<void*>::value);
+ CT_ASSERT(is_substitution_failure_add_varargs<void(**)()>::value);
+}
diff --git a/src/boost/libs/callable_traits/test/apply_member_pointer_constraints.cpp b/src/boost/libs/callable_traits/test/apply_member_pointer_constraints.cpp
new file mode 100644
index 00000000..3b896aa3
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/apply_member_pointer_constraints.cpp
@@ -0,0 +1,32 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+#include <boost/callable_traits/apply_member_pointer.hpp>
+#include "test.hpp"
+
+struct foo;
+
+template<typename T, typename U>
+struct is_substitution_failure_apply_member_pointer {
+
+ template<typename, typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A, typename B,
+ typename std::remove_reference<
+ TRAIT(apply_member_pointer, A, B)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T, U>(0))::value;
+};
+
+int main() {
+ CT_ASSERT(is_substitution_failure_apply_member_pointer<void, foo>::value);
+ CT_ASSERT(is_substitution_failure_apply_member_pointer<int, int>::value);
+ CT_ASSERT(is_substitution_failure_apply_member_pointer<void, int>::value);
+}
+
diff --git a/src/boost/libs/callable_traits/test/apply_member_pointer_function.cpp b/src/boost/libs/callable_traits/test/apply_member_pointer_function.cpp
new file mode 100644
index 00000000..e09d4734
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/apply_member_pointer_function.cpp
@@ -0,0 +1,114 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+
+#include <boost/callable_traits/apply_member_pointer.hpp>
+#include "test.hpp"
+
+struct foo;
+
+template<typename Input, typename Output>
+void test_case() {
+ assert_same<TRAIT(apply_member_pointer, Input, foo), Output>();
+}
+
+int main() {
+
+ test_case<int(), int(foo::*)() >();
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ test_case<int() TX_SAFE, int(foo::*)() TX_SAFE >();
+ test_case<int() LREF, int(foo::*)() LREF >();
+ test_case<int() LREF TX_SAFE, int(foo::*)() LREF TX_SAFE >();
+ test_case<int() RREF, int(foo::*)() RREF >();
+ test_case<int() RREF TX_SAFE, int(foo::*)() RREF TX_SAFE >();
+ test_case<int() const, int(foo::*)() const >();
+ test_case<int() const TX_SAFE, int(foo::*)() const TX_SAFE >();
+ test_case<int() const LREF, int(foo::*)() const LREF >();
+ test_case<int() const LREF TX_SAFE, int(foo::*)() const LREF TX_SAFE >();
+ test_case<int() const RREF, int(foo::*)() const RREF >();
+ test_case<int() const RREF TX_SAFE, int(foo::*)() const RREF TX_SAFE >();
+ test_case<int() volatile, int(foo::*)() volatile >();
+ test_case<int() volatile TX_SAFE, int(foo::*)() volatile TX_SAFE >();
+ test_case<int() volatile LREF, int(foo::*)() volatile LREF >();
+ test_case<int() volatile LREF TX_SAFE, int(foo::*)() volatile LREF TX_SAFE >();
+ test_case<int() volatile RREF, int(foo::*)() volatile RREF >();
+ test_case<int() volatile RREF TX_SAFE, int(foo::*)() volatile RREF TX_SAFE >();
+#endif
+
+ test_case<int(int), int(foo::*)(int) >();
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ test_case<int(int) TX_SAFE, int(foo::*)(int) TX_SAFE >();
+ test_case<int(int) LREF, int(foo::*)(int) LREF >();
+ test_case<int(int) LREF TX_SAFE, int(foo::*)(int) LREF TX_SAFE >();
+ test_case<int(int) RREF, int(foo::*)(int) RREF >();
+ test_case<int(int) RREF TX_SAFE, int(foo::*)(int) RREF TX_SAFE >();
+ test_case<int(int) const, int(foo::*)(int) const >();
+ test_case<int(int) const TX_SAFE, int(foo::*)(int) const TX_SAFE >();
+ test_case<int(int) const LREF, int(foo::*)(int) const LREF >();
+ test_case<int(int) const LREF TX_SAFE, int(foo::*)(int) const LREF TX_SAFE >();
+ test_case<int(int) const RREF, int(foo::*)(int) const RREF >();
+ test_case<int(int) const RREF TX_SAFE, int(foo::*)(int) const RREF TX_SAFE >();
+ test_case<int(int) volatile, int(foo::*)(int) volatile >();
+ test_case<int(int) volatile TX_SAFE, int(foo::*)(int) volatile TX_SAFE >();
+ test_case<int(int) volatile LREF, int(foo::*)(int) volatile LREF >();
+ test_case<int(int) volatile LREF TX_SAFE, int(foo::*)(int) volatile LREF TX_SAFE >();
+ test_case<int(int) volatile RREF, int(foo::*)(int) volatile RREF >();
+ test_case<int(int) volatile RREF TX_SAFE, int(foo::*)(int) volatile RREF TX_SAFE >();
+#endif
+
+//MSVC doesn't like varargs on abominable functions
+#ifndef BOOST_CLBL_TRTS_MSVC
+
+ test_case<int(...), int(foo::*)(...) >();
+
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ test_case<int(...) TX_SAFE, int(foo::*)(...) TX_SAFE >();
+ test_case<int(...) LREF, int(foo::*)(...) LREF >();
+ test_case<int(...) LREF TX_SAFE, int(foo::*)(...) LREF TX_SAFE >();
+ test_case<int(...) RREF, int(foo::*)(...) RREF >();
+ test_case<int(...) RREF TX_SAFE, int(foo::*)(...) RREF TX_SAFE >();
+ test_case<int(...) const, int(foo::*)(...) const >();
+ test_case<int(...) const TX_SAFE, int(foo::*)(...) const TX_SAFE >();
+ test_case<int(...) const LREF, int(foo::*)(...) const LREF >();
+ test_case<int(...) const LREF TX_SAFE, int(foo::*)(...) const LREF TX_SAFE >();
+ test_case<int(...) const RREF, int(foo::*)(...) const RREF >();
+ test_case<int(...) const RREF TX_SAFE, int(foo::*)(...) const RREF TX_SAFE >();
+ test_case<int(...) volatile, int(foo::*)(...) volatile >();
+ test_case<int(...) volatile TX_SAFE, int(foo::*)(...) volatile TX_SAFE >();
+ test_case<int(...) volatile LREF, int(foo::*)(...) volatile LREF >();
+ test_case<int(...) volatile LREF TX_SAFE, int(foo::*)(...) volatile LREF TX_SAFE >();
+ test_case<int(...) volatile RREF, int(foo::*)(...) volatile RREF >();
+ test_case<int(...) volatile RREF TX_SAFE, int(foo::*)(...) volatile RREF TX_SAFE >();
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ test_case<int(int, ...), int(foo::*)(int, ...) >();
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ test_case<int(int, ...) TX_SAFE, int(foo::*)(int, ...) TX_SAFE >();
+ test_case<int(int, ...) LREF, int(foo::*)(int, ...) LREF >();
+ test_case<int(int, ...) LREF TX_SAFE, int(foo::*)(int, ...) LREF TX_SAFE >();
+ test_case<int(int, ...) RREF, int(foo::*)(int, ...) RREF >();
+ test_case<int(int, ...) RREF TX_SAFE, int(foo::*)(int, ...) RREF TX_SAFE >();
+ test_case<int(int, ...) const, int(foo::*)(int, ...) const >();
+ test_case<int(int, ...) const TX_SAFE, int(foo::*)(int, ...) const TX_SAFE >();
+ test_case<int(int, ...) const LREF, int(foo::*)(int, ...) const LREF >();
+ test_case<int(int, ...) const LREF TX_SAFE, int(foo::*)(int, ...) const LREF TX_SAFE >();
+ test_case<int(int, ...) const RREF, int(foo::*)(int, ...) const RREF >();
+ test_case<int(int, ...) const RREF TX_SAFE, int(foo::*)(int, ...) const RREF TX_SAFE >();
+ test_case<int(int, ...) volatile, int(foo::*)(int, ...) volatile >();
+ test_case<int(int, ...) volatile TX_SAFE, int(foo::*)(int, ...) volatile TX_SAFE >();
+ test_case<int(int, ...) volatile LREF, int(foo::*)(int, ...) volatile LREF >();
+ test_case<int(int, ...) volatile LREF TX_SAFE, int(foo::*)(int, ...) volatile LREF TX_SAFE >();
+ test_case<int(int, ...) volatile RREF, int(foo::*)(int, ...) volatile RREF >();
+ test_case<int(int, ...) volatile RREF TX_SAFE, int(foo::*)(int, ...) volatile RREF TX_SAFE >();
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+#endif //#ifndef BOOST_CLBL_TRTS_MSVC
+
+}
diff --git a/src/boost/libs/callable_traits/test/apply_member_pointer_pmd.cpp b/src/boost/libs/callable_traits/test/apply_member_pointer_pmd.cpp
new file mode 100644
index 00000000..9395ff49
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/apply_member_pointer_pmd.cpp
@@ -0,0 +1,31 @@
+/*<-
+Copyright (c) 2016 arett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+
+#include <boost/callable_traits/apply_member_pointer.hpp>
+#include "test.hpp"
+
+struct foo;
+
+template<typename Input, typename Output>
+void test_case() {
+ assert_same<TRAIT(apply_member_pointer, Input, foo), Output>();
+}
+
+int main() {
+ test_case<int, int foo::*>();
+ test_case<int &, int foo::*>();
+ test_case<int const, int const foo::*>();
+ test_case<int const &, int const foo::*>();
+ test_case<int volatile, int volatile foo::*>();
+ test_case<int volatile &, int volatile foo::*>();
+
+ //member data - function pointer
+ test_case<int(* const)(), int(* const foo::*)()>();
+ test_case<int(* const &)(), int(* const foo::*)()>();
+}
+
diff --git a/src/boost/libs/callable_traits/test/apply_member_pointer_pmf.cpp b/src/boost/libs/callable_traits/test/apply_member_pointer_pmf.cpp
new file mode 100644
index 00000000..8b9eaf22
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/apply_member_pointer_pmf.cpp
@@ -0,0 +1,95 @@
+/*<-
+Copyright (c) 2016 arett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+
+#include <boost/callable_traits/apply_member_pointer.hpp>
+#include "test.hpp"
+
+struct a;
+struct b;
+
+template<typename Input, typename Output>
+void test_case() {
+ assert_same< TRAIT(apply_member_pointer, Input, b), Output>();
+}
+
+int main() {
+
+ test_case<int(a::*)(), int(b::*)() >();
+ test_case<int(a::*)() TX_SAFE, int(b::*)() TX_SAFE >();
+ test_case<int(a::*)() LREF, int(b::*)() LREF >();
+ test_case<int(a::*)() LREF TX_SAFE, int(b::*)() LREF TX_SAFE >();
+ test_case<int(a::*)() RREF, int(b::*)() RREF >();
+ test_case<int(a::*)() RREF TX_SAFE, int(b::*)() RREF TX_SAFE >();
+ test_case<int(a::*)() const, int(b::*)() const >();
+ test_case<int(a::*)() const TX_SAFE, int(b::*)() const TX_SAFE >();
+ test_case<int(a::*)() const LREF, int(b::*)() const LREF >();
+ test_case<int(a::*)() const LREF TX_SAFE, int(b::*)() const LREF TX_SAFE >();
+ test_case<int(a::*)() const RREF, int(b::*)() const RREF >();
+ test_case<int(a::*)() const RREF TX_SAFE, int(b::*)() const RREF TX_SAFE >();
+ test_case<int(a::*)() volatile, int(b::*)() volatile >();
+ test_case<int(a::*)() volatile TX_SAFE, int(b::*)() volatile TX_SAFE >();
+ test_case<int(a::*)() volatile LREF, int(b::*)() volatile LREF >();
+ test_case<int(a::*)() volatile LREF TX_SAFE, int(b::*)() volatile LREF TX_SAFE >();
+ test_case<int(a::*)() volatile RREF, int(b::*)() volatile RREF >();
+ test_case<int(a::*)() volatile RREF TX_SAFE, int(b::*)() volatile RREF TX_SAFE >();
+ test_case<int(a::*)(int), int(b::*)(int) >();
+ test_case<int(a::*)(int) TX_SAFE, int(b::*)(int) TX_SAFE >();
+ test_case<int(a::*)(int) LREF, int(b::*)(int) LREF >();
+ test_case<int(a::*)(int) LREF TX_SAFE, int(b::*)(int) LREF TX_SAFE >();
+ test_case<int(a::*)(int) RREF, int(b::*)(int) RREF >();
+ test_case<int(a::*)(int) RREF TX_SAFE, int(b::*)(int) RREF TX_SAFE >();
+ test_case<int(a::*)(int) const, int(b::*)(int) const >();
+ test_case<int(a::*)(int) const TX_SAFE, int(b::*)(int) const TX_SAFE >();
+ test_case<int(a::*)(int) const LREF, int(b::*)(int) const LREF >();
+ test_case<int(a::*)(int) const LREF TX_SAFE, int(b::*)(int) const LREF TX_SAFE >();
+ test_case<int(a::*)(int) const RREF, int(b::*)(int) const RREF >();
+ test_case<int(a::*)(int) const RREF TX_SAFE, int(b::*)(int) const RREF TX_SAFE >();
+ test_case<int(a::*)(int) volatile, int(b::*)(int) volatile >();
+ test_case<int(a::*)(int) volatile TX_SAFE, int(b::*)(int) volatile TX_SAFE >();
+ test_case<int(a::*)(int) volatile LREF, int(b::*)(int) volatile LREF >();
+ test_case<int(a::*)(int) volatile LREF TX_SAFE, int(b::*)(int) volatile LREF TX_SAFE >();
+ test_case<int(a::*)(int) volatile RREF, int(b::*)(int) volatile RREF >();
+ test_case<int(a::*)(int) volatile RREF TX_SAFE, int(b::*)(int) volatile RREF TX_SAFE >();
+
+ test_case<int(VA_CC a::*)(...), int(VA_CC b::*)(...) >();
+ test_case<int(VA_CC a::*)(...) TX_SAFE, int(VA_CC b::*)(...) TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) LREF, int(VA_CC b::*)(...) LREF >();
+ test_case<int(VA_CC a::*)(...) LREF TX_SAFE, int(VA_CC b::*)(...) LREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) RREF, int(VA_CC b::*)(...) RREF >();
+ test_case<int(VA_CC a::*)(...) RREF TX_SAFE, int(VA_CC b::*)(...) RREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) const, int(VA_CC b::*)(...) const >();
+ test_case<int(VA_CC a::*)(...) const TX_SAFE, int(VA_CC b::*)(...) const TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) const LREF, int(VA_CC b::*)(...) const LREF >();
+ test_case<int(VA_CC a::*)(...) const LREF TX_SAFE, int(VA_CC b::*)(...) const LREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) const RREF, int(VA_CC b::*)(...) const RREF >();
+ test_case<int(VA_CC a::*)(...) const RREF TX_SAFE, int(VA_CC b::*)(...) const RREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) volatile, int(VA_CC b::*)(...) volatile >();
+ test_case<int(VA_CC a::*)(...) volatile TX_SAFE, int(VA_CC b::*)(...) volatile TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) volatile LREF, int(VA_CC b::*)(...) volatile LREF >();
+ test_case<int(VA_CC a::*)(...) volatile LREF TX_SAFE, int(VA_CC b::*)(...) volatile LREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(...) volatile RREF, int(VA_CC b::*)(...) volatile RREF >();
+ test_case<int(VA_CC a::*)(...) volatile RREF TX_SAFE, int(VA_CC b::*)(...) volatile RREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...), int(VA_CC b::*)(int, ...) >();
+ test_case<int(VA_CC a::*)(int, ...) TX_SAFE, int(VA_CC b::*)(int, ...) TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) LREF, int(VA_CC b::*)(int, ...) LREF >();
+ test_case<int(VA_CC a::*)(int, ...) LREF TX_SAFE, int(VA_CC b::*)(int, ...) LREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) RREF, int(VA_CC b::*)(int, ...) RREF >();
+ test_case<int(VA_CC a::*)(int, ...) RREF TX_SAFE, int(VA_CC b::*)(int, ...) RREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) const, int(VA_CC b::*)(int, ...) const >();
+ test_case<int(VA_CC a::*)(int, ...) const TX_SAFE, int(VA_CC b::*)(int, ...) const TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) const LREF, int(VA_CC b::*)(int, ...) const LREF >();
+ test_case<int(VA_CC a::*)(int, ...) const LREF TX_SAFE, int(VA_CC b::*)(int, ...) const LREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) const RREF, int(VA_CC b::*)(int, ...) const RREF >();
+ test_case<int(VA_CC a::*)(int, ...) const RREF TX_SAFE, int(VA_CC b::*)(int, ...) const RREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) volatile, int(VA_CC b::*)(int, ...) volatile >();
+ test_case<int(VA_CC a::*)(int, ...) volatile TX_SAFE, int(VA_CC b::*)(int, ...) volatile TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) volatile LREF, int(VA_CC b::*)(int, ...) volatile LREF >();
+ test_case<int(VA_CC a::*)(int, ...) volatile LREF TX_SAFE, int(VA_CC b::*)(int, ...) volatile LREF TX_SAFE >();
+ test_case<int(VA_CC a::*)(int, ...) volatile RREF, int(VA_CC b::*)(int, ...) volatile RREF >();
+ test_case<int(VA_CC a::*)(int, ...) volatile RREF TX_SAFE, int(VA_CC b::*)(int, ...) volatile RREF TX_SAFE >();
+}
diff --git a/src/boost/libs/callable_traits/test/args.cpp b/src/boost/libs/callable_traits/test/args.cpp
new file mode 100644
index 00000000..b3f5138a
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/args.cpp
@@ -0,0 +1,67 @@
+/*
+
+Copyright Barrett Adair 2015-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <type_traits>
+#include <cstdint>
+#include <memory>
+#include <boost/callable_traits.hpp>
+#include "test.hpp"
+
+
+struct foo1 {
+ int bar(char, float&, int = 0) { return{}; }
+};
+
+struct foo2 {
+ int bar(char, float&, int = 0, ...) { return{}; }
+};
+
+struct foo3 {
+ int operator()(char, float&, int = 0) { return{}; }
+};
+
+struct foo4 {
+ int operator()(char, float&, int = 0, ...) { return{}; }
+};
+
+int foo5(char, float&, int = 0) { return{}; }
+
+int foo6(char, float&, int = 0, ...) { return{}; }
+
+struct foo7 {
+ int bar() { return{}; }
+};
+
+using std::is_same;
+
+int main() {
+
+ {
+ using pmf = decltype(&foo1::bar);
+ using args_t = TRAIT(args, pmf);
+ CT_ASSERT(is_same<args_t, std::tuple<foo1&, char, float&, int>>{});
+ } {
+ using pmf = decltype(&foo2::bar);
+ using args_t = TRAIT(args, pmf);
+ CT_ASSERT(is_same<args_t, std::tuple<foo2&, char, float&, int>>{});
+ } {
+ using args_t = TRAIT(args, foo3);
+ CT_ASSERT(is_same<args_t, std::tuple<char, float&, int>>{});
+ } {
+ using args_t = TRAIT(args, foo4);
+ CT_ASSERT(is_same<args_t, std::tuple<char, float&, int>>{});
+ } {
+ using args_t = TRAIT(args, decltype(foo5));
+ CT_ASSERT(is_same<args_t, std::tuple<char, float&, int>>{});
+ } {
+ using args_t = TRAIT(args, decltype(foo6));
+ CT_ASSERT(is_same<args_t, std::tuple<char, float&, int>>{});
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/callable_traits/test/args_constraints.cpp b/src/boost/libs/callable_traits/test/args_constraints.cpp
new file mode 100644
index 00000000..ef651cdb
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/args_constraints.cpp
@@ -0,0 +1,46 @@
+
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/args.hpp>
+#include "test.hpp"
+
+struct foo;
+
+template<typename T>
+struct is_substitution_failure_args {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename U,
+ TRAIT(boost::callable_traits::args, U, std::tuple)* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+int main() {
+
+ CT_ASSERT(is_substitution_failure_args<int>::value);
+ CT_ASSERT(is_substitution_failure_args<int &>::value);
+ CT_ASSERT(is_substitution_failure_args<int (** const &)()>::value);
+ CT_ASSERT(is_substitution_failure_args<int (foo::** &)()>::value);
+ CT_ASSERT(is_substitution_failure_args<int (foo::** const)()>::value);
+ CT_ASSERT(is_substitution_failure_args<int (foo::** const &)()>::value);
+ CT_ASSERT(is_substitution_failure_args<int (foo::** volatile)()>::value);
+ CT_ASSERT(!is_substitution_failure_args<int (* const &)()>::value);
+ CT_ASSERT(!is_substitution_failure_args<int (foo::* &)()>::value);
+ CT_ASSERT(!is_substitution_failure_args<int (foo::* const)()>::value);
+ CT_ASSERT(!is_substitution_failure_args<int (foo::* const &)()>::value);
+ CT_ASSERT(!is_substitution_failure_args<int (foo::* volatile)()>::value);
+ auto lambda = [](){};
+ CT_ASSERT(!is_substitution_failure_args<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_args<void>::value);
+}
+
diff --git a/src/boost/libs/callable_traits/test/class_of.cpp b/src/boost/libs/callable_traits/test/class_of.cpp
new file mode 100644
index 00000000..2048a33f
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/class_of.cpp
@@ -0,0 +1,52 @@
+#include <tuple>
+#include <utility>
+#include <type_traits>
+#include <boost/callable_traits/class_of.hpp>
+#include "test.hpp"
+
+struct foo;
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using test = TRAIT(class_of, f);
+ using expect = foo;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = void(foo::*)() const;
+ using test = TRAIT(class_of, f);
+ using expect = foo;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = void(foo::*)() volatile;
+ using test = TRAIT(class_of, f);
+ using expect = foo;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int, ...) const volatile;
+ using test = TRAIT(class_of, f);
+ using expect = foo;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = int foo::*;
+ using test = TRAIT(class_of, f);
+ using expect = foo;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = const int foo::*;
+ using test = TRAIT(class_of, f);
+ using expect = foo;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+}
diff --git a/src/boost/libs/callable_traits/test/class_of_constraints.cpp b/src/boost/libs/callable_traits/test/class_of_constraints.cpp
new file mode 100644
index 00000000..225a0359
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/class_of_constraints.cpp
@@ -0,0 +1,45 @@
+
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/class_of.hpp>
+#include "test.hpp"
+
+struct foo;
+
+template<typename T>
+struct is_substitution_failure_class_of {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(class_of, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_class_of<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_class_of<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_class_of<void>::value);
+ CT_ASSERT(is_substitution_failure_class_of<void*>::value);
+ CT_ASSERT(is_substitution_failure_class_of<int>::value);
+ CT_ASSERT(is_substitution_failure_class_of<int &>::value);
+ CT_ASSERT(is_substitution_failure_class_of<int()>::value);
+ CT_ASSERT(is_substitution_failure_class_of<int(*)()>::value);
+ CT_ASSERT(is_substitution_failure_class_of<int(**)()>::value);
+ CT_ASSERT(is_substitution_failure_class_of<int(&)()>::value);
+ CT_ASSERT(is_substitution_failure_class_of<int (foo::** const)()>::value);
+}
+
diff --git a/src/boost/libs/callable_traits/test/collapse_flags.cpp b/src/boost/libs/callable_traits/test/collapse_flags.cpp
new file mode 100644
index 00000000..9ad52448
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/collapse_flags.cpp
@@ -0,0 +1,38 @@
+
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <boost/callable_traits/detail/qualifier_flags.hpp>
+#include "test.hpp"
+
+
+using namespace boost::callable_traits;
+using namespace boost::callable_traits::detail;
+
+int main() {
+
+ // boost::callable_traits::detail::collapse_flags emulates the C++11
+ // reference collapsing rules. Here, we test that behavior.
+
+ using rref_plus_lref = collapse_flags<rref_, lref_>;
+ CT_ASSERT(rref_plus_lref::value == lref_);
+
+ using lref_plus_rref = collapse_flags<lref_, rref_>;
+ CT_ASSERT(lref_plus_rref::value == lref_);
+
+ using lref_plus_lref = collapse_flags<lref_, lref_>;
+ CT_ASSERT(lref_plus_lref::value == lref_);
+
+ using rref_plus_rref = collapse_flags<rref_, rref_>;
+ CT_ASSERT(rref_plus_rref::value == rref_);
+
+ using const_plus_rref = collapse_flags<const_, rref_>;
+ CT_ASSERT(const_plus_rref::value == (const_ | rref_));
+
+ using const_plus_lref = collapse_flags<const_, lref_>;
+ CT_ASSERT(const_plus_lref::value == (const_ | lref_));
+}
diff --git a/src/boost/libs/callable_traits/test/function_type.cpp b/src/boost/libs/callable_traits/test/function_type.cpp
new file mode 100644
index 00000000..98fa1af8
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/function_type.cpp
@@ -0,0 +1,96 @@
+
+#include <boost/callable_traits/function_type.hpp>
+#include "test.hpp"
+
+int main() {
+
+ struct foo;
+
+ {
+ auto g = [](int, char){};
+ using G = decltype(g);
+ using F = void(int, char);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ CT_ASSERT(std::is_same<function_type_t<G const &>, F>::value);
+ CT_ASSERT(std::is_same<function_type_t<G const &&>, F>::value);
+ CT_ASSERT(std::is_same<function_type_t<G volatile &>, F>::value);
+ CT_ASSERT(std::is_same<function_type_t<G &>, F>::value);
+ CT_ASSERT(std::is_same<function_type_t<G &&>, F>::value);
+ CT_ASSERT(std::is_same<function_type_t<
+ decltype(&G::operator())>, void(G const &, int, char)>::value);
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ {
+ using G = void (int, char, ...) const LREF;
+ using F = void (int, char, ...);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }
+#endif
+
+ {
+ using G = void (*)(int, char) BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER;
+ using F = void (int, char);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = void (* const &)(int, char);
+ using F = void (int, char);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = int (* &&)();
+ using F = int ();
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = int (* &&)();
+ using F = int ();
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = char const * const & (&)(...);
+ using F = char const * const & (...);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ struct G { int operator() (...) volatile; };
+ using F = int (...);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ struct G { int operator() (...) volatile BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; };
+ using F = int (...);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ struct G { int operator() (...) const BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER; };
+ using F = int (...);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = void (foo::* const &)(int, int, int) LREF BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER;
+ using F = void (foo &, int, int, int);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }
+#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+ {
+ using G = void (foo::* const &)(int, int, int) RREF;
+ using F = void (foo &&, int, int, int);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }
+#endif
+ {
+ using G = void (foo::*)(int, int, int) const BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER;
+ using F = void (foo const &, int, int, int);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = void (foo::*)(int, int, int);
+ using F = void (foo &, int, int, int);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = void (foo::*)() BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER;
+ using F = void (foo &);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = void (foo::*)(int, int, int) const BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER;
+ using F = void (foo const &, int, int, int);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }{
+ using G = void (foo::*)(int, int, int, ...) const BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER;
+ using F = void (foo const &, int, int, int, ...);
+ CT_ASSERT(std::is_same<TRAIT(function_type, G), F>::value);
+ }
+}
diff --git a/src/boost/libs/callable_traits/test/function_type_constraints.cpp b/src/boost/libs/callable_traits/test/function_type_constraints.cpp
new file mode 100644
index 00000000..99570dfe
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/function_type_constraints.cpp
@@ -0,0 +1,46 @@
+
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/function_type.hpp>
+#include "test.hpp"
+
+struct foo;
+
+template<typename T>
+struct is_substitution_failure_function_type {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(function_type, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+int main() {
+
+ CT_ASSERT(is_substitution_failure_function_type<int>::value);
+ CT_ASSERT(is_substitution_failure_function_type<int &>::value);
+ CT_ASSERT(is_substitution_failure_function_type<int (foo::** &)()>::value);
+ CT_ASSERT(is_substitution_failure_function_type<int (foo::** const)()>::value);
+ CT_ASSERT(is_substitution_failure_function_type<int (foo::** const &)()>::value);
+ CT_ASSERT(is_substitution_failure_function_type<int (foo::** volatile)()>::value);
+ CT_ASSERT(!is_substitution_failure_function_type<int (foo::* &)()>::value);
+ CT_ASSERT(!is_substitution_failure_function_type<int (foo::* const)()>::value);
+ CT_ASSERT(!is_substitution_failure_function_type<int (foo::* const &)()>::value);
+ CT_ASSERT(!is_substitution_failure_function_type<int (foo::* volatile)()>::value);
+
+ auto lambda = [](){};
+ CT_ASSERT(!is_substitution_failure_function_type<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_function_type<void>::value);
+}
+
diff --git a/src/boost/libs/callable_traits/test/has_member_qualifiers.cpp b/src/boost/libs/callable_traits/test/has_member_qualifiers.cpp
new file mode 100644
index 00000000..9f80c28b
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/has_member_qualifiers.cpp
@@ -0,0 +1,128 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/has_member_qualifiers.hpp>
+#include "test.hpp"
+
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+int main() { return 0; }
+#else
+
+struct foo {};
+
+template<typename T>
+void assert_qualified() {
+ CT_ASSERT( has_member_qualifiers<T>::value);
+}
+
+
+template<typename T>
+void assert_unqualified() {
+ CT_ASSERT(! has_member_qualifiers<T>::value);
+}
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() && ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ assert_unqualified<f>();
+ assert_qualified<l>();
+ assert_qualified<r>();
+ assert_qualified<c>();
+ assert_qualified<cl>();
+ assert_qualified<cr>();
+ assert_qualified<v>();
+ assert_qualified<vl>();
+ assert_qualified<vr>();
+ assert_qualified<cv>();
+ assert_qualified<cvl>();
+ assert_qualified<cvr>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct l { int operator()() & { return 0; } };
+ struct r { int operator()() && { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct cl { int operator()() const & { return 0; } };
+ struct cr { int operator()() const && { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct vl { int operator()() volatile & { return 0; } };
+ struct vr { int operator()() volatile && { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+ struct cvl { int operator()() const volatile & { return 0; } };
+ struct cvr { int operator()() const volatile && { return 0; } };
+
+ assert_unqualified<f>();
+ assert_qualified<l>();
+ assert_qualified<r>();
+ assert_qualified<c>();
+ assert_qualified<cl>();
+ assert_qualified<cr>();
+ assert_qualified<v>();
+ assert_qualified<vl>();
+ assert_qualified<vr>();
+ assert_qualified<cv>();
+ assert_qualified<cvl>();
+ assert_qualified<cvr>();
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() &;
+ using r = void() && ;
+ using c = void() const;
+ using cl = void() const &;
+ using cr = void() const &&;
+ using v = void() volatile;
+ using vl = void() volatile &;
+ using vr = void() volatile &&;
+ using cv = void() const volatile;
+ using cvl = void() const volatile &;
+ using cvr = void() const volatile &&;
+
+ CT_ASSERT(! has_member_qualifiers<f>());
+ CT_ASSERT( has_member_qualifiers<l>());
+ CT_ASSERT( has_member_qualifiers<r>());
+ CT_ASSERT( has_member_qualifiers<c>());
+ CT_ASSERT( has_member_qualifiers<cl>());
+ CT_ASSERT( has_member_qualifiers<cr>());
+ CT_ASSERT( has_member_qualifiers<v>());
+ CT_ASSERT( has_member_qualifiers<vl>());
+ CT_ASSERT( has_member_qualifiers<vr>());
+ CT_ASSERT( has_member_qualifiers<cv>());
+ CT_ASSERT( has_member_qualifiers<cvl>());
+ CT_ASSERT( has_member_qualifiers<cvr>());
+ }
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ using f_ptr = void(*)();
+ assert_unqualified<f_ptr>();
+ assert_unqualified<f_ptr foo::*>();
+ assert_unqualified<int foo::*>();
+ assert_unqualified<void(&)()>();
+}
+
+#endif //#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
diff --git a/src/boost/libs/callable_traits/test/has_member_qualifiers_simple.cpp b/src/boost/libs/callable_traits/test/has_member_qualifiers_simple.cpp
new file mode 100644
index 00000000..c6717c98
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/has_member_qualifiers_simple.cpp
@@ -0,0 +1,58 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/has_member_qualifiers.hpp>
+#include "test.hpp"
+
+
+
+struct foo {};
+
+template<typename T>
+void assert_qualified() {
+ CT_ASSERT( has_member_qualifiers<T>::value);
+}
+
+template<typename T>
+void assert_unqualified() {
+ CT_ASSERT(! has_member_qualifiers<T>::value);
+}
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using c = void(foo::*)() const;
+ using v = void(foo::*)() volatile;
+ using cv = void(foo::*)() const volatile;
+
+ assert_unqualified<f>();
+ assert_qualified<c>();
+ assert_qualified<v>();
+ assert_qualified<cv>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+
+ assert_unqualified<f>();
+ assert_qualified<c>();
+ assert_qualified<v>();
+ assert_qualified<cv>();
+ }
+
+ using f_ptr = void(*)();
+ assert_unqualified<f_ptr>();
+ assert_unqualified<f_ptr foo::*>();
+ assert_unqualified<int foo::*>();
+ assert_unqualified<void(&)()>();
+}
diff --git a/src/boost/libs/callable_traits/test/has_varargs.cpp b/src/boost/libs/callable_traits/test/has_varargs.cpp
new file mode 100644
index 00000000..b187a6fb
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/has_varargs.cpp
@@ -0,0 +1,214 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/has_varargs.hpp>
+#include "test.hpp"
+
+struct foo {};
+
+template<typename T>
+void assert_has_varargs() {
+
+ CT_ASSERT( has_varargs<T>::value);
+}
+
+template<typename T>
+void assert_not_has_varargs() {
+
+ CT_ASSERT(! has_varargs<T>::value);
+}
+
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() LREF;
+ using r = void(foo::*)() RREF ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const LREF;
+ using cr = void(foo::*)() const RREF;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile LREF;
+ using vr = void(foo::*)() volatile RREF;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile LREF;
+ using cvr = void(foo::*)() const volatile RREF;
+
+ assert_not_has_varargs<f>();
+ assert_not_has_varargs<l>();
+ assert_not_has_varargs<r>();
+ assert_not_has_varargs<c>();
+ assert_not_has_varargs<cl>();
+ assert_not_has_varargs<cr>();
+ assert_not_has_varargs<v>();
+ assert_not_has_varargs<vl>();
+ assert_not_has_varargs<vr>();
+ assert_not_has_varargs<cv>();
+ assert_not_has_varargs<cvl>();
+ assert_not_has_varargs<cvr>();
+ }
+
+ {
+ //a member data pointer to a function pointer
+ //is not treated like a member function pointer
+ using f_ptr = void(*)(...);
+ using f = f_ptr foo::*;
+ assert_not_has_varargs<f>();
+ }
+
+ {
+ using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...);
+ using l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) LREF;
+ using r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) RREF ;
+ using c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const;
+ using cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const LREF;
+ using cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const RREF;
+ using v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile;
+ using vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile LREF;
+ using vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile RREF;
+ using cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile;
+ using cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile LREF;
+ using cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile RREF;
+
+ assert_has_varargs<f>();
+ assert_has_varargs<l>();
+ assert_has_varargs<r>();
+ assert_has_varargs<c>();
+ assert_has_varargs<cl>();
+ assert_has_varargs<cr>();
+ assert_has_varargs<v>();
+ assert_has_varargs<vl>();
+ assert_has_varargs<vr>();
+ assert_has_varargs<cv>();
+ assert_has_varargs<cvl>();
+ assert_has_varargs<cvr>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct l { int operator()() LREF { return 0; } };
+ struct r { int operator()() RREF { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct cl { int operator()() const LREF { return 0; } };
+ struct cr { int operator()() const RREF { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct vl { int operator()() volatile LREF { return 0; } };
+ struct vr { int operator()() volatile RREF { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+ struct cvl { int operator()() const volatile LREF { return 0; } };
+ struct cvr { int operator()() const volatile RREF { return 0; } };
+
+ assert_not_has_varargs<f>();
+ assert_not_has_varargs<l>();
+ assert_not_has_varargs<r>();
+ assert_not_has_varargs<c>();
+ assert_not_has_varargs<cl>();
+ assert_not_has_varargs<cr>();
+ assert_not_has_varargs<v>();
+ assert_not_has_varargs<vl>();
+ assert_not_has_varargs<vr>();
+ assert_not_has_varargs<cv>();
+ assert_not_has_varargs<cvl>();
+ assert_not_has_varargs<cvr>();
+ }
+
+ {
+ struct f { int operator()(...) { return 0; } };
+ struct l { int operator()(...) LREF { return 0; } };
+ struct r { int operator()(...) RREF { return 0; } };
+ struct c { int operator()(...) const { return 0; } };
+ struct cl { int operator()(...) const LREF { return 0; } };
+ struct cr { int operator()(...) const RREF { return 0; } };
+ struct v { int operator()(...) volatile { return 0; } };
+ struct vl { int operator()(...) volatile LREF { return 0; } };
+ struct vr { int operator()(...) volatile RREF { return 0; } };
+ struct cv { int operator()(...) const volatile { return 0; } };
+ struct cvl { int operator()(...) const volatile LREF { return 0; } };
+ struct cvr { int operator()(...) const volatile RREF { return 0; } };
+
+ assert_has_varargs<f>();
+ assert_has_varargs<l>();
+ assert_has_varargs<r>();
+ assert_has_varargs<c>();
+ assert_has_varargs<cl>();
+ assert_has_varargs<cr>();
+ assert_has_varargs<v>();
+ assert_has_varargs<vl>();
+ assert_has_varargs<vr>();
+ assert_has_varargs<cv>();
+ assert_has_varargs<cvl>();
+ assert_has_varargs<cvr>();
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ CT_ASSERT(! has_varargs<f>());
+ CT_ASSERT(! has_varargs<l>());
+ CT_ASSERT(! has_varargs<r>());
+ CT_ASSERT(! has_varargs<c>());
+ CT_ASSERT(! has_varargs<cl>());
+ CT_ASSERT(! has_varargs<cr>());
+ CT_ASSERT(! has_varargs<v>());
+ CT_ASSERT(! has_varargs<vl>());
+ CT_ASSERT(! has_varargs<vr>());
+ CT_ASSERT(! has_varargs<cv>());
+ CT_ASSERT(! has_varargs<cvl>());
+ CT_ASSERT(! has_varargs<cvr>());
+ }
+
+ {
+ using f = void(...);
+ using l = void(...) LREF;
+ using r = void(...) RREF ;
+ using c = void(...) const;
+ using cl = void(...) const LREF;
+ using cr = void(...) const RREF;
+ using v = void(...) volatile;
+ using vl = void(...) volatile LREF;
+ using vr = void(...) volatile RREF;
+ using cv = void(...) const volatile;
+ using cvl = void(...) const volatile LREF;
+ using cvr = void(...) const volatile RREF;
+
+ CT_ASSERT( has_varargs<f>());
+ CT_ASSERT( has_varargs<l>());
+ CT_ASSERT( has_varargs<r>());
+ CT_ASSERT( has_varargs<c>());
+ CT_ASSERT( has_varargs<cl>());
+ CT_ASSERT( has_varargs<cr>());
+ CT_ASSERT( has_varargs<v>());
+ CT_ASSERT( has_varargs<vl>());
+ CT_ASSERT( has_varargs<vr>());
+ CT_ASSERT( has_varargs<cv>());
+ CT_ASSERT( has_varargs<cvl>());
+ CT_ASSERT( has_varargs<cvr>());
+ }
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ assert_not_has_varargs<void(*)()>();
+ assert_has_varargs<void(*)(...)>();
+ assert_not_has_varargs<void(&)()>();
+ assert_has_varargs<void(&)(...)>();
+}
diff --git a/src/boost/libs/callable_traits/test/has_void_return.cpp b/src/boost/libs/callable_traits/test/has_void_return.cpp
new file mode 100644
index 00000000..416ccdc1
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/has_void_return.cpp
@@ -0,0 +1,58 @@
+#include <tuple>
+#include <utility>
+#include <type_traits>
+#include <boost/callable_traits/has_void_return.hpp>
+#include "test.hpp"
+
+struct foo;
+
+template<typename T>
+void assert_void_return() {
+ CT_ASSERT(has_void_return<T>::value);
+}
+
+template<typename T>
+void assert_not_void_return() {
+ CT_ASSERT(!has_void_return<T>::value);
+}
+
+int main() {
+
+ assert_void_return<void()>();
+ assert_void_return<void(...)>();
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ assert_void_return<void(int) const>();
+ assert_void_return<void(int) volatile>();
+ assert_void_return<void(int) const volatile>();
+#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ assert_void_return<void(foo::*)()>();
+ assert_void_return<void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int, ...)>();
+ assert_void_return<void(foo::*)(int) const>();
+ assert_void_return<void(foo::*)() volatile>();
+ assert_void_return<void(foo::*)(int) const volatile>();
+
+ assert_void_return<void(*)()>();
+ assert_void_return<void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC *)(int, ...)>();
+
+ assert_void_return<void(&)(int)>();
+ assert_void_return<void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC &)(...)>();
+
+ auto lambda = []{};
+ assert_void_return<decltype(lambda)>();
+
+ assert_not_void_return<void>();
+ assert_not_void_return<int>();
+ assert_not_void_return<void*>();
+ assert_not_void_return<void* foo::*>();
+ assert_not_void_return<void(** const)()>();
+ assert_not_void_return<int()>();
+ assert_not_void_return<int(*)()>();
+ assert_not_void_return<int(&)()>();
+ assert_not_void_return<int(foo::*)()>();
+ assert_not_void_return<int(foo::*)() const>();
+ assert_not_void_return<int(foo::*)() volatile>();
+ assert_not_void_return<int(foo::*)() const volatile>();
+ assert_not_void_return<void(foo::**)()>();
+}
diff --git a/src/boost/libs/callable_traits/test/is_const_member.cpp b/src/boost/libs/callable_traits/test/is_const_member.cpp
new file mode 100644
index 00000000..5f9c0490
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_const_member.cpp
@@ -0,0 +1,121 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/is_const_member.hpp>
+#include "test.hpp"
+
+struct foo {};
+
+template<typename T>
+void assert_const_qualified() {
+ CT_ASSERT( is_const_member<T>());
+}
+
+
+template<typename T>
+void assert_not_const_qualified() {
+ CT_ASSERT(! is_const_member<T>());
+}
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() LREF;
+ using r = void(foo::*)() RREF ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const LREF;
+ using cr = void(foo::*)() const RREF;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile LREF;
+ using vr = void(foo::*)() volatile RREF;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile LREF;
+ using cvr = void(foo::*)() const volatile RREF;
+
+ assert_not_const_qualified<f>();
+ assert_not_const_qualified<l>();
+ assert_not_const_qualified<r>();
+ assert_const_qualified<c>();
+ assert_const_qualified<cl>();
+ assert_const_qualified<cr>();
+ assert_not_const_qualified<v>();
+ assert_not_const_qualified<vl>();
+ assert_not_const_qualified<vr>();
+ assert_const_qualified<cv>();
+ assert_const_qualified<cvl>();
+ assert_const_qualified<cvr>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct l { int operator()() LREF { return 0; } };
+ struct r { int operator()() RREF { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct cl { int operator()() const LREF { return 0; } };
+ struct cr { int operator()() const RREF { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct vl { int operator()() volatile LREF { return 0; } };
+ struct vr { int operator()() volatile RREF { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+ struct cvl { int operator()() const volatile LREF { return 0; } };
+ struct cvr { int operator()() const volatile RREF { return 0; } };
+
+ assert_not_const_qualified<f>();
+ assert_not_const_qualified<l>();
+ assert_not_const_qualified<r>();
+ assert_const_qualified<c>();
+ assert_const_qualified<cl>();
+ assert_const_qualified<cr>();
+ assert_not_const_qualified<v>();
+ assert_not_const_qualified<vl>();
+ assert_not_const_qualified<vr>();
+ assert_const_qualified<cv>();
+ assert_const_qualified<cvl>();
+ assert_const_qualified<cvr>();
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ CT_ASSERT(! is_const_member<f>());
+ CT_ASSERT(! is_const_member<l>());
+ CT_ASSERT(! is_const_member<r>());
+ CT_ASSERT( is_const_member<c>());
+ CT_ASSERT( is_const_member<cl>());
+ CT_ASSERT( is_const_member<cr>());
+ CT_ASSERT(! is_const_member<v>());
+ CT_ASSERT(! is_const_member<vl>());
+ CT_ASSERT(! is_const_member<vr>());
+ CT_ASSERT( is_const_member<cv>());
+ CT_ASSERT( is_const_member<cvl>());
+ CT_ASSERT( is_const_member<cvr>());
+ }
+
+#endif
+
+ using f_ptr = void(*)();
+ assert_not_const_qualified<f_ptr>();
+ assert_not_const_qualified<f_ptr foo::*>();
+ assert_not_const_qualified<int foo::*>();
+ assert_not_const_qualified<void(&)()>();
+}
diff --git a/src/boost/libs/callable_traits/test/is_cv_member.cpp b/src/boost/libs/callable_traits/test/is_cv_member.cpp
new file mode 100644
index 00000000..b1af7558
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_cv_member.cpp
@@ -0,0 +1,121 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/is_cv_member.hpp>
+#include "test.hpp"
+
+struct foo {};
+
+template<typename T>
+void assert_cv_qualified() {
+ CT_ASSERT( is_cv_member<T>());
+}
+
+
+template<typename T>
+void assert_not_cv_qualified() {
+ CT_ASSERT(! is_cv_member<T>());
+}
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() LREF;
+ using r = void(foo::*)() RREF ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const LREF;
+ using cr = void(foo::*)() const RREF;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile LREF;
+ using vr = void(foo::*)() volatile RREF;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile LREF;
+ using cvr = void(foo::*)() const volatile RREF;
+
+ assert_not_cv_qualified<f>();
+ assert_not_cv_qualified<l>();
+ assert_not_cv_qualified<r>();
+ assert_not_cv_qualified<c>();
+ assert_not_cv_qualified<cl>();
+ assert_not_cv_qualified<cr>();
+ assert_not_cv_qualified<v>();
+ assert_not_cv_qualified<vl>();
+ assert_not_cv_qualified<vr>();
+ assert_cv_qualified<cv>();
+ assert_cv_qualified<cvl>();
+ assert_cv_qualified<cvr>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct l { int operator()() LREF { return 0; } };
+ struct r { int operator()() RREF { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct cl { int operator()() const LREF { return 0; } };
+ struct cr { int operator()() const RREF { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct vl { int operator()() volatile LREF { return 0; } };
+ struct vr { int operator()() volatile RREF { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+ struct cvl { int operator()() const volatile LREF { return 0; } };
+ struct cvr { int operator()() const volatile RREF { return 0; } };
+
+ assert_not_cv_qualified<f>();
+ assert_not_cv_qualified<l>();
+ assert_not_cv_qualified<r>();
+ assert_not_cv_qualified<c>();
+ assert_not_cv_qualified<cl>();
+ assert_not_cv_qualified<cr>();
+ assert_not_cv_qualified<v>();
+ assert_not_cv_qualified<vl>();
+ assert_not_cv_qualified<vr>();
+ assert_cv_qualified<cv>();
+ assert_cv_qualified<cvl>();
+ assert_cv_qualified<cvr>();
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ CT_ASSERT(! is_cv_member<f>());
+ CT_ASSERT(! is_cv_member<l>());
+ CT_ASSERT(! is_cv_member<r>());
+ CT_ASSERT(! is_cv_member<c>());
+ CT_ASSERT(! is_cv_member<cl>());
+ CT_ASSERT(! is_cv_member<cr>());
+ CT_ASSERT(! is_cv_member<v>());
+ CT_ASSERT(! is_cv_member<vl>());
+ CT_ASSERT(! is_cv_member<vr>());
+ CT_ASSERT( is_cv_member<cv>());
+ CT_ASSERT( is_cv_member<cvl>());
+ CT_ASSERT( is_cv_member<cvr>());
+ }
+
+#endif
+
+ using f_ptr = void(*)();
+ assert_not_cv_qualified<f_ptr>();
+ assert_not_cv_qualified<f_ptr foo::*>();
+ assert_not_cv_qualified<int foo::*>();
+ assert_not_cv_qualified<void(&)()>();
+}
diff --git a/src/boost/libs/callable_traits/test/is_invocable.cpp b/src/boost/libs/callable_traits/test/is_invocable.cpp
new file mode 100644
index 00000000..b9fa0ea4
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_invocable.cpp
@@ -0,0 +1,381 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/is_invocable.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_CLBL_TRTS_GCC_OLDER_THAN_4_9_2
+//gcc < 4.9 doesn't like the invoke_case pattern used here
+int main(){}
+#else
+
+template<typename T>
+struct tag {
+ using type = T;
+};
+
+template<bool Expect, typename... Args>
+struct invoke_case {
+ template<typename Callable>
+ void operator()(tag<Callable>) const {
+
+// when available, test parity with std implementation (c++2a breaks our expectations but we still match std impl)
+#if defined(__cpp_lib_is_invocable) || __cplusplus >= 201707L
+ CT_ASSERT((std::is_invocable<Callable, Args...>() == boost::callable_traits::is_invocable<Callable, Args...>()));
+#else
+ CT_ASSERT((Expect == boost::callable_traits::is_invocable<Callable, Args...>()));
+#endif
+
+ }
+};
+
+template<typename Callable, typename... InvokeCases>
+void run_tests() {
+ using ignored = int[];
+ ignored x {(InvokeCases{}(tag<Callable>{}),0)..., 0};
+ (void)x;
+}
+
+struct foo {};
+
+int main() {
+
+ run_tests<void(foo::*)()
+ ,invoke_case<true, foo>
+ ,invoke_case<true, foo*>
+ ,invoke_case<true, foo&>
+ ,invoke_case<true, foo&&>
+ ,invoke_case<true, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void(foo::*)() LREF
+ ,invoke_case<false, foo>
+ ,invoke_case<true, foo*>
+ ,invoke_case<true, foo&>
+ ,invoke_case<false, foo&&>
+ ,invoke_case<true, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void(foo::*)() RREF
+ ,invoke_case<true, foo>
+ ,invoke_case<false, foo*>
+ ,invoke_case<false, foo&>
+ ,invoke_case<true, foo&&>
+ ,invoke_case<false, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void(foo::*)() const
+ ,invoke_case<true, foo>
+ ,invoke_case<true, foo*>
+ ,invoke_case<true, foo&>
+ ,invoke_case<true, foo&&>
+ ,invoke_case<true, std::reference_wrapper<foo>>
+ ,invoke_case<true, foo const>
+ ,invoke_case<true, foo const*>
+ ,invoke_case<true, foo const&>
+ ,invoke_case<true, foo const&&>
+ ,invoke_case<true, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+// MSVC doesn't handle cv + ref qualifiers in expression sfinae correctly
+#ifndef BOOST_CLBL_TRTS_MSVC
+
+ run_tests<void(foo::*)() const LREF
+ ,invoke_case<false, foo>
+ ,invoke_case<true, foo*>
+ ,invoke_case<true, foo&>
+ ,invoke_case<false, foo&&>
+ ,invoke_case<true, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<true, foo const*>
+ ,invoke_case<true, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<true, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void(foo::*)() const RREF
+ ,invoke_case<true, foo>
+ ,invoke_case<false, foo*>
+ ,invoke_case<false, foo&>
+ ,invoke_case<true, foo&&>
+ ,invoke_case<false, std::reference_wrapper<foo>>
+ ,invoke_case<true, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<true, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+#endif // #ifndef BOOST_CLBL_TRTS_MSVC
+
+ run_tests<int
+ ,invoke_case<false, foo>
+ ,invoke_case<false, foo*>
+ ,invoke_case<false, foo&>
+ ,invoke_case<false, foo&&>
+ ,invoke_case<false, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+ auto f = [](int){};
+
+ run_tests<decltype(f)
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(f)&
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(f))
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(f))&
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(f))&&
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(f)) const &
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(f)) const &&
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(f)&&
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(f) const &
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(f) const &&
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ auto g = [](){};
+
+ run_tests<decltype(g)
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(g)&
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(g))
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(g))&
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(g))&&
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(g)) const &
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(std::ref(g)) const &&
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(g)&&
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(g) const &
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<decltype(g) const &&
+ ,invoke_case<true>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+// libc++ requires constructible types be passed to std::is_invocable
+#ifndef _LIBCPP_VERSION
+
+ run_tests<void(int)
+ ,invoke_case<true, int>
+ ,invoke_case<true, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<void(int) const
+ ,invoke_case<false, int>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<void()
+ ,invoke_case<false, int>
+ ,invoke_case<false, char>
+ ,invoke_case<false, void*>
+ >();
+
+ run_tests<void
+ ,invoke_case<false, foo>
+ ,invoke_case<false, foo*>
+ ,invoke_case<false, foo&>
+ ,invoke_case<false, foo&&>
+ ,invoke_case<false, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+#endif
+
+ run_tests<int
+ ,invoke_case<false, foo>
+ ,invoke_case<false, foo*>
+ ,invoke_case<false, foo&>
+ ,invoke_case<false, foo&&>
+ ,invoke_case<false, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void*
+ ,invoke_case<false, foo>
+ ,invoke_case<false, foo*>
+ ,invoke_case<false, foo&>
+ ,invoke_case<false, foo&&>
+ ,invoke_case<false, std::reference_wrapper<foo>>
+ ,invoke_case<false, foo const>
+ ,invoke_case<false, foo const*>
+ ,invoke_case<false, foo const&>
+ ,invoke_case<false, foo const&&>
+ ,invoke_case<false, std::reference_wrapper<foo const>>
+ ,invoke_case<false, foo, int>
+ ,invoke_case<false, foo*, int>
+ ,invoke_case<false, foo&, int>
+ ,invoke_case<false, foo&&, int>
+ ,invoke_case<false, std::reference_wrapper<foo>, int>
+ >();
+}
+
+#endif //#ifdef BOOST_CLBL_TRTS_GCC_OLDER_THAN_4_9_2
diff --git a/src/boost/libs/callable_traits/test/is_invocable_r.cpp b/src/boost/libs/callable_traits/test/is_invocable_r.cpp
new file mode 100644
index 00000000..f64de2ec
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_invocable_r.cpp
@@ -0,0 +1,328 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/is_invocable.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_CLBL_TRTS_GCC_OLDER_THAN_4_9_2
+//gcc < 4.9 doesn't like the invoke_case pattern used here
+int main(){}
+#else
+
+template<typename T>
+struct tag {
+ using type = T;
+};
+
+template<bool Expect, typename Ret, typename... Args>
+struct invoke_case {
+ template<typename Callable>
+ void operator()(tag<Callable>) const {
+
+// when available, test parity with std implementation (c++2a breaks our expectations but we still match std impl)
+#if defined(__cpp_lib_is_invocable) || __cplusplus >= 201707L
+ CT_ASSERT((std::is_invocable_r<Ret, Callable, Args...>() == boost::callable_traits::is_invocable_r<Ret, Callable, Args...>()));
+#else
+ CT_ASSERT((Expect == boost::callable_traits::is_invocable_r<Ret, Callable, Args...>()));
+#endif
+
+ }
+};
+
+template<typename Callable, typename... InvokeCases>
+void run_tests() {
+ using ignored = int[];
+ ignored x {(InvokeCases{}(tag<Callable>{}),0)..., 0};
+ (void)x;
+}
+
+struct foo {};
+
+int main() {
+
+ run_tests<void(foo::*)()
+ ,invoke_case<true, void, foo>
+ ,invoke_case<true, void, foo*>
+ ,invoke_case<true, void, foo&>
+ ,invoke_case<true, void, foo&&>
+ ,invoke_case<true, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, int, foo>
+ ,invoke_case<false, int, foo*>
+ ,invoke_case<false, int, foo&>
+ ,invoke_case<false, int, foo&&>
+ ,invoke_case<false, int, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ ,invoke_case<false, int, foo const>
+ ,invoke_case<false, int, foo const*>
+ ,invoke_case<false, int, foo const&>
+ ,invoke_case<false, int, foo const&&>
+ ,invoke_case<false, int, std::reference_wrapper<foo const>>
+ ,invoke_case<false, int, foo, int>
+ ,invoke_case<false, int, foo*, int>
+ ,invoke_case<false, int, foo&, int>
+ ,invoke_case<false, int, foo&&, int>
+ ,invoke_case<false, int, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<char(foo::*)()
+ ,invoke_case<true, void, foo>
+ ,invoke_case<true, void, foo*>
+ ,invoke_case<true, void, foo&>
+ ,invoke_case<true, void, foo&&>
+ ,invoke_case<true, void, std::reference_wrapper<foo>>
+ ,invoke_case<true, int, foo>
+ ,invoke_case<true, int, foo*>
+ ,invoke_case<true, int, foo&>
+ ,invoke_case<true, int, foo&&>
+ ,invoke_case<true, int, std::reference_wrapper<foo>>
+ >();
+
+ run_tests<void(foo::*)() LREF
+ ,invoke_case<false, void, foo>
+ ,invoke_case<true, void, foo*>
+ ,invoke_case<true, void, foo&>
+ ,invoke_case<false, int, foo*>
+ ,invoke_case<false, int, foo&>
+ ,invoke_case<false, void, foo&&>
+ ,invoke_case<true, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, int, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void(foo::*)() RREF
+ ,invoke_case<true, void, foo>
+ ,invoke_case<false, int, foo>
+ ,invoke_case<false, void, foo*>
+ ,invoke_case<false, void, foo&>
+ ,invoke_case<true, void, foo&&>
+ ,invoke_case<false, int, foo&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void(foo::*)() const
+ ,invoke_case<true, void, foo>
+ ,invoke_case<true, void, foo*>
+ ,invoke_case<true, void, foo&>
+ ,invoke_case<true, void, foo&&>
+ ,invoke_case<true, void, std::reference_wrapper<foo>>
+ ,invoke_case<true, void, foo const>
+ ,invoke_case<true, void, foo const*>
+ ,invoke_case<true, void, foo const&>
+ ,invoke_case<true, void, foo const&&>
+ ,invoke_case<true, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, int, foo>
+ ,invoke_case<false, int, foo*>
+ ,invoke_case<false, int, foo&>
+ ,invoke_case<false, int, foo&&>
+ ,invoke_case<false, int, std::reference_wrapper<foo>>
+ ,invoke_case<false, int, foo const>
+ ,invoke_case<false, int, foo const*>
+ ,invoke_case<false, int, foo const&>
+ ,invoke_case<false, int, foo const&&>
+ ,invoke_case<false, int, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+
+// MSVC doesn't handle cv + ref qualifiers in expression sfinae correctly
+#ifndef BOOST_CLBL_TRTS_MSVC
+
+ run_tests<void(foo::*)() const LREF
+ ,invoke_case<false, void, foo>
+ ,invoke_case<true, void, foo*>
+ ,invoke_case<true, void, foo&>
+ ,invoke_case<false, int, foo*>
+ ,invoke_case<false, int, foo&>
+ ,invoke_case<false, void, foo&&>
+ ,invoke_case<true, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, int, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<true, void, foo const*>
+ ,invoke_case<true, void, foo const&>
+ ,invoke_case<false, int, foo const*>
+ ,invoke_case<false, int, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<true, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, int, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void(foo::*)() const RREF
+ ,invoke_case<true, void, foo>
+ ,invoke_case<false, int, foo>
+ ,invoke_case<false, void, foo*>
+ ,invoke_case<false, void, foo&>
+ ,invoke_case<true, void, foo&&>
+ ,invoke_case<false, int, foo&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo>>
+ ,invoke_case<true, void, foo const>
+ ,invoke_case<false, int, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<true, void, foo const&&>
+ ,invoke_case<false, int, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+
+#endif // #ifndef BOOST_CLBL_TRTS_MSVC
+
+ run_tests<int
+ ,invoke_case<false, void, foo>
+ ,invoke_case<false, void, foo*>
+ ,invoke_case<false, void, foo&>
+ ,invoke_case<false, void, foo&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+
+ auto f = [](int){};
+
+ run_tests<decltype(f)
+ ,invoke_case<true, void, int>
+ ,invoke_case<true, void, char>
+ ,invoke_case<false, int, int>
+ ,invoke_case<false, int, char>
+ ,invoke_case<false, void, void*>
+ >();
+
+ auto g = [](){};
+
+ run_tests<decltype(g)
+ ,invoke_case<true, void>
+ ,invoke_case<true, void>
+ ,invoke_case<false, void, int>
+ ,invoke_case<false, void, char>
+ ,invoke_case<false, int, int>
+ ,invoke_case<false, int, char>
+ ,invoke_case<false, void, void*>
+ >();
+
+// libc++ requires constructible types be passed to std::is_invocable
+#ifndef _LIBCPP_VERSION
+
+ run_tests<void(int)
+ ,invoke_case<true, void, int>
+ ,invoke_case<true, void, char>
+ ,invoke_case<false, int, int>
+ ,invoke_case<false, int, char>
+ ,invoke_case<false, void, void*>
+ >();
+
+ run_tests<void()
+ ,invoke_case<false, void, int>
+ ,invoke_case<false, void, char>
+ ,invoke_case<false, void, void*>
+ >();
+
+ run_tests<void
+ ,invoke_case<false, void, foo>
+ ,invoke_case<false, void, foo*>
+ ,invoke_case<false, void, foo&>
+ ,invoke_case<false, void, foo&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+#endif
+
+ run_tests<int
+ ,invoke_case<false, void, foo>
+ ,invoke_case<false, void, foo*>
+ ,invoke_case<false, void, foo&>
+ ,invoke_case<false, void, foo&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+
+ run_tests<void*
+ ,invoke_case<false, void, foo>
+ ,invoke_case<false, void, foo*>
+ ,invoke_case<false, void, foo&>
+ ,invoke_case<false, void, foo&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo>>
+ ,invoke_case<false, void, foo const>
+ ,invoke_case<false, void, foo const*>
+ ,invoke_case<false, void, foo const&>
+ ,invoke_case<false, void, foo const&&>
+ ,invoke_case<false, void, std::reference_wrapper<foo const>>
+ ,invoke_case<false, void, foo, int>
+ ,invoke_case<false, void, foo*, int>
+ ,invoke_case<false, void, foo&, int>
+ ,invoke_case<false, void, foo&&, int>
+ ,invoke_case<false, void, std::reference_wrapper<foo>, int>
+ >();
+}
+
+#endif //#ifdef BOOST_CLBL_TRTS_GCC_OLDER_THAN_4_9_2
diff --git a/src/boost/libs/callable_traits/test/is_lvalue_reference_member.cpp b/src/boost/libs/callable_traits/test/is_lvalue_reference_member.cpp
new file mode 100644
index 00000000..b18e6a6f
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_lvalue_reference_member.cpp
@@ -0,0 +1,126 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/is_lvalue_reference_member.hpp>
+#include "test.hpp"
+
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+int main(){ return 0; }
+#else
+
+struct foo {};
+
+template<typename T>
+void assert_lvalue_qualified() {
+
+ CT_ASSERT( is_lvalue_reference_member<T>());
+}
+
+
+template<typename T>
+void assert_not_lvalue_qualified() {
+
+ CT_ASSERT(! is_lvalue_reference_member<T>());
+}
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() && ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ assert_not_lvalue_qualified<f>();
+ assert_lvalue_qualified<l>();
+ assert_not_lvalue_qualified<r>();
+ assert_not_lvalue_qualified<c>();
+ assert_lvalue_qualified<cl>();
+ assert_not_lvalue_qualified<cr>();
+ assert_not_lvalue_qualified<v>();
+ assert_lvalue_qualified<vl>();
+ assert_not_lvalue_qualified<vr>();
+ assert_not_lvalue_qualified<cv>();
+ assert_lvalue_qualified<cvl>();
+ assert_not_lvalue_qualified<cvr>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct l { int operator()() & { return 0; } };
+ struct r { int operator()() && { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct cl { int operator()() const & { return 0; } };
+ struct cr { int operator()() const && { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct vl { int operator()() volatile & { return 0; } };
+ struct vr { int operator()() volatile && { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+ struct cvl { int operator()() const volatile & { return 0; } };
+ struct cvr { int operator()() const volatile && { return 0; } };
+
+ assert_not_lvalue_qualified<f>();
+ assert_lvalue_qualified<l>();
+ assert_not_lvalue_qualified<r>();
+ assert_not_lvalue_qualified<c>();
+ assert_lvalue_qualified<cl>();
+ assert_not_lvalue_qualified<cr>();
+ assert_not_lvalue_qualified<v>();
+ assert_lvalue_qualified<vl>();
+ assert_not_lvalue_qualified<vr>();
+ assert_not_lvalue_qualified<cv>();
+ assert_lvalue_qualified<cvl>();
+ assert_not_lvalue_qualified<cvr>();
+ }
+
+ {
+ using f = void();
+ using l = void() &;
+ using r = void() && ;
+ using c = void() const;
+ using cl = void() const &;
+ using cr = void() const &&;
+ using v = void() volatile;
+ using vl = void() volatile &;
+ using vr = void() volatile &&;
+ using cv = void() const volatile;
+ using cvl = void() const volatile &;
+ using cvr = void() const volatile &&;
+
+ CT_ASSERT(! is_lvalue_reference_member<f>());
+ CT_ASSERT( is_lvalue_reference_member<l>());
+ CT_ASSERT(! is_lvalue_reference_member<r>());
+ CT_ASSERT(! is_lvalue_reference_member<c>());
+ CT_ASSERT( is_lvalue_reference_member<cl>());
+ CT_ASSERT(! is_lvalue_reference_member<cr>());
+ CT_ASSERT(! is_lvalue_reference_member<v>());
+ CT_ASSERT( is_lvalue_reference_member<vl>());
+ CT_ASSERT(! is_lvalue_reference_member<vr>());
+ CT_ASSERT(! is_lvalue_reference_member<cv>());
+ CT_ASSERT( is_lvalue_reference_member<cvl>());
+ CT_ASSERT(! is_lvalue_reference_member<cvr>());
+ }
+
+ using f_ptr = void(*)();
+ assert_not_lvalue_qualified<f_ptr>();
+ assert_not_lvalue_qualified<f_ptr foo::*>();
+ assert_not_lvalue_qualified<int foo::*>();
+ assert_not_lvalue_qualified<void(&)()>();
+}
+
+#endif //#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
diff --git a/src/boost/libs/callable_traits/test/is_noexcept.cpp b/src/boost/libs/callable_traits/test/is_noexcept.cpp
new file mode 100644
index 00000000..e92129ee
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_noexcept.cpp
@@ -0,0 +1,43 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+#include <boost/callable_traits/detail/config.hpp>
+
+#include <boost/callable_traits/is_noexcept.hpp>
+#include "test.hpp"
+
+template<typename Noexcept, typename NotNoexcept>
+void test() {
+
+ CT_ASSERT( is_noexcept<Noexcept>::value
+ // for old compilers, TEST_NOEXCEPT_QUAL is empty so types are same
+ || std::is_same<Noexcept, NotNoexcept>::value);
+
+ CT_ASSERT(! is_noexcept<NotNoexcept>::value);
+}
+
+#define TEST_NOEXCEPT(not_noexcept) test<not_noexcept BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER, not_noexcept>()
+
+int main() {
+
+ TEST_NOEXCEPT(int(*)());
+
+ #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ TEST_NOEXCEPT(int() const);
+ TEST_NOEXCEPT(int(...) volatile LREF);
+ #endif
+
+ TEST_NOEXCEPT(int(*)(...));
+
+ struct foo;
+
+ TEST_NOEXCEPT(int(foo::*)());
+ TEST_NOEXCEPT(int(foo::*)() const volatile);
+ TEST_NOEXCEPT(int(foo::*)(...));
+ TEST_NOEXCEPT(int(foo::*)(...) const volatile RREF);
+}
+
diff --git a/src/boost/libs/callable_traits/test/is_rvalue_reference_member.cpp b/src/boost/libs/callable_traits/test/is_rvalue_reference_member.cpp
new file mode 100644
index 00000000..6eaa2e9c
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_rvalue_reference_member.cpp
@@ -0,0 +1,126 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/is_rvalue_reference_member.hpp>
+#include "test.hpp"
+
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+int main(){ return 0; }
+#else
+
+struct foo {};
+
+template<typename T>
+void assert_rvalue_qualified() {
+
+ CT_ASSERT( is_rvalue_reference_member<T>());
+}
+
+
+template<typename T>
+void assert_not_rvalue_qualified() {
+
+ CT_ASSERT(! is_rvalue_reference_member<T>());
+}
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() && ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ assert_not_rvalue_qualified<f>();
+ assert_not_rvalue_qualified<l>();
+ assert_rvalue_qualified<r>();
+ assert_not_rvalue_qualified<c>();
+ assert_not_rvalue_qualified<cl>();
+ assert_rvalue_qualified<cr>();
+ assert_not_rvalue_qualified<v>();
+ assert_not_rvalue_qualified<vl>();
+ assert_rvalue_qualified<vr>();
+ assert_not_rvalue_qualified<cv>();
+ assert_not_rvalue_qualified<cvl>();
+ assert_rvalue_qualified<cvr>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct l { int operator()() & { return 0; } };
+ struct r { int operator()() && { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct cl { int operator()() const & { return 0; } };
+ struct cr { int operator()() const && { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct vl { int operator()() volatile & { return 0; } };
+ struct vr { int operator()() volatile && { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+ struct cvl { int operator()() const volatile & { return 0; } };
+ struct cvr { int operator()() const volatile && { return 0; } };
+
+ assert_not_rvalue_qualified<f>();
+ assert_not_rvalue_qualified<l>();
+ assert_rvalue_qualified<r>();
+ assert_not_rvalue_qualified<c>();
+ assert_not_rvalue_qualified<cl>();
+ assert_rvalue_qualified<cr>();
+ assert_not_rvalue_qualified<v>();
+ assert_not_rvalue_qualified<vl>();
+ assert_rvalue_qualified<vr>();
+ assert_not_rvalue_qualified<cv>();
+ assert_not_rvalue_qualified<cvl>();
+ assert_rvalue_qualified<cvr>();
+ }
+
+ {
+ using f = void();
+ using l = void() &;
+ using r = void() && ;
+ using c = void() const;
+ using cl = void() const &;
+ using cr = void() const &&;
+ using v = void() volatile;
+ using vl = void() volatile &;
+ using vr = void() volatile &&;
+ using cv = void() const volatile;
+ using cvl = void() const volatile &;
+ using cvr = void() const volatile &&;
+
+ CT_ASSERT(! is_rvalue_reference_member<f>());
+ CT_ASSERT(! is_rvalue_reference_member<l>());
+ CT_ASSERT( is_rvalue_reference_member<r>());
+ CT_ASSERT(! is_rvalue_reference_member<c>());
+ CT_ASSERT(! is_rvalue_reference_member<cl>());
+ CT_ASSERT( is_rvalue_reference_member<cr>());
+ CT_ASSERT(! is_rvalue_reference_member<v>());
+ CT_ASSERT(! is_rvalue_reference_member<vl>());
+ CT_ASSERT( is_rvalue_reference_member<vr>());
+ CT_ASSERT(! is_rvalue_reference_member<cv>());
+ CT_ASSERT(! is_rvalue_reference_member<cvl>());
+ CT_ASSERT( is_rvalue_reference_member<cvr>());
+ }
+
+ using f_ptr = void(*)();
+ assert_not_rvalue_qualified<f_ptr>();
+ assert_not_rvalue_qualified<f_ptr foo::*>();
+ assert_not_rvalue_qualified<int foo::*>();
+ assert_not_rvalue_qualified<void(&)()>();
+}
+
+#endif //#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
diff --git a/src/boost/libs/callable_traits/test/is_transaction_safe.cpp b/src/boost/libs/callable_traits/test/is_transaction_safe.cpp
new file mode 100644
index 00000000..e1cedd01
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_transaction_safe.cpp
@@ -0,0 +1,41 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+#include <boost/callable_traits/is_transaction_safe.hpp>
+#include "test.hpp"
+
+template<typename Safe, typename NotSafe>
+void test() {
+
+ CT_ASSERT( is_transaction_safe<Safe>::value
+ // for when tx safe is disabled
+ || std::is_same<Safe, NotSafe>::value);
+ CT_ASSERT(! is_transaction_safe<NotSafe>::value);
+}
+
+#define TEST_TRANSACTION_SAFE(not_safe) \
+ test<not_safe BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER, not_safe>()
+
+int main() {
+
+ TEST_TRANSACTION_SAFE(int(*)());
+
+ #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+ TEST_TRANSACTION_SAFE(int(...) volatile LREF);
+ TEST_TRANSACTION_SAFE(int() const);
+ #endif
+
+ TEST_TRANSACTION_SAFE(int(*)(...));
+
+ struct foo;
+
+ TEST_TRANSACTION_SAFE(int(foo::*)());
+ TEST_TRANSACTION_SAFE(int(foo::*)() const volatile);
+ TEST_TRANSACTION_SAFE(int(foo::*)(...));
+ TEST_TRANSACTION_SAFE(int(foo::*)(...) const volatile RREF);
+}
+
diff --git a/src/boost/libs/callable_traits/test/is_volatile_member.cpp b/src/boost/libs/callable_traits/test/is_volatile_member.cpp
new file mode 100644
index 00000000..26522e84
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/is_volatile_member.cpp
@@ -0,0 +1,121 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <utility>
+#include <boost/callable_traits/is_volatile_member.hpp>
+#include "test.hpp"
+
+struct foo {};
+
+template<typename T>
+void assert_volatile_qualified() {
+ CT_ASSERT( is_volatile_member<T>::value);
+}
+
+
+template<typename T>
+void assert_not_volatile_qualified() {
+ CT_ASSERT(! is_volatile_member<T>::value);
+}
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() LREF;
+ using r = void(foo::*)() RREF ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const LREF;
+ using cr = void(foo::*)() const RREF;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile LREF;
+ using vr = void(foo::*)() volatile RREF;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile LREF;
+ using cvr = void(foo::*)() const volatile RREF;
+
+ assert_not_volatile_qualified<f>();
+ assert_not_volatile_qualified<l>();
+ assert_not_volatile_qualified<r>();
+ assert_not_volatile_qualified<c>();
+ assert_not_volatile_qualified<cl>();
+ assert_not_volatile_qualified<cr>();
+ assert_volatile_qualified<v>();
+ assert_volatile_qualified<vl>();
+ assert_volatile_qualified<vr>();
+ assert_volatile_qualified<cv>();
+ assert_volatile_qualified<cvl>();
+ assert_volatile_qualified<cvr>();
+ }
+
+ {
+ struct f { int operator()() { return 0; } };
+ struct l { int operator()() LREF { return 0; } };
+ struct r { int operator()() RREF { return 0; } };
+ struct c { int operator()() const { return 0; } };
+ struct cl { int operator()() const LREF { return 0; } };
+ struct cr { int operator()() const RREF { return 0; } };
+ struct v { int operator()() volatile { return 0; } };
+ struct vl { int operator()() volatile LREF { return 0; } };
+ struct vr { int operator()() volatile RREF { return 0; } };
+ struct cv { int operator()() const volatile { return 0; } };
+ struct cvl { int operator()() const volatile LREF { return 0; } };
+ struct cvr { int operator()() const volatile RREF { return 0; } };
+
+ assert_not_volatile_qualified<f>();
+ assert_not_volatile_qualified<l>();
+ assert_not_volatile_qualified<r>();
+ assert_not_volatile_qualified<c>();
+ assert_not_volatile_qualified<cl>();
+ assert_not_volatile_qualified<cr>();
+ assert_volatile_qualified<v>();
+ assert_volatile_qualified<vl>();
+ assert_volatile_qualified<vr>();
+ assert_volatile_qualified<cv>();
+ assert_volatile_qualified<cvl>();
+ assert_volatile_qualified<cvr>();
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ CT_ASSERT(! is_volatile_member<f>());
+ CT_ASSERT(! is_volatile_member<l>());
+ CT_ASSERT(! is_volatile_member<r>());
+ CT_ASSERT(! is_volatile_member<c>());
+ CT_ASSERT(! is_volatile_member<cl>());
+ CT_ASSERT(! is_volatile_member<cr>());
+ CT_ASSERT( is_volatile_member<v>());
+ CT_ASSERT( is_volatile_member<vl>());
+ CT_ASSERT( is_volatile_member<vr>());
+ CT_ASSERT( is_volatile_member<cv>());
+ CT_ASSERT( is_volatile_member<cvl>());
+ CT_ASSERT( is_volatile_member<cvr>());
+ }
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ using f_ptr = void(*)();
+ assert_not_volatile_qualified<f_ptr>();
+ assert_not_volatile_qualified<f_ptr foo::*>();
+ assert_not_volatile_qualified<int foo::*>();
+ assert_not_volatile_qualified<void(&)()>();
+}
diff --git a/src/boost/libs/callable_traits/test/qualified_class_of.cpp b/src/boost/libs/callable_traits/test/qualified_class_of.cpp
new file mode 100644
index 00000000..59a98510
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/qualified_class_of.cpp
@@ -0,0 +1,52 @@
+#include <tuple>
+#include <utility>
+#include <type_traits>
+#include <boost/callable_traits/qualified_class_of.hpp>
+#include "test.hpp"
+
+struct foo;
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using test = TRAIT(qualified_class_of, f);
+ using expect = foo &;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = void(foo::*)() const;
+ using test = TRAIT(qualified_class_of, f);
+ using expect = foo const &;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = void(foo::*)() volatile;
+ using test = TRAIT(qualified_class_of, f);
+ using expect = foo volatile &;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int, ...) const volatile;
+ using test = TRAIT(qualified_class_of, f);
+ using expect = foo const volatile &;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = int foo::*;
+ using test = TRAIT(qualified_class_of, f);
+ using expect = foo const &;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+
+ {
+ using f = const int foo::*;
+ using test = TRAIT(qualified_class_of, f);
+ using expect = foo const &;
+ CT_ASSERT(std::is_same<test, expect>::value);
+ }
+}
diff --git a/src/boost/libs/callable_traits/test/qualified_class_of_constraints.cpp b/src/boost/libs/callable_traits/test/qualified_class_of_constraints.cpp
new file mode 100644
index 00000000..c86d5115
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/qualified_class_of_constraints.cpp
@@ -0,0 +1,52 @@
+
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/qualified_class_of.hpp>
+#include "test.hpp"
+
+template<typename T>
+struct is_substitution_failure_qualified_class_of {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(qualified_class_of, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+struct foo;
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_qualified_class_of<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<void>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<void*>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int &>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int()>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int(*)()>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int(**)()>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int(&)()>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int (* const &)()>::value);
+ CT_ASSERT(!is_substitution_failure_qualified_class_of<int (foo::* &)()>::value);
+ CT_ASSERT(!is_substitution_failure_qualified_class_of<int (foo::* const)()>::value);
+ CT_ASSERT(!is_substitution_failure_qualified_class_of<int (foo::* const &)()>::value);
+ CT_ASSERT(!is_substitution_failure_qualified_class_of<int (foo::* volatile)()>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int (foo::**)()>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int (foo::* const *)()>::value);
+ CT_ASSERT(is_substitution_failure_qualified_class_of<int (foo::* volatile *)()>::value);
+}
+
diff --git a/src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.cpp b/src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.cpp
new file mode 100644
index 00000000..ed01eaa1
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.cpp
@@ -0,0 +1,48 @@
+
+#include <boost/callable_traits.hpp>
+#include "test.hpp"
+
+struct foo;
+
+#define CALLABLE_TRAIT_UNDER_TEST add_member_const
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#define CALLABLE_TRAIT_UNDER_TEST remove_member_const
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#define CALLABLE_TRAIT_UNDER_TEST add_member_volatile
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#define CALLABLE_TRAIT_UNDER_TEST remove_member_volatile
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#define CALLABLE_TRAIT_UNDER_TEST add_member_cv
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#define CALLABLE_TRAIT_UNDER_TEST remove_member_cv
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+
+#define CALLABLE_TRAIT_UNDER_TEST add_member_lvalue_reference
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#define CALLABLE_TRAIT_UNDER_TEST add_member_rvalue_reference
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#define CALLABLE_TRAIT_UNDER_TEST remove_member_reference
+#include "qualifier_metafunction_constraints.hpp"
+#undef CALLABLE_TRAIT_UNDER_TEST
+
+#endif // #ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+
+int main(){}
+
diff --git a/src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.hpp b/src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.hpp
new file mode 100644
index 00000000..b3bf664c
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/qualifier_metafunction_constraints.hpp
@@ -0,0 +1,48 @@
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+HEADER GUARDS INTENTIONALLY OMITTED
+*/
+
+#ifndef PP_CAT
+#define PP_CAT_(x, y) x ## y
+#define PP_CAT(x, y) PP_CAT_(x, y)
+#endif
+
+template<typename T>
+struct PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST) {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(CALLABLE_TRAIT_UNDER_TEST, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+bool PP_CAT(test_, CALLABLE_TRAIT_UNDER_TEST)() {
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int &>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int(&)()>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int(*)()>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int(* const foo::*)()>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int foo::*>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int (foo::* &)()>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int (foo::* const)()>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int (foo::* const &)()>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<int (foo::* volatile)()>::value);
+
+ auto lambda = [](){};
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<decltype(lambda)>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<decltype(lambda)&>::value);
+ CT_ASSERT(PP_CAT(is_sub_failure_, CALLABLE_TRAIT_UNDER_TEST)<void>::value);
+ return true;
+}
+
+auto PP_CAT(var_, CALLABLE_TRAIT_UNDER_TEST) = PP_CAT(test_, CALLABLE_TRAIT_UNDER_TEST)();
diff --git a/src/boost/libs/callable_traits/test/remove_member_const.cpp b/src/boost/libs/callable_traits/test/remove_member_const.cpp
new file mode 100644
index 00000000..1c16f29e
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_member_const.cpp
@@ -0,0 +1,106 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/remove_member_const.hpp>
+#include "test.hpp"
+
+
+
+struct foo {};
+
+int main() {
+
+ {
+ using f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...);
+ using l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) LREF;
+ using r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) RREF ;
+ using c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const;
+ using cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const LREF;
+ using cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const RREF;
+ using v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile;
+ using vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile LREF;
+ using vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile RREF;
+ using cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile;
+ using cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile LREF;
+ using cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_const, f)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_const, c)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_const, l)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_const, cl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_const, r)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_const, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_const, v)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_const, cv)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_member_const, vl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_member_const, cvl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_member_const, vr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_member_const, cvr)>{});
+ }
+
+ {
+ using f = foo const & (foo::*)(int, int);
+ using l = foo const & (foo::*)(int, int) LREF;
+ using r = foo const & (foo::*)(int, int) RREF ;
+ using c = foo const & (foo::*)(int, int) const;
+ using cl = foo const & (foo::*)(int, int) const LREF;
+ using cr = foo const & (foo::*)(int, int) const RREF;
+ using v = foo const & (foo::*)(int, int) volatile;
+ using vl = foo const & (foo::*)(int, int) volatile LREF;
+ using vr = foo const & (foo::*)(int, int) volatile RREF;
+ using cv = foo const & (foo::*)(int, int) const volatile;
+ using cvl = foo const & (foo::*)(int, int) const volatile LREF;
+ using cvr = foo const & (foo::*)(int, int) const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_const, f)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_const, c)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_const, l)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_const, cl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_const, r)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_const, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_const, v)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_const, cv)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_member_const, vl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_member_const, cvl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_member_const, vr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_member_const, cvr)>{});
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_const, f)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_const, c)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_const, l)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_const, cl)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_const, r)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_const, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_const, v)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_const, cv)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_member_const, vl)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_member_const, cvl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_member_const, vr)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_member_const, cvr)>{});
+ }
+
+#endif
+}
diff --git a/src/boost/libs/callable_traits/test/remove_member_reference.cpp b/src/boost/libs/callable_traits/test/remove_member_reference.cpp
new file mode 100644
index 00000000..67a8b6c7
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_member_reference.cpp
@@ -0,0 +1,78 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/remove_member_reference.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+int main(){ return 0; }
+#else
+
+
+struct foo{};
+
+int main() {
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() &;
+ using r = void(foo::*)() &&;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const &;
+ using cr = void(foo::*)() const &&;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile &;
+ using vr = void(foo::*)() volatile &&;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile &;
+ using cvr = void(foo::*)() const volatile &&;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_reference, f)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_reference, c)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_reference, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_member_reference, cv)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_reference, l)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_reference, cl)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_reference, vl)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_member_reference, cvl)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_reference, r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_reference, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_reference, vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_member_reference, cvr)>{});
+ }
+
+ {
+ using f = void();
+ using l = void() &;
+ using r = void() &&;
+ using c = void() const;
+ using cl = void() const &;
+ using cr = void() const &&;
+ using v = void() volatile;
+ using vl = void() volatile &;
+ using vr = void() volatile &&;
+ using cv = void() const volatile;
+ using cvl = void() const volatile &;
+ using cvr = void() const volatile &&;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_reference, f)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_reference, c)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_reference, v)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_member_reference, cv)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_reference, l)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_reference, cl)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_reference, vl)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_member_reference, cvl)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_reference, r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_reference, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_member_reference, vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_member_reference, cvr)>{});
+ }
+}
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
diff --git a/src/boost/libs/callable_traits/test/remove_member_volatile.cpp b/src/boost/libs/callable_traits/test/remove_member_volatile.cpp
new file mode 100644
index 00000000..79dcacd1
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_member_volatile.cpp
@@ -0,0 +1,77 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/remove_member_volatile.hpp>
+#include "test.hpp"
+
+struct foo{};
+
+int main() {
+
+ {
+ using f = char(foo::*)(foo*, int);
+ using l = char(foo::*)(foo*, int) LREF;
+ using r = char(foo::*)(foo*, int) RREF;
+ using c = char(foo::*)(foo*, int) const;
+ using cl = char(foo::*)(foo*, int) const LREF;
+ using cr = char(foo::*)(foo*, int) const RREF;
+ using v = char(foo::*)(foo*, int) volatile;
+ using vl = char(foo::*)(foo*, int) volatile LREF;
+ using vr = char(foo::*)(foo*, int) volatile RREF;
+ using cv = char(foo::*)(foo*, int) const volatile;
+ using cvl = char(foo::*)(foo*, int) const volatile LREF;
+ using cvr = char(foo::*)(foo*, int) const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_volatile, f)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_volatile, vl)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_volatile, l)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_volatile, v)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_volatile, r)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_volatile, vr)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_volatile, c)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_volatile, cv)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_member_volatile, cl)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_member_volatile, cvl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_member_volatile, cr)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_member_volatile, cvr)>{});
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = foo&&();
+ using l = foo&&() LREF;
+ using r = foo&&() RREF;
+ using c = foo&&() const;
+ using cl = foo&&() const LREF;
+ using cr = foo&&() const RREF;
+ using v = foo&&() volatile;
+ using vl = foo&&() volatile LREF;
+ using vr = foo&&() volatile RREF;
+ using cv = foo&&() const volatile;
+ using cvl = foo&&() const volatile LREF;
+ using cvr = foo&&() const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_volatile, f)>{});
+ CT_ASSERT(std::is_same<f, TRAIT(remove_member_volatile, v)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_volatile, vl)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_member_volatile, l)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_volatile, r)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_member_volatile, vr)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_volatile, c)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_member_volatile, cv)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_member_volatile, cl)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_member_volatile, cvl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_member_volatile, cr)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_member_volatile, cvr)>{});
+ }
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+}
diff --git a/src/boost/libs/callable_traits/test/remove_noexcept.cpp b/src/boost/libs/callable_traits/test/remove_noexcept.cpp
new file mode 100644
index 00000000..8cb8b148
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_noexcept.cpp
@@ -0,0 +1,36 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+#include <boost/callable_traits/detail/config.hpp>
+#include "test.hpp"
+
+#include <boost/callable_traits/remove_noexcept.hpp>
+
+template<typename Noexcept, typename NotNoexcept>
+void test() {
+
+ CT_ASSERT(std::is_same<NotNoexcept, TRAIT(remove_noexcept, Noexcept)>::value);
+}
+
+#define TEST_NOEXCEPT(not_noexcept) \
+ test<not_noexcept BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER, not_noexcept>()
+
+int main() {
+
+ TEST_NOEXCEPT(int(int) LREF);
+ TEST_NOEXCEPT(int(*)(int));
+ TEST_NOEXCEPT(int(int, ...) RREF);
+ TEST_NOEXCEPT(int(*)(int, ...));
+
+ struct foo;
+
+ TEST_NOEXCEPT(int(foo::*)(int));
+ TEST_NOEXCEPT(int(foo::*)(int) const);
+ TEST_NOEXCEPT(int(foo::*)(int, ...));
+ TEST_NOEXCEPT(int(foo::*)(int, ...) volatile);
+}
+
diff --git a/src/boost/libs/callable_traits/test/remove_noexcept_constraints.cpp b/src/boost/libs/callable_traits/test/remove_noexcept_constraints.cpp
new file mode 100644
index 00000000..9df96a42
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_noexcept_constraints.cpp
@@ -0,0 +1,51 @@
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/remove_noexcept.hpp>
+#include <tuple>
+#include "test.hpp"
+
+#ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+int main(){}
+#else
+
+template<typename T>
+struct is_substitution_failure_remove_noexcept {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(remove_noexcept, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+struct foo;
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_remove_noexcept<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<int>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<int &>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<int (* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<int (foo::* &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<int (foo::* const)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<int (foo::* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<int (foo::* volatile)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<void>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<void*>::value);
+ CT_ASSERT(is_substitution_failure_remove_noexcept<void(**)()>::value);
+}
+
+#endif //#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
diff --git a/src/boost/libs/callable_traits/test/remove_transaction_safe.cpp b/src/boost/libs/callable_traits/test/remove_transaction_safe.cpp
new file mode 100644
index 00000000..48104154
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_transaction_safe.cpp
@@ -0,0 +1,39 @@
+/*<-
+Copyright (c) 2016 Barrett Adair
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+->*/
+
+#include "test.hpp"
+#include <boost/callable_traits/remove_transaction_safe.hpp>
+
+template<typename Safe, typename NotSafe>
+void test() {
+
+ CT_ASSERT(std::is_same<NotSafe, TRAIT(remove_transaction_safe, Safe)>::value);
+
+ //sanity check
+ #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+ CT_ASSERT(!std::is_same<Safe, NotSafe>::value);
+ #endif
+}
+
+#define TEST_TRANSACTION_SAFE(not_safe) \
+ test<not_safe BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER, not_safe>()
+
+int main() {
+
+ TEST_TRANSACTION_SAFE(int(int) LREF);
+ TEST_TRANSACTION_SAFE(int(*)(int));
+ TEST_TRANSACTION_SAFE(int(int, ...) RREF);
+ TEST_TRANSACTION_SAFE(int(*)(int, ...));
+
+ struct foo;
+
+ TEST_TRANSACTION_SAFE(int(foo::*)(int));
+ TEST_TRANSACTION_SAFE(int(foo::*)(int) const);
+ TEST_TRANSACTION_SAFE(int(foo::*)(int, ...));
+ TEST_TRANSACTION_SAFE(int(foo::*)(int, ...) volatile);
+}
+
diff --git a/src/boost/libs/callable_traits/test/remove_transaction_safe_constraints.cpp b/src/boost/libs/callable_traits/test/remove_transaction_safe_constraints.cpp
new file mode 100644
index 00000000..0daadebe
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_transaction_safe_constraints.cpp
@@ -0,0 +1,51 @@
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/remove_transaction_safe.hpp>
+#include <tuple>
+#include "test.hpp"
+
+#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
+int main(){}
+#else
+
+template<typename T>
+struct is_substitution_failure_remove_tx_safe {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(remove_transaction_safe, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+struct foo;
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<int>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<int &>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<int (* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* const)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<int (foo::* volatile)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<void>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<void*>::value);
+ CT_ASSERT(is_substitution_failure_remove_tx_safe<void(**)()>::value);
+}
+
+#endif //#ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
diff --git a/src/boost/libs/callable_traits/test/remove_varargs.cpp b/src/boost/libs/callable_traits/test/remove_varargs.cpp
new file mode 100644
index 00000000..f5f91d6f
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_varargs.cpp
@@ -0,0 +1,190 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <boost/callable_traits/remove_varargs.hpp>
+#include "test.hpp"
+
+
+
+struct foo {};
+
+int main() {
+
+ {
+ using f = void(foo::*)();
+ using l = void(foo::*)() LREF;
+ using r = void(foo::*)() RREF ;
+ using c = void(foo::*)() const;
+ using cl = void(foo::*)() const LREF;
+ using cr = void(foo::*)() const RREF;
+ using v = void(foo::*)() volatile;
+ using vl = void(foo::*)() volatile LREF;
+ using vr = void(foo::*)() volatile RREF;
+ using cv = void(foo::*)() const volatile;
+ using cvl = void(foo::*)() const volatile LREF;
+ using cvr = void(foo::*)() const volatile RREF;
+
+ using va_f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...);
+ using va_l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) LREF;
+ using va_r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) RREF ;
+ using va_c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const;
+ using va_cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const LREF;
+ using va_cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const RREF;
+ using va_v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile;
+ using va_vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile LREF;
+ using va_vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) volatile RREF;
+ using va_cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile;
+ using va_cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile LREF;
+ using va_cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_varargs, va_f)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_varargs, va_l)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_varargs, va_r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_varargs, va_c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_varargs, va_cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_varargs, va_cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_varargs, va_v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_varargs, va_vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_varargs, va_vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_varargs, va_cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(remove_varargs, va_cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(remove_varargs, va_cvr)>{});
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_varargs, f)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_varargs, l)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_varargs, r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_varargs, c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_varargs, cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_varargs, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_varargs, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_varargs, vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_varargs, vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_varargs, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(remove_varargs, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(remove_varargs, cvr)>{});
+ }
+
+ {
+ using f = void(foo::*)(int&, int&&);
+ using l = void(foo::*)(int&, int&&) LREF;
+ using r = void(foo::*)(int&, int&&) RREF ;
+ using c = void(foo::*)(int&, int&&) const;
+ using cl = void(foo::*)(int&, int&&) const LREF;
+ using cr = void(foo::*)(int&, int&&) const RREF;
+ using v = void(foo::*)(int&, int&&) volatile;
+ using vl = void(foo::*)(int&, int&&) volatile LREF;
+ using vr = void(foo::*)(int&, int&&) volatile RREF;
+ using cv = void(foo::*)(int&, int&&) const volatile;
+ using cvl = void(foo::*)(int&, int&&) const volatile LREF;
+ using cvr = void(foo::*)(int&, int&&) const volatile RREF;
+
+ using va_f = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...);
+ using va_l = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) LREF;
+ using va_r = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) RREF ;
+ using va_c = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const;
+ using va_cl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const LREF;
+ using va_cr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const RREF;
+ using va_v = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) volatile;
+ using va_vl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) volatile LREF;
+ using va_vr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) volatile RREF;
+ using va_cv = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const volatile;
+ using va_cvl = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const volatile LREF;
+ using va_cvr = void(BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC foo::*)(int&, int&&, ...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_varargs, va_f)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_varargs, va_l)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_varargs, va_r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_varargs, va_c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_varargs, va_cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_varargs, va_cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_varargs, va_v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_varargs, va_vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_varargs, va_vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_varargs, va_cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(remove_varargs, va_cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(remove_varargs, va_cvr)>{});
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_varargs, f)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_varargs, l)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_varargs, r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_varargs, c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_varargs, cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_varargs, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_varargs, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_varargs, vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_varargs, vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_varargs, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(remove_varargs, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(remove_varargs, cvr)>{});
+ }
+
+#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void();
+ using l = void() LREF;
+ using r = void() RREF ;
+ using c = void() const;
+ using cl = void() const LREF;
+ using cr = void() const RREF;
+ using v = void() volatile;
+ using vl = void() volatile LREF;
+ using vr = void() volatile RREF;
+ using cv = void() const volatile;
+ using cvl = void() const volatile LREF;
+ using cvr = void() const volatile RREF;
+
+ using va_f = void(...);
+ using va_l = void(...) LREF;
+ using va_r = void(...) RREF ;
+ using va_c = void(...) const;
+ using va_cl = void(...) const LREF;
+ using va_cr = void(...) const RREF;
+ using va_v = void(...) volatile;
+ using va_vl = void(...) volatile LREF;
+ using va_vr = void(...) volatile RREF;
+ using va_cv = void(...) const volatile;
+ using va_cvl = void(...) const volatile LREF;
+ using va_cvr = void(...) const volatile RREF;
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_varargs, va_f)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_varargs, va_l)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_varargs, va_r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_varargs, va_c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_varargs, va_cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_varargs, va_cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_varargs, va_v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_varargs, va_vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_varargs, va_vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_varargs, va_cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(remove_varargs, va_cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(remove_varargs, va_cvr)>{});
+
+ CT_ASSERT(std::is_same<f, TRAIT(remove_varargs, f)>{});
+ CT_ASSERT(std::is_same<l, TRAIT(remove_varargs, l)>{});
+ CT_ASSERT(std::is_same<r, TRAIT(remove_varargs, r)>{});
+ CT_ASSERT(std::is_same<c, TRAIT(remove_varargs, c)>{});
+ CT_ASSERT(std::is_same<cl, TRAIT(remove_varargs, cl)>{});
+ CT_ASSERT(std::is_same<cr, TRAIT(remove_varargs, cr)>{});
+ CT_ASSERT(std::is_same<v, TRAIT(remove_varargs, v)>{});
+ CT_ASSERT(std::is_same<vl, TRAIT(remove_varargs, vl)>{});
+ CT_ASSERT(std::is_same<vr, TRAIT(remove_varargs, vr)>{});
+ CT_ASSERT(std::is_same<cv, TRAIT(remove_varargs, cv)>{});
+ CT_ASSERT(std::is_same<cvl, TRAIT(remove_varargs, cvl)>{});
+ CT_ASSERT(std::is_same<cvr, TRAIT(remove_varargs, cvr)>{});
+ }
+
+#endif //#ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+
+ {
+ using f = void(&)();
+ using va_f = void(&)(...);
+ CT_ASSERT(std::is_same<f, TRAIT(remove_varargs, va_f)>{});
+ }
+}
diff --git a/src/boost/libs/callable_traits/test/remove_varargs_constraints.hpp b/src/boost/libs/callable_traits/test/remove_varargs_constraints.hpp
new file mode 100644
index 00000000..d891fba5
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/remove_varargs_constraints.hpp
@@ -0,0 +1,45 @@
+/*
+Copyright Barrett Adair 2016-2017
+
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <boost/callable_traits/remove_varargs.hpp>
+#include <tuple>
+#include "test.hpp"
+
+struct foo;
+
+template<typename T>
+struct is_substitution_failure_remove_varargs {
+
+ template<typename>
+ static auto test(...) -> std::true_type;
+
+ template<typename A,
+ typename std::remove_reference<
+ TRAIT(add_varargs, A)>::type* = nullptr>
+ static auto test(int) -> std::false_type;
+
+ static constexpr bool value = decltype(test<T>(0))::value;
+};
+
+int main() {
+
+ auto lambda = [](){};
+
+ CT_ASSERT(is_substitution_failure_remove_varargs<decltype(lambda)>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<decltype(lambda)&>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<int>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<int &>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<int (* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<int (foo::* &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<int (foo::* const)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<int (foo::* const &)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<int (foo::* volatile)()>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<void>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<void*>::value);
+ CT_ASSERT(is_substitution_failure_remove_varargs<void(**)()>::value);
+}
diff --git a/src/boost/libs/callable_traits/test/return_type.cpp b/src/boost/libs/callable_traits/test/return_type.cpp
new file mode 100644
index 00000000..11362c07
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/return_type.cpp
@@ -0,0 +1,56 @@
+/*
+
+Copyright Barrett Adair 2015-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
+
+*/
+
+#include <type_traits>
+#include <cstdint>
+#include <memory>
+#include <boost/callable_traits.hpp>
+#include "test.hpp"
+
+struct foo1 {
+ int bar(char, float&, int = 0) { return{}; }
+};
+
+struct foo2 {
+ int bar(char, float&, int = 0, ...) { return{}; }
+};
+
+struct foo3 {
+ int operator()(char, float&, int = 0) { return{}; }
+};
+
+struct foo4 {
+ int operator()(char, float&, int = 0, ...) { return{}; }
+};
+
+int foo5(char, float&, int = 0) { return{}; }
+
+int foo6(char, float&, int = 0, ...) { return{}; }
+
+using std::is_same;
+
+int main() {
+
+ {
+ using pmf = decltype(&foo1::bar);
+ CT_ASSERT(std::is_same< return_type_t<pmf>, int>{});
+ } {
+ using pmf = decltype(&foo2::bar);
+ CT_ASSERT(std::is_same< return_type_t<pmf>, int>{});
+ } {
+ CT_ASSERT(std::is_same< return_type_t<foo3>, int>{});
+ } {
+ CT_ASSERT(std::is_same< return_type_t<foo4>, int>{});
+ } {
+ CT_ASSERT(std::is_same< return_type_t<decltype(foo5)>, int>{});
+ } {
+ CT_ASSERT(std::is_same< return_type_t<decltype(foo6)>, int>{});
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/callable_traits/test/test.hpp b/src/boost/libs/callable_traits/test/test.hpp
new file mode 100644
index 00000000..58266c95
--- /dev/null
+++ b/src/boost/libs/callable_traits/test/test.hpp
@@ -0,0 +1,56 @@
+/*
+Copyright Barrett Adair 2016-2017
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
+*/
+
+#include <type_traits>
+#include <functional>
+#include <tuple>
+#include <utility>
+#include <boost/callable_traits.hpp>
+
+using namespace boost::callable_traits;
+
+#ifndef CT_ASSERT
+#define CT_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
+#endif //CT_ASSERT
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
+#define LREF
+#define RREF
+#else
+#define LREF &
+#define RREF &&
+#endif
+
+#define TX_SAFE BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER
+#define VA_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
+
+#ifndef PP_CAT
+#define PP_CAT_(x, y) x ## y
+#define PP_CAT(x, y) PP_CAT_(x, y)
+#endif
+
+#ifdef USE_LAZY_TYPES
+#define TRAIT(trait, ...) typename trait<__VA_ARGS__>::type
+#else
+#define TRAIT(trait, ...) PP_CAT(trait, _t)<__VA_ARGS__>
+#endif
+
+#ifdef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
+#define TEST_NOEXCEPT_QUAL noexcept
+#else
+#define TEST_NOEXCEPT_QUAL
+#endif
+
+#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
+#define TEST_ABOM_V
+#else
+#define TEST_ABOM_V volatile
+#endif
+
+template<typename T1, typename T2>
+void assert_same() {
+ CT_ASSERT(std::is_same<T1, T2>::value);
+}