diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37dadbe..07ca659 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -423,3 +423,79 @@ jobs: - name: Test run: ..\..\..\b2 --hash cxxstd=${{ matrix.standard }} toolset=msvc-14.2 define=CI_SUPPRESS_KNOWN_ISSUES cxxflags=-clr asynch-exceptions=on working-directory: ../boost-root/libs/type_traits/test + ubuntu-cuda: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + standard: [ 11, 14, 17 ] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + - uses: Jimver/cuda-toolkit@v0.2.4 + - uses: mstachniuk/ci-skip@v1 + with: + commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]' + commit-filter-separator: ';' + fail-fast: true + - name: Add repository + continue-on-error: true + id: addrepo + run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - name: Retry Add Repo + continue-on-error: true + id: retry1 + if: steps.addrepo.outcome=='failure' + run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - name: Retry Add Repo 2 + continue-on-error: true + id: retry2 + if: steps.retry1.outcome=='failure' + run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - name: Install packages + run: sudo apt install clang-10 + - name: Checkout main boost + run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root + - name: Update tools/boostdep + run: git submodule update --init tools/boostdep + working-directory: ../boost-root + - name: Copy files + run: cp -r $GITHUB_WORKSPACE/* libs/type_traits + working-directory: ../boost-root + - name: Install deps + run: python tools/boostdep/depinst/depinst.py type_traits + working-directory: ../boost-root + - name: Bootstrap + run: ./bootstrap.sh + working-directory: ../boost-root + - name: Generate headers + run: ./b2 headers + working-directory: ../boost-root + - name: nvcc version + run: nvcc --version + working-directory: ../boost-root/libs/config/test + - name: Testing nvcc + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cpp" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing nvcc+clang + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cpp" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cpp || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Create .cu files + run: for file in $(cat cuda/cuda_tests.txt); do cp $file.cpp $file.cu; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing nvcc on .cu files + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing nvcc+clang on .cu files + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc --compiler-bindir=clang++ -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing clang on .cu files + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && clang++ -nocudalib --no-cuda-version-check --cuda-gpu-arch=sm_75 -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_VIA_STATIC_ASSERT $file.cu || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing nvcc on .cu files + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && nvcc -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_CUDA_DEVICE $file.cu || break -1; done + working-directory: ../boost-root/libs/type_traits/test + - name: Testing clang on .cu files + run: for file in $(cat cuda/cuda_tests.txt); do echo "testing $file.cu" && clang++ -nocudalib --no-cuda-version-check --cuda-gpu-arch=sm_75 -std=c++${{ matrix.standard }} -I../../.. -c -DTEST_CUDA_DEVICE $file.cu || break -1; done + working-directory: ../boost-root/libs/type_traits/test diff --git a/include/boost/type_traits.hpp b/include/boost/type_traits.hpp index 406fd02..a1c882e 100644 --- a/include/boost/type_traits.hpp +++ b/include/boost/type_traits.hpp @@ -60,7 +60,7 @@ #include #include #include -#if !defined(BOOST_BORLANDC) && !defined(__CUDACC__) +#if !defined(BOOST_BORLANDC) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__)) #include #endif #include diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 8ac3b4a..b10bce2 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -107,6 +107,9 @@ #if defined(BOOST_MSVC) && !defined(__cpp_rvalue_references) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(_NOEXCEPT_TYPES_SUPPORTED) # define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE #endif +#if defined(__cpp_rvalue_references) && defined(__NVCC__) && defined(__CUDACC__) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#endif #endif // BOOST_TT_CONFIG_HPP_INCLUDED diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 02f2a03..72b6d90 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -160,7 +160,7 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +#if defined(BOOST_CLANG) && defined(__has_feature) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__)) // // Note that these intrinsics are disabled for the CUDA meta-compiler as it appears // to not support them, even though the underlying clang compiler does so. diff --git a/test/aligned_storage_a2_test.cpp b/test/aligned_storage_a2_test.cpp index f2a49ad..5f489d8 100644 --- a/test/aligned_storage_a2_test.cpp +++ b/test/aligned_storage_a2_test.cpp @@ -27,12 +27,12 @@ union must_be_pod }; template -inline void no_unused_warning(const volatile T&) +inline BOOST_TT_PROC void no_unused_warning(const volatile T&) { } template -void do_check(const T&) +BOOST_TT_PROC void do_check(const T&) { typedef typename tt::aligned_storage::type t1; #if defined(BOOST_GCC) && (BOOST_GCC < 40800) @@ -46,6 +46,7 @@ void do_check(const T&) must_be_pod pod1; no_unused_warning(as1); no_unused_warning(pod1); +#ifndef TEST_CUDA_DEVICE BOOST_TEST_MESSAGE(typeid(t1).name()); BOOST_CHECK(::tt::alignment_of::value == T::value); BOOST_CHECK(sizeof(t1) == T::value); @@ -86,6 +87,7 @@ void do_check(const T&) BOOST_CHECK(::tt::is_pod::value == true); #endif #endif +#endif } TT_TEST_BEGIN(type_with_alignment) diff --git a/test/aligned_storage_empy_test.cpp b/test/aligned_storage_empy_test.cpp index c6cbbee..8a7b36b 100644 --- a/test/aligned_storage_empy_test.cpp +++ b/test/aligned_storage_empy_test.cpp @@ -90,6 +90,8 @@ namespace TT_TEST_BEGIN(type_with_empty_alignment_buffer) +#ifndef TEST_CUDA_DEVICE + do_check(); do_check(); do_check(); @@ -116,6 +118,8 @@ do_check(); do_check(); do_check(); +#endif + TT_TEST_END diff --git a/test/aligned_storage_test.cpp b/test/aligned_storage_test.cpp index 517a402..2b86ecb 100644 --- a/test/aligned_storage_test.cpp +++ b/test/aligned_storage_test.cpp @@ -32,11 +32,12 @@ inline void no_unused_warning(const volatile T&) #endif template -void do_check(const T&) +BOOST_TT_PROC void do_check(const T&) { typedef typename tt::aligned_storage::type t1; t1 as1 = { 0, }; must_be_pod pod1; +#ifndef TEST_CUDA_DEVICE no_unused_warning(as1); no_unused_warning(pod1); BOOST_TEST_MESSAGE(typeid(t1).name()); @@ -74,6 +75,7 @@ void do_check(const T&) const t3 as4 = { 0, }; BOOST_CHECK(as4.address() == static_cast(&as4)); #endif +#endif } TT_TEST_BEGIN(type_with_alignment) diff --git a/test/check_integral_constant.hpp b/test/check_integral_constant.hpp index a21b6c5..5dd70da 100644 --- a/test/check_integral_constant.hpp +++ b/test/check_integral_constant.hpp @@ -9,6 +9,13 @@ #include "test.hpp" +#ifdef TEST_VIA_STATIC_ASSERT + +#define BOOST_CHECK_INTEGRAL_CONSTANT(expression, expected_value) static_assert(expression == expected_value, BOOST_STRINGIZE(expression) " == " BOOST_STRINGIZE(expected_value)) +#define BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(expression, expected_value, other_value) + +#else + namespace boost{ namespace detail{ @@ -70,6 +77,7 @@ namespace boost{ }//detail }//boost +#endif #endif diff --git a/test/check_type.hpp b/test/check_type.hpp index cc539b0..8cbd385 100644 --- a/test/check_type.hpp +++ b/test/check_type.hpp @@ -22,6 +22,15 @@ expected_value: the type we expect to find. #pragma option -w-8008 -w-8066 -w-8019 #endif +#ifdef TEST_VIA_STATIC_ASSERT + +#define BOOST_CHECK_TYPE(type_expression, expected_type) static_assert(::boost::is_same< type_expression, expected_type >::value, BOOST_STRINGIZE(type_expression) " == " BOOST_STRINGIZE(expected_type)) + +#define BOOST_CHECK_TYPE3(type_expression, type_expression_suffix, expected_type) static_assert(::boost::is_same< type_expression, type_expression_suffix, expected_type >::value, BOOST_STRINGIZE(type_expression) "," BOOST_STRINGIZE(type_expression_suffix) " == " BOOST_STRINGIZE(expected_type)) + +#define BOOST_CHECK_TYPE4(type_expression, suffix1, suffix2, expected_type) static_assert(::boost::is_same< type_expression, suffix1, suffix2, expected_type >::value, BOOST_STRINGIZE(type_expression) "," BOOST_STRINGIZE(suffix1) "," BOOST_STRINGIZE(suffix2) " == " BOOST_STRINGIZE(expected_type)) + +#else #define BOOST_CHECK_TYPE(type_expression, expected_type)\ do{\ @@ -64,4 +73,4 @@ do{\ #endif - +#endif diff --git a/test/common_type_2_test.cpp b/test/common_type_2_test.cpp index 84e81a2..7d7294e 100644 --- a/test/common_type_2_test.cpp +++ b/test/common_type_2_test.cpp @@ -27,22 +27,22 @@ struct C2 {}; struct C3 : C2 {}; struct C1C2 { - C1C2() {} - C1C2(C1 const&) {} - C1C2(C2 const&) {} - C1C2& operator=(C1C2 const&) { + BOOST_TT_PROC C1C2() {} + BOOST_TT_PROC C1C2(C1 const&) {} + BOOST_TT_PROC C1C2(C2 const&) {} + BOOST_TT_PROC C1C2& operator=(C1C2 const&) { return *this; } }; template -void proc2(typename boost::common_type::type const& ) {} +BOOST_TT_PROC void proc2(typename boost::common_type::type const& ) {} template -void proc3(typename boost::common_type::type const& ) {} +BOOST_TT_PROC void proc3(typename boost::common_type::type const& ) {} template -void assignation_2() { +BOOST_TT_PROC void assignation_2() { typedef typename boost::common_type::type AC; A a; C c; @@ -56,7 +56,7 @@ typedef typename boost::common_type::type AC; } template -void assignation_3() { +BOOST_TT_PROC void assignation_3() { typedef typename boost::common_type::type ABC; A a; B b; @@ -72,11 +72,11 @@ typedef typename boost::common_type::type ABC; proc3(c); } -C1C2 c1c2; -C1 c1; +BOOST_TT_PROC C1C2 c1c2; +BOOST_TT_PROC C1 c1; -int f(C1C2 ) { return 1;} -int f(C1 ) { return 2;} +BOOST_TT_PROC int f(C1C2 ) { return 1;} +BOOST_TT_PROC int f(C1 ) { return 2;} template OSTREAM& operator<<(OSTREAM& os, C1 const&) {return os;} diff --git a/test/common_type_5_test.cpp b/test/common_type_5_test.cpp index 6009372..d2018b5 100644 --- a/test/common_type_5_test.cpp +++ b/test/common_type_5_test.cpp @@ -17,8 +17,8 @@ template struct X { T t_; - X(): t_() {} - template X( X const & x ): t_( x.t_ ) {} + BOOST_TT_PROC X(): t_() {} + template BOOST_TT_PROC X( X const & x ): t_( x.t_ ) {} }; namespace boost diff --git a/test/common_type_test.cpp b/test/common_type_test.cpp index a01d1ba..00a3b6d 100644 --- a/test/common_type_test.cpp +++ b/test/common_type_test.cpp @@ -25,22 +25,22 @@ struct C2 {}; struct C3 : C2 {}; struct C1C2 { - C1C2() {} - C1C2(C1 const&) {} - C1C2(C2 const&) {} - C1C2& operator=(C1C2 const&) { + BOOST_TT_PROC C1C2() {} + BOOST_TT_PROC C1C2(C1 const&) {} + BOOST_TT_PROC C1C2(C2 const&) {} + BOOST_TT_PROC C1C2& operator=(C1C2 const&) { return *this; } }; template -void proc2(typename boost::common_type::type const& ) {} +BOOST_TT_PROC void proc2(typename boost::common_type::type const& ) {} template -void proc3(typename boost::common_type::type const& ) {} +BOOST_TT_PROC void proc3(typename boost::common_type::type const& ) {} template -void assignation_2() { +BOOST_TT_PROC void assignation_2() { typedef typename boost::common_type::type AC; A a; C c; @@ -54,7 +54,7 @@ typedef typename boost::common_type::type AC; } template -void assignation_3() { +BOOST_TT_PROC void assignation_3() { typedef typename boost::common_type::type ABC; A a; B b; @@ -70,17 +70,17 @@ typedef typename boost::common_type::type ABC; proc3(c); } -C1C2 c1c2; -C1 c1; +BOOST_TT_PROC C1C2 c1c2; +BOOST_TT_PROC C1 c1; -int f(C1C2 ) { return 1;} -int f(C1 ) { return 2;} +BOOST_TT_PROC int f(C1C2 ) { return 1;} +BOOST_TT_PROC int f(C1 ) { return 2;} template OSTREAM& operator<<(OSTREAM& os, C1 const&) {return os;} -C1C2& declval_C1C2() {return c1c2;} -C1& declval_C1(){return c1;} -bool declval_bool(){return true;} +BOOST_TT_PROC C1C2& declval_C1C2() {return c1c2;} +BOOST_TT_PROC C1& declval_C1(){return c1;} +BOOST_TT_PROC bool declval_bool(){return true;} TT_TEST_BEGIN(common_type) diff --git a/test/cuda/boost-no-inspect b/test/cuda/boost-no-inspect new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/test/cuda/boost-no-inspect @@ -0,0 +1 @@ + diff --git a/test/cuda/cuda_tests.txt b/test/cuda/cuda_tests.txt new file mode 100644 index 0000000..9a75bd5 --- /dev/null +++ b/test/cuda/cuda_tests.txt @@ -0,0 +1,188 @@ +add_const_test +add_cv_test +add_lvalue_reference_test +add_pointer_test +add_reference_test +add_rvalue_reference_test +add_volatile_test +aligned_storage_a2_test +aligned_storage_empy_test +aligned_storage_test +common_type_2_test +common_type_3_test +common_type_4_test +common_type_5_test +common_type_6_test +common_type_sfinae2_test +common_type_sfinae_test +common_type_test +conditional_test +conjunction_test +copy_cv_ref_test +copy_cv_test +copy_reference_test +cxx14_aliases_test +decay_test +detected_or_test +detected_test +disjunction_test +enable_if_test +extent_test +floating_point_promotion_test +function_traits_test +has_binary_classes0_test +has_binary_classes1_test +has_binary_classes2_test +has_binary_classes3_test +has_binary_classes4_test +has_binary_classes5_test +has_binary_classes6_test +has_binary_classes7_test +has_binary_classes8_test +has_binary_classes9_test +has_bit_and_assign_test +has_bit_and_test +has_bit_or_assign_test +has_bit_or_test +has_bit_xor_assign_test +has_bit_xor_test +has_complement_test +has_dereference_test +has_divides_assign_test +has_divides_test +has_equal_to_test +has_greater_equal_test +has_greater_test +has_left_shift_assign_test +has_left_shift_test +has_less_equal_test +has_less_test +has_logical_and_test +has_logical_not_test +has_logical_or_test +has_minus_assign_test +has_minus_test +has_modulus_assign_test +has_modulus_test +has_multiplies_assign_test +has_multiplies_test +has_negate_test +has_not_equal_to_test +has_nothrow_assign_test +has_nothrow_constr_test +has_nothrow_copy_test +has_nothrow_destructor_test +has_operator_new_test +has_plus_assign_test +has_plus_test +has_post_decrement_test +has_post_increment_test +has_postfix_classes0_test +has_postfix_classes1_test +has_postfix_classes2_test +has_postfix_classes3_test +has_pre_decrement_test +has_pre_increment_test +has_prefix_classes0_test +has_prefix_classes1_test +has_prefix_classes2_test +has_prefix_classes3_test +has_right_shift_assign_test +has_right_shift_test +has_trivial_assign_test +has_trivial_constr_test +has_trivial_copy_test +has_trivial_destructor_test +has_trivial_move_assign_test +has_trivial_move_constructor_test +has_unary_minus_test +has_unary_plus_test +has_virtual_destructor_test +is_abstract_test +is_arithmetic_test +is_array_test +is_assignable_test +is_base_and_derived_test +is_base_of_test +is_bounded_array_test +is_class_test +is_complete_test +is_complex_test +is_compound_test +is_const_test +is_constructible_test +is_convertible_test +is_copy_assignable_test +is_copy_constructible_test +is_default_constr_test +is_destructible_test +is_detected_convertible +is_detected_exact_test +is_detected_test +is_empty_test +is_enum_test +is_final_test +is_float_test +is_floating_point_test +is_function_test +is_fundamental_test +is_integral_test +is_list_constructible_test +is_lvalue_reference_test +is_member_func_test +is_member_obj_test +is_member_pointer_test +is_noncopyable_test +is_nothrow_move_assignable_test +is_nothrow_move_constructible_test +is_nothrow_swappable_test +is_object_test +is_pod_test +is_pointer_test +is_polymorphic_test +is_reference_test +is_rvalue_reference_test +is_same_test +is_scalar_test +is_scoped_enum_test +is_signed_test +is_stateless_test +is_trivially_copyable_test +is_unbounded_array_test +is_union_test +is_unscoped_enum_test +is_unsigned_test +is_virtual_base_of_test +is_void_test +is_volatile_test +make_signed_test +make_unsigned_test +make_void_test +mpl_interop_test1 +mpl_interop_test2 +mpl_interop_test3 +negation_test +promote_basic_test +promote_enum_msvc_bug_test +promote_enum_test +promote_mpl_test +rank_test +remove_all_extents_test +remove_bounds_test +remove_const_test +remove_cv_ref_test +remove_cv_test +remove_extent_test +remove_pointer_test +remove_reference_test +remove_volatile_test +tricky_abstract_type_test +tricky_add_pointer_test +tricky_function_type_test +tricky_incomplete_type_test +tricky_is_enum_test +tricky_partial_spec_test +tricky_rvalue_test +type_identity_test +type_traits_test +type_with_alignment_test diff --git a/test/decay_test.cpp b/test/decay_test.cpp index f240cb6..fc9690e 100644 --- a/test/decay_test.cpp +++ b/test/decay_test.cpp @@ -127,6 +127,7 @@ TT_TEST_BEGIN(decay) ::tt::decay::type,int (*)(int)>::value), true ); +#ifndef TEST_CUDA_DEVICE #ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS // // Don't test this if the std lib has no templated constructors (Oracle+STLPort): @@ -137,6 +138,7 @@ TT_TEST_BEGIN(decay) std::pair p3 = boost::make_pair( L"foo", "bar" ); std::pair p4 = boost::make_pair( L"foo", 1 ); #endif +#endif #endif // // Todo: make these work sometime. The test id not directly diff --git a/test/enable_if_test.cpp b/test/enable_if_test.cpp index f3a30a0..92c7865 100644 --- a/test/enable_if_test.cpp +++ b/test/enable_if_test.cpp @@ -27,12 +27,12 @@ struct Check class Construct { public: template - Construct(T, typename boost::enable_if_::value>::type* = 0) + BOOST_TT_PROC Construct(T, typename boost::enable_if_::value>::type* = 0) : value_(true) { } template - Construct(T, typename boost::enable_if_::value>::type* = 0) + BOOST_TT_PROC Construct(T, typename boost::enable_if_::value>::type* = 0) : value_(false) { } - bool value() const { + BOOST_TT_PROC bool value() const { return value_; } private: @@ -51,26 +51,26 @@ struct Specialize::value>::type> : Constant { }; template -typename boost::enable_if_::value, bool>::type Returns(T) +BOOST_TT_PROC typename boost::enable_if_::value, bool>::type Returns(T) { return true; } template -typename boost::enable_if_::value, bool>::type Returns(T) +BOOST_TT_PROC typename boost::enable_if_::value, bool>::type Returns(T) { return false; } #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) template -boost::enable_if_t::value, bool> Alias(T) +BOOST_TT_PROC boost::enable_if_t::value, bool> Alias(T) { return true; } template -boost::enable_if_t::value, bool> Alias(T) +BOOST_TT_PROC boost::enable_if_t::value, bool> Alias(T) { return false; } diff --git a/test/has_binary_classes.hpp b/test/has_binary_classes.hpp index 1ecf60d..2a271f4 100644 --- a/test/has_binary_classes.hpp +++ b/test/has_binary_classes.hpp @@ -7,246 +7,246 @@ #define TT_HAS_BINARY_CLASSES_HPP struct ret { }; -ret ret_val; +BOOST_TT_PROC ret ret_val; -class C000 { C000(); public: C000(int) { } }; -void operator+(C000, C000) { } +class C000 { BOOST_TT_PROC C000(); public: BOOST_TT_PROC C000(int) { } }; +BOOST_TT_PROC void operator+(C000, C000) { } -class C001 { C001(); public: C001(int) { } }; -ret operator+(C001, C001) { return ret_val; } +class C001 { BOOST_TT_PROC C001(); public: BOOST_TT_PROC C001(int) { } }; +BOOST_TT_PROC ret operator+(C001, C001) { return ret_val; } -class C002 { C002(); public: C002(int) { } }; -ret const operator+(C002, C002) { return ret_val; } +class C002 { BOOST_TT_PROC C002(); public: BOOST_TT_PROC C002(int) { } }; +BOOST_TT_PROC ret const operator+(C002, C002) { return ret_val; } -class C005 { C005(); public: C005(int) { } }; -ret & operator+(C005, C005) { return ret_val; } +class C005 { BOOST_TT_PROC C005(); public: BOOST_TT_PROC C005(int) { } }; +BOOST_TT_PROC ret & operator+(C005, C005) { return ret_val; } -class C006 { C006(); public: C006(int) { } }; -ret const & operator+(C006, C006) { return ret_val; } +class C006 { BOOST_TT_PROC C006(); public: BOOST_TT_PROC C006(int) { } }; +BOOST_TT_PROC ret const & operator+(C006, C006) { return ret_val; } -class C009 { C009(); public: C009(int) { } }; -void operator+(C009, C009 const) { } +class C009 { BOOST_TT_PROC C009(); public: BOOST_TT_PROC C009(int) { } }; +BOOST_TT_PROC void operator+(C009, C009 const) { } -class C010 { C010(); public: C010(int) { } }; -ret operator+(C010, C010 const) { return ret_val; } +class C010 { BOOST_TT_PROC C010(); public: BOOST_TT_PROC C010(int) { } }; +BOOST_TT_PROC ret operator+(C010, C010 const) { return ret_val; } -class C011 { C011(); public: C011(int) { } }; -ret const operator+(C011, C011 const) { return ret_val; } +class C011 { BOOST_TT_PROC C011(); public: BOOST_TT_PROC C011(int) { } }; +BOOST_TT_PROC ret const operator+(C011, C011 const) { return ret_val; } -class C014 { C014(); public: C014(int) { } }; -ret & operator+(C014, C014 const) { return ret_val; } +class C014 { BOOST_TT_PROC C014(); public: BOOST_TT_PROC C014(int) { } }; +BOOST_TT_PROC ret & operator+(C014, C014 const) { return ret_val; } -class C015 { C015(); public: C015(int) { } }; -ret const & operator+(C015, C015 const) { return ret_val; } +class C015 { BOOST_TT_PROC C015(); public: BOOST_TT_PROC C015(int) { } }; +BOOST_TT_PROC ret const & operator+(C015, C015 const) { return ret_val; } -class C036 { C036(); public: C036(int) { } }; -void operator+(C036, C036 &) { } +class C036 { BOOST_TT_PROC C036(); public: BOOST_TT_PROC C036(int) { } }; +BOOST_TT_PROC void operator+(C036, C036 &) { } -class C037 { C037(); public: C037(int) { } }; -ret operator+(C037, C037 &) { return ret_val; } +class C037 { BOOST_TT_PROC C037(); public: BOOST_TT_PROC C037(int) { } }; +BOOST_TT_PROC ret operator+(C037, C037 &) { return ret_val; } -class C038 { C038(); public: C038(int) { } }; -ret const operator+(C038, C038 &) { return ret_val; } +class C038 { BOOST_TT_PROC C038(); public: BOOST_TT_PROC C038(int) { } }; +BOOST_TT_PROC ret const operator+(C038, C038 &) { return ret_val; } -class C041 { C041(); public: C041(int) { } }; -ret & operator+(C041, C041 &) { return ret_val; } +class C041 { BOOST_TT_PROC C041(); public: BOOST_TT_PROC C041(int) { } }; +BOOST_TT_PROC ret & operator+(C041, C041 &) { return ret_val; } -class C042 { C042(); public: C042(int) { } }; -ret const & operator+(C042, C042 &) { return ret_val; } +class C042 { BOOST_TT_PROC C042(); public: BOOST_TT_PROC C042(int) { } }; +BOOST_TT_PROC ret const & operator+(C042, C042 &) { return ret_val; } -class C045 { C045(); public: C045(int) { } }; -void operator+(C045, C045 const &) { } +class C045 { BOOST_TT_PROC C045(); public: BOOST_TT_PROC C045(int) { } }; +BOOST_TT_PROC void operator+(C045, C045 const &) { } -class C046 { C046(); public: C046(int) { } }; -ret operator+(C046, C046 const &) { return ret_val; } +class C046 { BOOST_TT_PROC C046(); public: BOOST_TT_PROC C046(int) { } }; +BOOST_TT_PROC ret operator+(C046, C046 const &) { return ret_val; } -class C047 { C047(); public: C047(int) { } }; -ret const operator+(C047, C047 const &) { return ret_val; } +class C047 { BOOST_TT_PROC C047(); public: BOOST_TT_PROC C047(int) { } }; +BOOST_TT_PROC ret const operator+(C047, C047 const &) { return ret_val; } -class C050 { C050(); public: C050(int) { } }; -ret & operator+(C050, C050 const &) { return ret_val; } +class C050 { BOOST_TT_PROC C050(); public: BOOST_TT_PROC C050(int) { } }; +BOOST_TT_PROC ret & operator+(C050, C050 const &) { return ret_val; } -class C051 { C051(); public: C051(int) { } }; -ret const & operator+(C051, C051 const &) { return ret_val; } +class C051 { BOOST_TT_PROC C051(); public: BOOST_TT_PROC C051(int) { } }; +BOOST_TT_PROC ret const & operator+(C051, C051 const &) { return ret_val; } -class C072 { C072(); public: C072(int) { } }; -void operator+(C072 const, C072) { } +class C072 { BOOST_TT_PROC C072(); public: BOOST_TT_PROC C072(int) { } }; +BOOST_TT_PROC void operator+(C072 const, C072) { } -class C073 { C073(); public: C073(int) { } }; -ret operator+(C073 const, C073) { return ret_val; } +class C073 { BOOST_TT_PROC C073(); public: BOOST_TT_PROC C073(int) { } }; +BOOST_TT_PROC ret operator+(C073 const, C073) { return ret_val; } -class C074 { C074(); public: C074(int) { } }; -ret const operator+(C074 const, C074) { return ret_val; } +class C074 { BOOST_TT_PROC C074(); public: BOOST_TT_PROC C074(int) { } }; +BOOST_TT_PROC ret const operator+(C074 const, C074) { return ret_val; } -class C077 { C077(); public: C077(int) { } }; -ret & operator+(C077 const, C077) { return ret_val; } +class C077 { BOOST_TT_PROC C077(); public: BOOST_TT_PROC C077(int) { } }; +BOOST_TT_PROC ret & operator+(C077 const, C077) { return ret_val; } -class C078 { C078(); public: C078(int) { } }; -ret const & operator+(C078 const, C078) { return ret_val; } +class C078 { BOOST_TT_PROC C078(); public: BOOST_TT_PROC C078(int) { } }; +BOOST_TT_PROC ret const & operator+(C078 const, C078) { return ret_val; } -class C081 { C081(); public: C081(int) { } }; -void operator+(C081 const, C081 const) { } +class C081 { BOOST_TT_PROC C081(); public: BOOST_TT_PROC C081(int) { } }; +BOOST_TT_PROC void operator+(C081 const, C081 const) { } -class C082 { C082(); public: C082(int) { } }; -ret operator+(C082 const, C082 const) { return ret_val; } +class C082 { BOOST_TT_PROC C082(); public: BOOST_TT_PROC C082(int) { } }; +BOOST_TT_PROC ret operator+(C082 const, C082 const) { return ret_val; } -class C083 { C083(); public: C083(int) { } }; -ret const operator+(C083 const, C083 const) { return ret_val; } +class C083 { BOOST_TT_PROC C083(); public: BOOST_TT_PROC C083(int) { } }; +BOOST_TT_PROC ret const operator+(C083 const, C083 const) { return ret_val; } -class C086 { C086(); public: C086(int) { } }; -ret & operator+(C086 const, C086 const) { return ret_val; } +class C086 { BOOST_TT_PROC C086(); public: BOOST_TT_PROC C086(int) { } }; +BOOST_TT_PROC ret & operator+(C086 const, C086 const) { return ret_val; } -class C087 { C087(); public: C087(int) { } }; -ret const & operator+(C087 const, C087 const) { return ret_val; } +class C087 { BOOST_TT_PROC C087(); public: BOOST_TT_PROC C087(int) { } }; +BOOST_TT_PROC ret const & operator+(C087 const, C087 const) { return ret_val; } -class C108 { C108(); public: C108(int) { } }; -void operator+(C108 const, C108 &) { } +class C108 { BOOST_TT_PROC C108(); public: BOOST_TT_PROC C108(int) { } }; +BOOST_TT_PROC void operator+(C108 const, C108 &) { } -class C109 { C109(); public: C109(int) { } }; -ret operator+(C109 const, C109 &) { return ret_val; } +class C109 { BOOST_TT_PROC C109(); public: BOOST_TT_PROC C109(int) { } }; +BOOST_TT_PROC ret operator+(C109 const, C109 &) { return ret_val; } -class C110 { C110(); public: C110(int) { } }; -ret const operator+(C110 const, C110 &) { return ret_val; } +class C110 { BOOST_TT_PROC C110(); public: BOOST_TT_PROC C110(int) { } }; +BOOST_TT_PROC ret const operator+(C110 const, C110 &) { return ret_val; } -class C113 { C113(); public: C113(int) { } }; -ret & operator+(C113 const, C113 &) { return ret_val; } +class C113 { BOOST_TT_PROC C113(); public: BOOST_TT_PROC C113(int) { } }; +BOOST_TT_PROC ret & operator+(C113 const, C113 &) { return ret_val; } -class C114 { C114(); public: C114(int) { } }; -ret const & operator+(C114 const, C114 &) { return ret_val; } +class C114 { BOOST_TT_PROC C114(); public: BOOST_TT_PROC C114(int) { } }; +BOOST_TT_PROC ret const & operator+(C114 const, C114 &) { return ret_val; } -class C117 { C117(); public: C117(int) { } }; -void operator+(C117 const, C117 const &) { } +class C117 { BOOST_TT_PROC C117(); public: BOOST_TT_PROC C117(int) { } }; +BOOST_TT_PROC void operator+(C117 const, C117 const &) { } -class C118 { C118(); public: C118(int) { } }; -ret operator+(C118 const, C118 const &) { return ret_val; } +class C118 { BOOST_TT_PROC C118(); public: BOOST_TT_PROC C118(int) { } }; +BOOST_TT_PROC ret operator+(C118 const, C118 const &) { return ret_val; } -class C119 { C119(); public: C119(int) { } }; -ret const operator+(C119 const, C119 const &) { return ret_val; } +class C119 { BOOST_TT_PROC C119(); public: BOOST_TT_PROC C119(int) { } }; +BOOST_TT_PROC ret const operator+(C119 const, C119 const &) { return ret_val; } -class C122 { C122(); public: C122(int) { } }; -ret & operator+(C122 const, C122 const &) { return ret_val; } +class C122 { BOOST_TT_PROC C122(); public: BOOST_TT_PROC C122(int) { } }; +BOOST_TT_PROC ret & operator+(C122 const, C122 const &) { return ret_val; } -class C123 { C123(); public: C123(int) { } }; -ret const & operator+(C123 const, C123 const &) { return ret_val; } +class C123 { BOOST_TT_PROC C123(); public: BOOST_TT_PROC C123(int) { } }; +BOOST_TT_PROC ret const & operator+(C123 const, C123 const &) { return ret_val; } -class C288 { C288(); public: C288(int) { } }; -void operator+(C288 &, C288) { } +class C288 { BOOST_TT_PROC C288(); public: BOOST_TT_PROC C288(int) { } }; +BOOST_TT_PROC void operator+(C288 &, C288) { } -class C289 { C289(); public: C289(int) { } }; -ret operator+(C289 &, C289) { return ret_val; } +class C289 { BOOST_TT_PROC C289(); public: BOOST_TT_PROC C289(int) { } }; +BOOST_TT_PROC ret operator+(C289 &, C289) { return ret_val; } -class C290 { C290(); public: C290(int) { } }; -ret const operator+(C290 &, C290) { return ret_val; } +class C290 { BOOST_TT_PROC C290(); public: BOOST_TT_PROC C290(int) { } }; +BOOST_TT_PROC ret const operator+(C290 &, C290) { return ret_val; } -class C293 { C293(); public: C293(int) { } }; -ret & operator+(C293 &, C293) { return ret_val; } +class C293 { BOOST_TT_PROC C293(); public: BOOST_TT_PROC C293(int) { } }; +BOOST_TT_PROC ret & operator+(C293 &, C293) { return ret_val; } -class C294 { C294(); public: C294(int) { } }; -ret const & operator+(C294 &, C294) { return ret_val; } +class C294 { BOOST_TT_PROC C294(); public: BOOST_TT_PROC C294(int) { } }; +BOOST_TT_PROC ret const & operator+(C294 &, C294) { return ret_val; } -class C297 { C297(); public: C297(int) { } }; -void operator+(C297 &, C297 const) { } +class C297 { BOOST_TT_PROC C297(); public: BOOST_TT_PROC C297(int) { } }; +BOOST_TT_PROC void operator+(C297 &, C297 const) { } -class C298 { C298(); public: C298(int) { } }; -ret operator+(C298 &, C298 const) { return ret_val; } +class C298 { BOOST_TT_PROC C298(); public: BOOST_TT_PROC C298(int) { } }; +BOOST_TT_PROC ret operator+(C298 &, C298 const) { return ret_val; } -class C299 { C299(); public: C299(int) { } }; -ret const operator+(C299 &, C299 const) { return ret_val; } +class C299 { BOOST_TT_PROC C299(); public: BOOST_TT_PROC C299(int) { } }; +BOOST_TT_PROC ret const operator+(C299 &, C299 const) { return ret_val; } -class C302 { C302(); public: C302(int) { } }; -ret & operator+(C302 &, C302 const) { return ret_val; } +class C302 { BOOST_TT_PROC C302(); public: BOOST_TT_PROC C302(int) { } }; +BOOST_TT_PROC ret & operator+(C302 &, C302 const) { return ret_val; } -class C303 { C303(); public: C303(int) { } }; -ret const & operator+(C303 &, C303 const) { return ret_val; } +class C303 { BOOST_TT_PROC C303(); public: BOOST_TT_PROC C303(int) { } }; +BOOST_TT_PROC ret const & operator+(C303 &, C303 const) { return ret_val; } -class C324 { C324(); public: C324(int) { } }; -void operator+(C324 &, C324 &) { } +class C324 { BOOST_TT_PROC C324(); public: BOOST_TT_PROC C324(int) { } }; +BOOST_TT_PROC void operator+(C324 &, C324 &) { } -class C325 { C325(); public: C325(int) { } }; -ret operator+(C325 &, C325 &) { return ret_val; } +class C325 { BOOST_TT_PROC C325(); public: BOOST_TT_PROC C325(int) { } }; +BOOST_TT_PROC ret operator+(C325 &, C325 &) { return ret_val; } -class C326 { C326(); public: C326(int) { } }; -ret const operator+(C326 &, C326 &) { return ret_val; } +class C326 { BOOST_TT_PROC C326(); public: BOOST_TT_PROC C326(int) { } }; +BOOST_TT_PROC ret const operator+(C326 &, C326 &) { return ret_val; } -class C329 { C329(); public: C329(int) { } }; -ret & operator+(C329 &, C329 &) { return ret_val; } +class C329 { BOOST_TT_PROC C329(); public: BOOST_TT_PROC C329(int) { } }; +BOOST_TT_PROC ret & operator+(C329 &, C329 &) { return ret_val; } -class C330 { C330(); public: C330(int) { } }; -ret const & operator+(C330 &, C330 &) { return ret_val; } +class C330 { BOOST_TT_PROC C330(); public: BOOST_TT_PROC C330(int) { } }; +BOOST_TT_PROC ret const & operator+(C330 &, C330 &) { return ret_val; } -class C333 { C333(); public: C333(int) { } }; -void operator+(C333 &, C333 const &) { } +class C333 { BOOST_TT_PROC C333(); public: BOOST_TT_PROC C333(int) { } }; +BOOST_TT_PROC void operator+(C333 &, C333 const &) { } -class C334 { C334(); public: C334(int) { } }; -ret operator+(C334 &, C334 const &) { return ret_val; } +class C334 { BOOST_TT_PROC C334(); public: BOOST_TT_PROC C334(int) { } }; +BOOST_TT_PROC ret operator+(C334 &, C334 const &) { return ret_val; } -class C335 { C335(); public: C335(int) { } }; -ret const operator+(C335 &, C335 const &) { return ret_val; } +class C335 { BOOST_TT_PROC C335(); public: BOOST_TT_PROC C335(int) { } }; +BOOST_TT_PROC ret const operator+(C335 &, C335 const &) { return ret_val; } -class C338 { C338(); public: C338(int) { } }; -ret & operator+(C338 &, C338 const &) { return ret_val; } +class C338 { BOOST_TT_PROC C338(); public: BOOST_TT_PROC C338(int) { } }; +BOOST_TT_PROC ret & operator+(C338 &, C338 const &) { return ret_val; } -class C339 { C339(); public: C339(int) { } }; -ret const & operator+(C339 &, C339 const &) { return ret_val; } +class C339 { BOOST_TT_PROC C339(); public: BOOST_TT_PROC C339(int) { } }; +BOOST_TT_PROC ret const & operator+(C339 &, C339 const &) { return ret_val; } -class C360 { C360(); public: C360(int) { } }; -void operator+(C360 const &, C360) { } +class C360 { BOOST_TT_PROC C360(); public: BOOST_TT_PROC C360(int) { } }; +BOOST_TT_PROC void operator+(C360 const &, C360) { } -class C361 { C361(); public: C361(int) { } }; -ret operator+(C361 const &, C361) { return ret_val; } +class C361 { BOOST_TT_PROC C361(); public: BOOST_TT_PROC C361(int) { } }; +BOOST_TT_PROC ret operator+(C361 const &, C361) { return ret_val; } -class C362 { C362(); public: C362(int) { } }; -ret const operator+(C362 const &, C362) { return ret_val; } +class C362 { BOOST_TT_PROC C362(); public: BOOST_TT_PROC C362(int) { } }; +BOOST_TT_PROC ret const operator+(C362 const &, C362) { return ret_val; } -class C365 { C365(); public: C365(int) { } }; -ret & operator+(C365 const &, C365) { return ret_val; } +class C365 { BOOST_TT_PROC C365(); public: BOOST_TT_PROC C365(int) { } }; +BOOST_TT_PROC ret & operator+(C365 const &, C365) { return ret_val; } -class C366 { C366(); public: C366(int) { } }; -ret const & operator+(C366 const &, C366) { return ret_val; } +class C366 { BOOST_TT_PROC C366(); public: BOOST_TT_PROC C366(int) { } }; +BOOST_TT_PROC ret const & operator+(C366 const &, C366) { return ret_val; } -class C369 { C369(); public: C369(int) { } }; -void operator+(C369 const &, C369 const) { } +class C369 { BOOST_TT_PROC C369(); public: BOOST_TT_PROC C369(int) { } }; +BOOST_TT_PROC void operator+(C369 const &, C369 const) { } -class C370 { C370(); public: C370(int) { } }; -ret operator+(C370 const &, C370 const) { return ret_val; } +class C370 { BOOST_TT_PROC C370(); public: BOOST_TT_PROC C370(int) { } }; +BOOST_TT_PROC ret operator+(C370 const &, C370 const) { return ret_val; } -class C371 { C371(); public: C371(int) { } }; -ret const operator+(C371 const &, C371 const) { return ret_val; } +class C371 { BOOST_TT_PROC C371(); public: BOOST_TT_PROC C371(int) { } }; +BOOST_TT_PROC ret const operator+(C371 const &, C371 const) { return ret_val; } -class C374 { C374(); public: C374(int) { } }; -ret & operator+(C374 const &, C374 const) { return ret_val; } +class C374 { BOOST_TT_PROC C374(); public: BOOST_TT_PROC C374(int) { } }; +BOOST_TT_PROC ret & operator+(C374 const &, C374 const) { return ret_val; } -class C375 { C375(); public: C375(int) { } }; -ret const & operator+(C375 const &, C375 const) { return ret_val; } +class C375 { BOOST_TT_PROC C375(); public: BOOST_TT_PROC C375(int) { } }; +BOOST_TT_PROC ret const & operator+(C375 const &, C375 const) { return ret_val; } -class C396 { C396(); public: C396(int) { } }; -void operator+(C396 const &, C396 &) { } +class C396 { BOOST_TT_PROC C396(); public: BOOST_TT_PROC C396(int) { } }; +BOOST_TT_PROC void operator+(C396 const &, C396 &) { } -class C397 { C397(); public: C397(int) { } }; -ret operator+(C397 const &, C397 &) { return ret_val; } +class C397 { BOOST_TT_PROC C397(); public: BOOST_TT_PROC C397(int) { } }; +BOOST_TT_PROC ret operator+(C397 const &, C397 &) { return ret_val; } -class C398 { C398(); public: C398(int) { } }; -ret const operator+(C398 const &, C398 &) { return ret_val; } +class C398 { BOOST_TT_PROC C398(); public: BOOST_TT_PROC C398(int) { } }; +BOOST_TT_PROC ret const operator+(C398 const &, C398 &) { return ret_val; } -class C401 { C401(); public: C401(int) { } }; -ret & operator+(C401 const &, C401 &) { return ret_val; } +class C401 { BOOST_TT_PROC C401(); public: BOOST_TT_PROC C401(int) { } }; +BOOST_TT_PROC ret & operator+(C401 const &, C401 &) { return ret_val; } -class C402 { C402(); public: C402(int) { } }; -ret const & operator+(C402 const &, C402 &) { return ret_val; } +class C402 { BOOST_TT_PROC C402(); public: BOOST_TT_PROC C402(int) { } }; +BOOST_TT_PROC ret const & operator+(C402 const &, C402 &) { return ret_val; } -class C405 { C405(); public: C405(int) { } }; -void operator+(C405 const &, C405 const &) { } +class C405 { BOOST_TT_PROC C405(); public: BOOST_TT_PROC C405(int) { } }; +BOOST_TT_PROC void operator+(C405 const &, C405 const &) { } -class C406 { C406(); public: C406(int) { } }; -ret operator+(C406 const &, C406 const &) { return ret_val; } +class C406 { BOOST_TT_PROC C406(); public: BOOST_TT_PROC C406(int) { } }; +BOOST_TT_PROC ret operator+(C406 const &, C406 const &) { return ret_val; } -class C407 { C407(); public: C407(int) { } }; -ret const operator+(C407 const &, C407 const &) { return ret_val; } +class C407 { BOOST_TT_PROC C407(); public: BOOST_TT_PROC C407(int) { } }; +BOOST_TT_PROC ret const operator+(C407 const &, C407 const &) { return ret_val; } -class C410 { C410(); public: C410(int) { } }; -ret & operator+(C410 const &, C410 const &) { return ret_val; } +class C410 { BOOST_TT_PROC C410(); public: BOOST_TT_PROC C410(int) { } }; +BOOST_TT_PROC ret & operator+(C410 const &, C410 const &) { return ret_val; } -class C411 { C411(); public: C411(int) { } }; -ret const & operator+(C411 const &, C411 const &) { return ret_val; } +class C411 { BOOST_TT_PROC C411(); public: BOOST_TT_PROC C411(int) { } }; +BOOST_TT_PROC ret const & operator+(C411 const &, C411 const &) { return ret_val; } #endif diff --git a/test/has_binary_operators.hpp b/test/has_binary_operators.hpp index e7610d4..335f630 100644 --- a/test/has_binary_operators.hpp +++ b/test/has_binary_operators.hpp @@ -31,53 +31,53 @@ struct without { }; struct ret { }; -struct internal { ret operator BOOST_TT_TRAIT_OP (const internal&) const; }; +struct internal { BOOST_TT_PROC ret operator BOOST_TT_TRAIT_OP (const internal&) const; }; struct external { }; -inline ret operator BOOST_TT_TRAIT_OP (const external&, const external&) { return ret(); } +inline BOOST_TT_PROC ret operator BOOST_TT_TRAIT_OP (const external&, const external&) { return ret(); } struct comma1_ret { }; -struct ret_with_comma1 { comma1_ret operator,(int); }; +struct ret_with_comma1 { BOOST_TT_PROC comma1_ret operator,(int); }; -struct internal_comma1 { ret_with_comma1 operator BOOST_TT_TRAIT_OP (const internal_comma1&) const; }; +struct internal_comma1 { BOOST_TT_PROC ret_with_comma1 operator BOOST_TT_TRAIT_OP (const internal_comma1&) const; }; struct external_comma1 { }; -ret_with_comma1 operator BOOST_TT_TRAIT_OP (const external_comma1&, const external_comma1&) { return ret_with_comma1(); } +BOOST_TT_PROC ret_with_comma1 operator BOOST_TT_TRAIT_OP (const external_comma1&, const external_comma1&) { return ret_with_comma1(); } -struct ret_with_comma2 { void operator,(int); }; +struct ret_with_comma2 { BOOST_TT_PROC void operator,(int); }; -struct internal_comma2 { ret_with_comma2 operator BOOST_TT_TRAIT_OP (const internal_comma2&) const; }; +struct internal_comma2 { BOOST_TT_PROC ret_with_comma2 operator BOOST_TT_TRAIT_OP (const internal_comma2&) const; }; struct external_comma2 { }; -ret_with_comma2 operator BOOST_TT_TRAIT_OP (const external_comma2&, const external_comma2&){ return ret_with_comma2(); } +BOOST_TT_PROC ret_with_comma2 operator BOOST_TT_TRAIT_OP (const external_comma2&, const external_comma2&){ return ret_with_comma2(); } -struct returns_int { int operator BOOST_TT_TRAIT_OP (const returns_int&)const; }; +struct returns_int { BOOST_TT_PROC int operator BOOST_TT_TRAIT_OP (const returns_int&)const; }; -struct returns_void { void operator BOOST_TT_TRAIT_OP (const returns_void&)const; }; +struct returns_void { BOOST_TT_PROC void operator BOOST_TT_TRAIT_OP (const returns_void&)const; }; -struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (const returns_void_star&)const; }; +struct returns_void_star { BOOST_TT_PROC void *operator BOOST_TT_TRAIT_OP (const returns_void_star&)const; }; -struct returns_double { double operator BOOST_TT_TRAIT_OP (const returns_double&)const; }; +struct returns_double { BOOST_TT_PROC double operator BOOST_TT_TRAIT_OP (const returns_double&)const; }; struct ret1 { }; -struct convertible_to_ret1 { operator ret1 () const; }; -struct returns_convertible_to_ret1 { convertible_to_ret1 operator BOOST_TT_TRAIT_OP (const returns_convertible_to_ret1&)const; }; +struct convertible_to_ret1 { BOOST_TT_PROC operator ret1 () const; }; +struct returns_convertible_to_ret1 { BOOST_TT_PROC convertible_to_ret1 operator BOOST_TT_TRAIT_OP (const returns_convertible_to_ret1&)const; }; struct convertible_to_ret2 { }; -struct ret2 { ret2(const convertible_to_ret2); }; -struct returns_convertible_to_ret2 { convertible_to_ret2 operator BOOST_TT_TRAIT_OP (const returns_convertible_to_ret2&)const; }; +struct ret2 { BOOST_TT_PROC ret2(const convertible_to_ret2); }; +struct returns_convertible_to_ret2 { BOOST_TT_PROC convertible_to_ret2 operator BOOST_TT_TRAIT_OP (const returns_convertible_to_ret2&)const; }; class Base1 { }; class Derived1 : public Base1 { }; -bool operator BOOST_TT_TRAIT_OP (const Base1&, const Base1&) { return true; } +BOOST_TT_PROC bool operator BOOST_TT_TRAIT_OP (const Base1&, const Base1&) { return true; } class Base2 { }; struct Derived2 : public Base2 { - Derived2(int); // to check if it works with a class that is not default constructible + BOOST_TT_PROC Derived2(int); // to check if it works with a class that is not default constructible }; -bool operator BOOST_TT_TRAIT_OP (const Derived2&, const Derived2&) { return true; } +BOOST_TT_PROC bool operator BOOST_TT_TRAIT_OP (const Derived2&, const Derived2&) { return true; } struct tag { }; @@ -86,21 +86,21 @@ struct B : public A { }; struct C { }; struct D { }; -inline bool operator BOOST_TT_TRAIT_OP (const C&, void*) { return true; } -inline bool operator BOOST_TT_TRAIT_OP (void*, const D&) { return true; } -inline bool operator BOOST_TT_TRAIT_OP (const C&, const D&) { return true; } +BOOST_TT_PROC inline bool operator BOOST_TT_TRAIT_OP (const C&, void*) { return true; } +BOOST_TT_PROC inline bool operator BOOST_TT_TRAIT_OP (void*, const D&) { return true; } +BOOST_TT_PROC inline bool operator BOOST_TT_TRAIT_OP (const C&, const D&) { return true; } -struct private_op { private: void operator BOOST_TT_TRAIT_OP (const private_op&) {} }; +struct private_op { private: BOOST_TT_PROC void operator BOOST_TT_TRAIT_OP (const private_op&) {} }; struct ambiguous_A { }; -inline bool operator BOOST_TT_TRAIT_OP (const ambiguous_A&, const ambiguous_A&) { return true; } -struct ambiguous_B { operator ambiguous_A()const { return ambiguous_A(); } }; +inline BOOST_TT_PROC bool operator BOOST_TT_TRAIT_OP (const ambiguous_A&, const ambiguous_A&) { return true; } +struct ambiguous_B { BOOST_TT_PROC operator ambiguous_A()const { return ambiguous_A(); } }; //class internal_private { ret operator BOOST_TT_TRAIT_OP (const internal_private&) const; }; -void common() { +BOOST_TT_PROC void common() { TEST_T(void, false); TEST_TT(void, void, false); TEST_TTR(void, void, void, false); diff --git a/test/has_bit_and_assign_test.cpp b/test/has_bit_and_assign_test.cpp index 13e2ee2..1b0ad38 100644 --- a/test/has_bit_and_assign_test.cpp +++ b/test/has_bit_and_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_bit_and_test.cpp b/test/has_bit_and_test.cpp index 7daac17..d8ae3e0 100644 --- a/test/has_bit_and_test.cpp +++ b/test/has_bit_and_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_bit_or_assign_test.cpp b/test/has_bit_or_assign_test.cpp index c1baaa0..d34b213 100644 --- a/test/has_bit_or_assign_test.cpp +++ b/test/has_bit_or_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_bit_or_test.cpp b/test/has_bit_or_test.cpp index 2c50a68..49c878e 100644 --- a/test/has_bit_or_test.cpp +++ b/test/has_bit_or_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_bit_xor_assign_test.cpp b/test/has_bit_xor_assign_test.cpp index cfedbfc..e1407ce 100644 --- a/test/has_bit_xor_assign_test.cpp +++ b/test/has_bit_xor_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_bit_xor_test.cpp b/test/has_bit_xor_test.cpp index 6df2296..21db4b0 100644 --- a/test/has_bit_xor_test.cpp +++ b/test/has_bit_xor_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_complement_test.cpp b/test/has_complement_test.cpp index d1b9254..4b4fc20 100644 --- a/test/has_complement_test.cpp +++ b/test/has_complement_test.cpp @@ -21,7 +21,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_dereference_test.cpp b/test/has_dereference_test.cpp index 21aaa05..d7c4615 100644 --- a/test/has_dereference_test.cpp +++ b/test/has_dereference_test.cpp @@ -17,7 +17,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_divides_assign_test.cpp b/test/has_divides_assign_test.cpp index 9c8938b..870e2f1 100644 --- a/test/has_divides_assign_test.cpp +++ b/test/has_divides_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_divides_test.cpp b/test/has_divides_test.cpp index ca409c6..55ec7dc 100644 --- a/test/has_divides_test.cpp +++ b/test/has_divides_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); diff --git a/test/has_equal_to_test.cpp b/test/has_equal_to_test.cpp index 39a7ff2..d55a7ee 100644 --- a/test/has_equal_to_test.cpp +++ b/test/has_equal_to_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_greater_equal_test.cpp b/test/has_greater_equal_test.cpp index 501d98b..2362547 100644 --- a/test/has_greater_equal_test.cpp +++ b/test/has_greater_equal_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_greater_test.cpp b/test/has_greater_test.cpp index f2daef7..114ac16 100644 --- a/test/has_greater_test.cpp +++ b/test/has_greater_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_left_shift_assign_test.cpp b/test/has_left_shift_assign_test.cpp index cdf2229..040c37e 100644 --- a/test/has_left_shift_assign_test.cpp +++ b/test/has_left_shift_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_left_shift_test.cpp b/test/has_left_shift_test.cpp index 9339764..db14d48 100644 --- a/test/has_left_shift_test.cpp +++ b/test/has_left_shift_test.cpp @@ -23,7 +23,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_less_equal_test.cpp b/test/has_less_equal_test.cpp index c5214d2..8e1815d 100644 --- a/test/has_less_equal_test.cpp +++ b/test/has_less_equal_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_less_test.cpp b/test/has_less_test.cpp index 40d316a..0978f9e 100644 --- a/test/has_less_test.cpp +++ b/test/has_less_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_logical_and_test.cpp b/test/has_logical_and_test.cpp index 310d2ed..69702c1 100644 --- a/test/has_logical_and_test.cpp +++ b/test/has_logical_and_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_logical_not_test.cpp b/test/has_logical_not_test.cpp index a1f7543..8e8488c 100644 --- a/test/has_logical_not_test.cpp +++ b/test/has_logical_not_test.cpp @@ -18,7 +18,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_logical_or_test.cpp b/test/has_logical_or_test.cpp index a344889..758ec16 100644 --- a/test/has_logical_or_test.cpp +++ b/test/has_logical_or_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_minus_assign_test.cpp b/test/has_minus_assign_test.cpp index 4120ce9..d1d6dda 100644 --- a/test/has_minus_assign_test.cpp +++ b/test/has_minus_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); diff --git a/test/has_minus_test.cpp b/test/has_minus_test.cpp index 9b9722e..5e3bbff 100644 --- a/test/has_minus_test.cpp +++ b/test/has_minus_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); diff --git a/test/has_modulus_assign_test.cpp b/test/has_modulus_assign_test.cpp index bd36c0a..f9148ed 100644 --- a/test/has_modulus_assign_test.cpp +++ b/test/has_modulus_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_modulus_test.cpp b/test/has_modulus_test.cpp index 64706cb..e6f79af 100644 --- a/test/has_modulus_test.cpp +++ b/test/has_modulus_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); diff --git a/test/has_multiplies_assign_test.cpp b/test/has_multiplies_assign_test.cpp index ded333d..9cd2ad0 100644 --- a/test/has_multiplies_assign_test.cpp +++ b/test/has_multiplies_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); diff --git a/test/has_multiplies_test.cpp b/test/has_multiplies_test.cpp index 7569b3f..f410cd0 100644 --- a/test/has_multiplies_test.cpp +++ b/test/has_multiplies_test.cpp @@ -21,7 +21,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); diff --git a/test/has_negate_test.cpp b/test/has_negate_test.cpp index fc7be4a..4642a1f 100644 --- a/test/has_negate_test.cpp +++ b/test/has_negate_test.cpp @@ -17,7 +17,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_not_equal_to_test.cpp b/test/has_not_equal_to_test.cpp index ea4a5ad..ef35d6a 100644 --- a/test/has_not_equal_to_test.cpp +++ b/test/has_not_equal_to_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_nothrow_assign_test.cpp b/test/has_nothrow_assign_test.cpp index a1e8e1f..f8dcec7 100644 --- a/test/has_nothrow_assign_test.cpp +++ b/test/has_nothrow_assign_test.cpp @@ -16,8 +16,8 @@ struct non_assignable { - non_assignable(); - non_assignable& operator=(const non_assignable&) = delete; + BOOST_TT_PROC non_assignable(); + BOOST_TT_PROC non_assignable& operator=(const non_assignable&) = delete; }; #endif @@ -26,8 +26,8 @@ struct non_assignable struct noexcept_assignable { - noexcept_assignable(); - noexcept_assignable& operator=(const noexcept_assignable&)noexcept; + BOOST_TT_PROC noexcept_assignable(); + BOOST_TT_PROC noexcept_assignable& operator=(const noexcept_assignable&)noexcept; }; #endif diff --git a/test/has_plus_assign_test.cpp b/test/has_plus_assign_test.cpp index 488cefd..3f6a923 100644 --- a/test/has_plus_assign_test.cpp +++ b/test/has_plus_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); diff --git a/test/has_plus_test.cpp b/test/has_plus_test.cpp index 6804eb5..f808d8e 100644 --- a/test/has_plus_test.cpp +++ b/test/has_plus_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, int >::value), 0); @@ -147,6 +147,7 @@ void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* &, bool & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* &, bool const & >::value), 0); +#ifndef __NVCC__ BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, bool const >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int const & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool &, bool >::value), 0); @@ -178,6 +179,7 @@ void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, int const & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int*, bool >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int* const, int & >::value), 0); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool &, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, int & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, int >::value), 0); diff --git a/test/has_post_decrement_test.cpp b/test/has_post_decrement_test.cpp index c0f1445..109c9a4 100644 --- a/test/has_post_decrement_test.cpp +++ b/test/has_post_decrement_test.cpp @@ -17,7 +17,7 @@ #include "has_postfix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_post_increment_test.cpp b/test/has_post_increment_test.cpp index 28157b7..2b6d8f0 100644 --- a/test/has_post_increment_test.cpp +++ b/test/has_post_increment_test.cpp @@ -17,7 +17,7 @@ #include "has_postfix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_postfix_operators.hpp b/test/has_postfix_operators.hpp index 2bbcb9c..05257bd 100644 --- a/test/has_postfix_operators.hpp +++ b/test/has_postfix_operators.hpp @@ -21,59 +21,59 @@ struct without { }; struct ret { }; -struct internal { ret operator BOOST_TT_TRAIT_OP (int) const; }; +struct internal { BOOST_TT_PROC ret operator BOOST_TT_TRAIT_OP (int) const; }; struct external { }; -inline ret operator BOOST_TT_TRAIT_OP (const external&, int){ return ret(); } +inline BOOST_TT_PROC ret operator BOOST_TT_TRAIT_OP (const external&, int){ return ret(); } struct comma1_ret { }; -struct ret_with_comma1 { comma1_ret operator,(int); }; +struct ret_with_comma1 { BOOST_TT_PROC comma1_ret operator,(int); }; -struct internal_comma1 { ret_with_comma1 operator BOOST_TT_TRAIT_OP (int) const; }; +struct internal_comma1 { BOOST_TT_PROC ret_with_comma1 operator BOOST_TT_TRAIT_OP (int) const; }; struct external_comma1 { }; -inline ret_with_comma1 operator BOOST_TT_TRAIT_OP (const external_comma1&, int){ return ret_with_comma1(); } +inline BOOST_TT_PROC ret_with_comma1 operator BOOST_TT_TRAIT_OP (const external_comma1&, int){ return ret_with_comma1(); } -struct ret_with_comma2 { void operator,(int); }; +struct ret_with_comma2 { BOOST_TT_PROC void operator,(int); }; -struct internal_comma2 { ret_with_comma2 operator BOOST_TT_TRAIT_OP (int) const; }; +struct internal_comma2 { BOOST_TT_PROC ret_with_comma2 operator BOOST_TT_TRAIT_OP (int) const; }; struct external_comma2 { }; -inline ret_with_comma2 operator BOOST_TT_TRAIT_OP (const external_comma2&, int){ return ret_with_comma2(); } +inline BOOST_TT_PROC ret_with_comma2 operator BOOST_TT_TRAIT_OP (const external_comma2&, int){ return ret_with_comma2(); } -struct returns_int { int operator BOOST_TT_TRAIT_OP (int); }; +struct returns_int { BOOST_TT_PROC int operator BOOST_TT_TRAIT_OP (int); }; -struct returns_void { void operator BOOST_TT_TRAIT_OP (int); }; +struct returns_void { BOOST_TT_PROC void operator BOOST_TT_TRAIT_OP (int); }; -struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (int); }; +struct returns_void_star { BOOST_TT_PROC void *operator BOOST_TT_TRAIT_OP (int); }; -struct returns_double { double operator BOOST_TT_TRAIT_OP (int); }; +struct returns_double { BOOST_TT_PROC double operator BOOST_TT_TRAIT_OP (int); }; struct ret1 { }; -struct convertible_to_ret1 { operator ret1 () const; }; -struct returns_convertible_to_ret1 { convertible_to_ret1 operator BOOST_TT_TRAIT_OP (int); }; +struct convertible_to_ret1 { BOOST_TT_PROC operator ret1 () const; }; +struct returns_convertible_to_ret1 { BOOST_TT_PROC convertible_to_ret1 operator BOOST_TT_TRAIT_OP (int); }; struct convertible_to_ret2 { }; -struct ret2 { ret2(const convertible_to_ret2); }; -struct returns_convertible_to_ret2 { convertible_to_ret2 operator BOOST_TT_TRAIT_OP (int); }; +struct ret2 { BOOST_TT_PROC ret2(const convertible_to_ret2); }; +struct returns_convertible_to_ret2 { BOOST_TT_PROC convertible_to_ret2 operator BOOST_TT_TRAIT_OP (int); }; class Base1 { }; class Derived1 : public Base1 { }; -inline bool operator BOOST_TT_TRAIT_OP (const Base1&, int) { return true; } +inline BOOST_TT_PROC bool operator BOOST_TT_TRAIT_OP (const Base1&, int) { return true; } class Base2 { }; struct Derived2 : public Base2 { Derived2(int); // to check if it works with a class that is not default constructible }; -inline bool operator BOOST_TT_TRAIT_OP (const Derived2&, int) { return true; } +inline BOOST_TT_PROC bool operator BOOST_TT_TRAIT_OP (const Derived2&, int) { return true; } struct tag { }; //class internal_private { ret operator BOOST_TT_TRAIT_OP (int) const; }; -void common() { +BOOST_TT_PROC void common() { TEST_T(void, false); TEST_TR(void, void, false); TEST_TR(void, int, false); diff --git a/test/has_pre_decrement_test.cpp b/test/has_pre_decrement_test.cpp index 77710b6..bda781a 100644 --- a/test/has_pre_decrement_test.cpp +++ b/test/has_pre_decrement_test.cpp @@ -17,7 +17,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_pre_increment_test.cpp b/test/has_pre_increment_test.cpp index d7eaf14..1c0876b 100644 --- a/test/has_pre_increment_test.cpp +++ b/test/has_pre_increment_test.cpp @@ -17,7 +17,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_prefix_operators.hpp b/test/has_prefix_operators.hpp index 8b43653..b21a1a7 100644 --- a/test/has_prefix_operators.hpp +++ b/test/has_prefix_operators.hpp @@ -26,59 +26,59 @@ struct without { }; struct ret { }; -struct internal { ret operator BOOST_TT_TRAIT_OP () const; }; +struct internal { BOOST_TT_PROC ret operator BOOST_TT_TRAIT_OP () const; }; struct external { }; -inline ret operator BOOST_TT_TRAIT_OP (const external&){ return ret(); } +BOOST_TT_PROC inline ret operator BOOST_TT_TRAIT_OP (const external&){ return ret(); } struct comma1_ret { }; -struct ret_with_comma1 { comma1_ret operator,(int); }; +struct ret_with_comma1 { BOOST_TT_PROC comma1_ret operator,(int); }; -struct internal_comma1 { ret_with_comma1 operator BOOST_TT_TRAIT_OP () const; }; +struct internal_comma1 { BOOST_TT_PROC ret_with_comma1 operator BOOST_TT_TRAIT_OP () const; }; struct external_comma1 { }; -inline ret_with_comma1 operator BOOST_TT_TRAIT_OP (const external_comma1&){ return ret_with_comma1(); } +inline BOOST_TT_PROC ret_with_comma1 operator BOOST_TT_TRAIT_OP (const external_comma1&){ return ret_with_comma1(); } -struct ret_with_comma2 { void operator,(int); }; +struct ret_with_comma2 { BOOST_TT_PROC void operator,(int); }; -struct internal_comma2 { ret_with_comma2 operator BOOST_TT_TRAIT_OP () const; }; +struct internal_comma2 { BOOST_TT_PROC ret_with_comma2 operator BOOST_TT_TRAIT_OP () const; }; struct external_comma2 { }; -inline ret_with_comma2 operator BOOST_TT_TRAIT_OP (const external_comma2&){ return ret_with_comma2(); } +inline BOOST_TT_PROC ret_with_comma2 operator BOOST_TT_TRAIT_OP (const external_comma2&){ return ret_with_comma2(); } -struct returns_int { int operator BOOST_TT_TRAIT_OP (); }; +struct returns_int { BOOST_TT_PROC int operator BOOST_TT_TRAIT_OP (); }; -struct returns_void { void operator BOOST_TT_TRAIT_OP (); }; +struct returns_void { BOOST_TT_PROC void operator BOOST_TT_TRAIT_OP (); }; -struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); }; +struct returns_void_star { BOOST_TT_PROC void *operator BOOST_TT_TRAIT_OP (); }; -struct returns_double { double operator BOOST_TT_TRAIT_OP (); }; +struct returns_double { BOOST_TT_PROC double operator BOOST_TT_TRAIT_OP (); }; struct ret1 { }; -struct convertible_to_ret1 { operator ret1 () const; }; -struct returns_convertible_to_ret1 { convertible_to_ret1 operator BOOST_TT_TRAIT_OP (); }; +struct convertible_to_ret1 { BOOST_TT_PROC operator ret1 () const; }; +struct returns_convertible_to_ret1 { BOOST_TT_PROC convertible_to_ret1 operator BOOST_TT_TRAIT_OP (); }; struct convertible_to_ret2 { }; -struct ret2 { ret2(const convertible_to_ret2); }; -struct returns_convertible_to_ret2 { convertible_to_ret2 operator BOOST_TT_TRAIT_OP (); }; +struct ret2 { BOOST_TT_PROC ret2(const convertible_to_ret2); }; +struct returns_convertible_to_ret2 { BOOST_TT_PROC convertible_to_ret2 operator BOOST_TT_TRAIT_OP (); }; class Base1 { }; class Derived1 : public Base1 { }; -inline bool operator BOOST_TT_TRAIT_OP (const Base1&) { return true; } +inline BOOST_TT_PROC bool operator BOOST_TT_TRAIT_OP (const Base1&) { return true; } class Base2 { }; struct Derived2 : public Base2 { Derived2(int); // to check if it works with a class that is not default constructible }; -bool operator BOOST_TT_TRAIT_OP (const Derived2&) { return true; } +BOOST_TT_PROC bool operator BOOST_TT_TRAIT_OP (const Derived2&) { return true; } struct tag { }; //class internal_private { ret operator BOOST_TT_TRAIT_OP () const; }; -void common() { +BOOST_TT_PROC void common() { TEST_T(void, false); TEST_TR(void, void, false); TEST_TR(void, int, false); diff --git a/test/has_right_shift_assign_test.cpp b/test/has_right_shift_assign_test.cpp index ddae521..eb186ca 100644 --- a/test/has_right_shift_assign_test.cpp +++ b/test/has_right_shift_assign_test.cpp @@ -17,7 +17,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_right_shift_test.cpp b/test/has_right_shift_test.cpp index b9f864d..d540e2f 100644 --- a/test/has_right_shift_test.cpp +++ b/test/has_right_shift_test.cpp @@ -19,7 +19,7 @@ #include "has_binary_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void, void >::value), 0); diff --git a/test/has_unary_minus_test.cpp b/test/has_unary_minus_test.cpp index 33863fa..3be7d2e 100644 --- a/test/has_unary_minus_test.cpp +++ b/test/has_unary_minus_test.cpp @@ -17,7 +17,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); diff --git a/test/has_unary_plus_test.cpp b/test/has_unary_plus_test.cpp index e24d833..a139a91 100644 --- a/test/has_unary_plus_test.cpp +++ b/test/has_unary_plus_test.cpp @@ -17,7 +17,7 @@ #include "has_prefix_operators.hpp" -void specific() { +BOOST_TT_PROC void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool >::value), 0); @@ -224,9 +224,9 @@ void specific() { auto f = []() {}; auto f2 = [](double)->int { return 2; }; #if BOOST_WORKAROUND(BOOST_MSVC, <= 1900) - bool result = false; + BOOST_CONSTEXPR bool result = false; #else - bool result = true; + BOOST_CONSTEXPR bool result = true; #endif BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME::value), result); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME::value), result); diff --git a/test/is_arithmetic_test.cpp b/test/is_arithmetic_test.cpp index 6f0618d..13007cb 100644 --- a/test/is_arithmetic_test.cpp +++ b/test/is_arithmetic_test.cpp @@ -151,7 +151,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, true); #endif -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, true); #endif diff --git a/test/is_function_test.cpp b/test/is_function_test.cpp index cdf436e..952ec6a 100644 --- a/test/is_function_test.cpp +++ b/test/is_function_test.cpp @@ -20,16 +20,16 @@ struct X { - void f() {} - void fc() const {} - void fv() volatile {} - void fcv() const volatile {} - void noexcept_f()noexcept {} - void ref_f()const& {} - void rvalue_f() && {} + BOOST_TT_PROC void f() {} + BOOST_TT_PROC void fc() const {} + BOOST_TT_PROC void fv() volatile {} + BOOST_TT_PROC void fcv() const volatile {} + BOOST_TT_PROC void noexcept_f()noexcept {} + BOOST_TT_PROC void ref_f()const& {} + BOOST_TT_PROC void rvalue_f() && {} }; -template< class C, class F > void test_cv_qual(F C::*) +template< class C, class F > BOOST_TT_PROC void test_cv_qual(F C::*) { BOOST_CHECK_INTEGRAL_CONSTANT(boost::is_function< F >::value, true); } @@ -56,7 +56,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); -#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(__NVCC__) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); @@ -144,7 +144,7 @@ test_cv_qual(&X::f); test_cv_qual(&X::fc); test_cv_qual(&X::fv); test_cv_qual(&X::fcv); -#ifndef BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#if !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(__NVCC__) test_cv_qual(&X::noexcept_f); #endif test_cv_qual(&X::ref_f); diff --git a/test/is_fundamental_test.cpp b/test/is_fundamental_test.cpp index 342859f..ab97f98 100644 --- a/test/is_fundamental_test.cpp +++ b/test/is_fundamental_test.cpp @@ -155,7 +155,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, true); #endif -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, true); #endif diff --git a/test/is_integral_test.cpp b/test/is_integral_test.cpp index 8cbc403..274f753 100644 --- a/test/is_integral_test.cpp +++ b/test/is_integral_test.cpp @@ -112,7 +112,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int64 const volatile>::value, #endif -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, true); diff --git a/test/is_list_constructible_test.cpp b/test/is_list_constructible_test.cpp index 5541406..4dbfedd 100644 --- a/test/is_list_constructible_test.cpp +++ b/test/is_list_constructible_test.cpp @@ -88,6 +88,8 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::va // g++ 4.x doesn't seem to disallow narrowing #elif defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 7) && (__cplusplus >= 201500) // g++ 7.1 in -std=c++1z, c++17 has a bug +#elif defined(__NVCC__) +// nvcc in -std=c++17 mode has this issue. #else BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false); @@ -104,6 +106,8 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::va // g++ 4.x doesn't seem to disallow narrowing #elif defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 7) && (__cplusplus >= 201500) // g++ 7.1 in -std=c++1z, c++17 has a bug +#elif defined(__NVCC__) +// nvcc in -std=c++17 mode has this issue. #else BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false); diff --git a/test/is_member_func_test.cpp b/test/is_member_func_test.cpp index ca5156a..7efa269 100644 --- a/test/is_member_func_test.cpp +++ b/test/is_member_func_test.cpp @@ -19,16 +19,16 @@ #ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION struct tricky_members { - void noexcept_proc()noexcept + BOOST_TT_PROC void noexcept_proc()noexcept {} - void const_ref_proc()const & + BOOST_TT_PROC void const_ref_proc()const & {} - void rvalue_proc()&& + BOOST_TT_PROC void rvalue_proc()&& {} }; template -void test_tricky(T) +BOOST_TT_PROC void test_tricky(T) { BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer::value, true); } diff --git a/test/is_pod_test.cpp b/test/is_pod_test.cpp index 54f0d51..861037c 100644 --- a/test/is_pod_test.cpp +++ b/test/is_pod_test.cpp @@ -177,7 +177,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); #endif -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); #endif diff --git a/test/is_scalar_test.cpp b/test/is_scalar_test.cpp index c4c4d1d..2017d0f 100644 --- a/test/is_scalar_test.cpp +++ b/test/is_scalar_test.cpp @@ -156,7 +156,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, true); #endif -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, true); #endif diff --git a/test/is_signed_test.cpp b/test/is_signed_test.cpp index 7ee762f..eaef3b3 100644 --- a/test/is_signed_test.cpp +++ b/test/is_signed_test.cpp @@ -33,7 +33,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); #endif diff --git a/test/is_unsigned_test.cpp b/test/is_unsigned_test.cpp index 2ea8024..317c0ab 100644 --- a/test/is_unsigned_test.cpp +++ b/test/is_unsigned_test.cpp @@ -33,7 +33,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, true); #endif diff --git a/test/make_signed_test.cpp b/test/make_signed_test.cpp index 8490046..855c7a1 100644 --- a/test/make_signed_test.cpp +++ b/test/make_signed_test.cpp @@ -95,7 +95,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile __int64); #endif -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_TYPE(::tt::make_signed::type, boost::int128_type); BOOST_CHECK_TYPE(::tt::make_signed::type, boost::int128_type); #endif diff --git a/test/make_unsigned_test.cpp b/test/make_unsigned_test.cpp index 836512d..64e4c3b 100644 --- a/test/make_unsigned_test.cpp +++ b/test/make_unsigned_test.cpp @@ -95,7 +95,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::typ #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned __int64); #endif -#ifdef BOOST_HAS_INT128 +#if defined(BOOST_HAS_INT128) && !defined(TEST_CUDA_DEVICE) BOOST_CHECK_TYPE(::tt::make_unsigned::type, boost::uint128_type); BOOST_CHECK_TYPE(::tt::make_unsigned::type, boost::uint128_type); #endif diff --git a/test/test.hpp b/test/test.hpp index e5492fe..9c46b9c 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -18,6 +18,10 @@ #include #include +#ifdef TEST_CUDA_DEVICE +#define TEST_VIA_STATIC_ASSERT +#endif + #ifdef BOOST_BORLANDC // we have to turn off these warnings otherwise we get swamped by the things: #pragma option -w-8008 -w-8066 @@ -85,6 +89,9 @@ int error_count = 0; #define BOOST_TEST_MESSAGE(message)\ do{ std::cout << __FILE__ << ":" << __LINE__ << ": " << message << std::endl; }while(0) +#ifdef TEST_CUDA_DEVICE +#define BOOST_CHECK(pred) pred +#else #define BOOST_CHECK(pred)\ do{ \ if(!(pred)){\ @@ -92,10 +99,19 @@ int error_count = 0; ++error_count;\ } \ }while(0) +#endif +#ifdef TEST_CUDA_DEVICE +#define TT_TEST_BEGIN(trait_name)\ + __global__ void test_proc(){ +#define TT_TEST_END } +#define BOOST_TT_PROC __device__ +#else #define TT_TEST_BEGIN(trait_name)\ int main(){ #define TT_TEST_END return error_count; } +#define BOOST_TT_PROC +#endif #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !BOOST_WORKAROUND(BOOST_GCC, < 40704) @@ -145,13 +161,13 @@ int error_count = 0; #define BOOST_DUMMY_MACRO_PARAM /**/ #define BOOST_DECL_TRANSFORM_TEST(name, type, from, to)\ -void name(){ TRANSFORM_CHECK(type, from, to) } +BOOST_TT_PROC void name(){ TRANSFORM_CHECK(type, from, to) } #define BOOST_DECL_TRANSFORM_TEST3(name, type, from)\ -void name(){ TRANSFORM_CHECK(type, from, BOOST_DUMMY_MACRO_PARAM) } +BOOST_TT_PROC void name(){ TRANSFORM_CHECK(type, from, BOOST_DUMMY_MACRO_PARAM) } #define BOOST_DECL_TRANSFORM_TEST2(name, type, to)\ -void name(){ TRANSFORM_CHECK(type, BOOST_DUMMY_MACRO_PARAM, to) } +BOOST_TT_PROC void name(){ TRANSFORM_CHECK(type, BOOST_DUMMY_MACRO_PARAM, to) } #define BOOST_DECL_TRANSFORM_TEST0(name, type)\ -void name(){ TRANSFORM_CHECK(type, BOOST_DUMMY_MACRO_PARAM, BOOST_DUMMY_MACRO_PARAM) } +BOOST_TT_PROC void name(){ TRANSFORM_CHECK(type, BOOST_DUMMY_MACRO_PARAM, BOOST_DUMMY_MACRO_PARAM) } diff --git a/test/tricky_partial_spec_test.cpp b/test/tricky_partial_spec_test.cpp index e6becc0..80de148 100644 --- a/test/tricky_partial_spec_test.cpp +++ b/test/tricky_partial_spec_test.cpp @@ -54,11 +54,14 @@ TT_TEST_BEGIN(tricky_partial_specialization_test) // corner cases which don't compile without partial specialization // support: // +#ifndef TEST_VIA_STATIC_ASSERT BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(void*)); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(void*)); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(void*)); +#endif + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); diff --git a/test/type_with_alignment_test.cpp b/test/type_with_alignment_test.cpp index 7e93e36..995e90b 100644 --- a/test/type_with_alignment_test.cpp +++ b/test/type_with_alignment_test.cpp @@ -69,6 +69,9 @@ BOOST_CHECK(::tt::is_pod<\ TT_TEST_BEGIN(type_with_alignment) +// Nothing we can really test on the CUDA device: +#ifndef TEST_CUDA_DEVICE + TYPE_WITH_ALIGNMENT_TEST_EX(char) TYPE_WITH_ALIGNMENT_TEST_EX(short) TYPE_WITH_ALIGNMENT_TEST_EX(int) @@ -104,6 +107,8 @@ TYPE_WITH_ALIGNMENT_TEST(a16) TYPE_WITH_ALIGNMENT_TEST(a32) #endif +#endif + TT_TEST_END