diff options
Diffstat (limited to 'src/boost/libs/type_traits')
230 files changed, 29035 insertions, 0 deletions
diff --git a/src/boost/libs/type_traits/CMakeLists.txt b/src/boost/libs/type_traits/CMakeLists.txt new file mode 100644 index 000000000..8adf7802a --- /dev/null +++ b/src/boost/libs/type_traits/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright 2018 Mike Dev +# Copyright 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt + +# We support CMake 3.5, but prefer 3.16 policies and behavior +cmake_minimum_required(VERSION 3.5...3.16) + +project(boost_type_traits VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) + +add_library(boost_type_traits INTERFACE) +add_library(Boost::type_traits ALIAS boost_type_traits) + +target_include_directories(boost_type_traits INTERFACE include) + +target_link_libraries(boost_type_traits + INTERFACE + Boost::config + Boost::static_assert +) + +# boost_install requires PROJECT_VERSION +# Without the superproject, we don't have any, so skip installation + +if(BOOST_SUPERPROJECT_VERSION) + + include(BoostInstall) + boost_install(TARGETS boost_type_traits HEADER_DIRECTORY include/) + +endif() diff --git a/src/boost/libs/type_traits/README.md b/src/boost/libs/type_traits/README.md new file mode 100644 index 000000000..62b1329b7 --- /dev/null +++ b/src/boost/libs/type_traits/README.md @@ -0,0 +1,47 @@ +Boost TypeTraits Library +============================ + +The Boost type-traits library contains a set of very specific traits classes, each of which encapsulate a single trait +from the C++ type system; for example, is a type a pointer or a reference type? Or does a type have a trivial constructor, or a const-qualifier? + +The type-traits classes share a unified design: each class inherits from the type true_type if the type has the specified property and inherits from false_type otherwise. + +The type-traits library also contains a set of classes that perform a specific transformation on a type; for example, they can remove a top-level const or +volatile qualifier from a type. Each class that performs a transformation defines a single typedef-member type that is the result of the transformation. + +The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/type_traits/index.html). + +| | Master | Develop | +|------------------|----------|-------------| +| Travis | [![Build Status](https://travis-ci.org/boostorg/type_traits.svg?branch=master)](https://travis-ci.org/boostorg/type_traits) | [![Build Status](https://travis-ci.org/boostorg/type_traits.svg)](https://travis-ci.org/boostorg/type_traits) | +| Appveyor | [![Build status](https://ci.appveyor.com/api/projects/status/lwjqu4087qiolje8/branch/master?svg=true)](https://ci.appveyor.com/project/jzmaddock/type-traits/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/lwjqu4087qiolje8/branch/develop?svg=true)](https://ci.appveyor.com/project/jzmaddock/type-traits/branch/develop) | + + +## Support, bugs and feature requests ## + +Bugs and feature requests can be reported through the [Gitub issue tracker](https://github.com/boostorg/type_traits/issues) +(see [open issues](https://github.com/boostorg/type_traits/issues) and +[closed issues](https://github.com/boostorg/type_traits/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)). + +You can submit your changes through a [pull request](https://github.com/boostorg/type_traits/pulls). + +There is no mailing-list specific to Boost TypeTraits, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [type_traits]. + + +## Development ## + +Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)): + + git clone https://github.com/boostorg/boost + cd boost + git submodule update --init + +The Boost TypeTraits Library is located in `libs/type_traits/`. + +### Running tests ### +First, make sure you are in `libs/type_traits/test`. +You can either run all the tests listed in `Jamfile.v2` or run a single test: + + ../../../b2 <- run all tests + ../../../b2 config_info <- single test + diff --git a/src/boost/libs/type_traits/cxx_type_traits.htm b/src/boost/libs/type_traits/cxx_type_traits.htm new file mode 100644 index 000000000..402221278 --- /dev/null +++ b/src/boost/libs/type_traits/cxx_type_traits.htm @@ -0,0 +1,19 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <meta http-equiv="refresh" content="0; URL=doc/html/boost_typetraits/background.html"> + <!-- boostinspect:nounlinked --> + </head> + <body><P> + Automatic redirection failed, please go to + <a href="doc/html/boost_typetraits/background.html">doc/html/boost_typetraits/background.html.</a></P> + <P>Copyright John Maddock 2006</P> + <P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt"> + LICENSE_1_0.txt</A> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>).</P> + </body> +</html> + + + + + diff --git a/src/boost/libs/type_traits/examples/copy_example.cpp b/src/boost/libs/type_traits/examples/copy_example.cpp new file mode 100644 index 000000000..2ba60a821 --- /dev/null +++ b/src/boost/libs/type_traits/examples/copy_example.cpp @@ -0,0 +1,197 @@ + +/* + * + * (C) Copyright John Maddock 1999-2005. + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file provides some example of type_traits usage - + * by "optimising" various algorithms: + * + * opt::copy - optimised for trivial copy (cf std::copy) + * + */ + +#include <iostream> +#include <typeinfo> +#include <algorithm> +#include <iterator> +#include <memory> + +#include <boost/test/included/prg_exec_monitor.hpp> +#include <boost/timer.hpp> +#include <boost/type_traits.hpp> + +using std::cout; +using std::endl; +using std::cin; + +namespace opt{ + +// +// opt::copy +// same semantics as std::copy +// calls memcpy where appropriate. +// + +namespace detail{ + +template<typename I1, typename I2, bool b> +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *out = *first; + ++out; + ++first; + } + return out; +} + +template<typename T> +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) +{ + memmove(out, first, (last-first)*sizeof(T)); + return out+(last-first); +} + + +} + +template<typename I1, typename I2> +inline I2 copy(I1 first, I1 last, I2 out) +{ + // + // We can copy with memcpy if T has a trivial assignment operator, + // and if the iterator arguments are actually pointers (this last + // requirement we detect with overload resolution): + // + typedef typename std::iterator_traits<I1>::value_type value_type; + return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); +} + +} // namespace opt + +namespace non_opt +{ + +template<typename I1, typename I2> +inline I2 copy(I1 first, I1 last, I2 out) +{ + return opt::detail::copy_imp(first, last, out, boost::false_type()); +} + +} + +// +// define some global data: +// +const int array_size = 1000; +int i_array_[array_size] = {0,}; +const int ci_array_[array_size] = {0,}; +char c_array_[array_size] = {0,}; +const char cc_array_[array_size] = { 0,}; +// +// since arrays aren't iterators we define a set of pointer +// aliases into the arrays (otherwise the compiler is entitled +// to deduce the type passed to the template functions as +// T (&)[N] rather than T*). +int* i_array = i_array_; +const int* ci_array = ci_array_; +char* c_array = c_array_; +const char* cc_array = cc_array_; + +const int iter_count = 1000000; + +int cpp_main(int argc, char* argv[]) +{ + boost::timer t; + double result; + int i; + cout << "Measuring times in micro-seconds per 1000 elements processed" << endl << endl; + cout << "testing copy...\n" + "[Some standard library versions may already perform this optimisation.]" << endl; + + // cache load: + opt::copy(ci_array, ci_array + array_size, i_array); + + // time optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + opt::copy(ci_array, ci_array + array_size, i_array); + } + result = t.elapsed(); + cout << "opt::copy<const int*, int*>: " << result << endl; + + // cache load: + non_opt::copy(ci_array, ci_array + array_size, i_array); + + // time non-optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + non_opt::copy(ci_array, ci_array + array_size, i_array); + } + result = t.elapsed(); + cout << "non_opt::copy<const int*, int*>: " << result << endl; + + // cache load: + std::copy(ci_array, ci_array + array_size, i_array); + + // time standard version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + std::copy(ci_array, ci_array + array_size, i_array); + } + result = t.elapsed(); + cout << "std::copy<const int*, int*>: " << result << endl; + + // cache load: + opt::copy(cc_array, cc_array + array_size, c_array); + + // time optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + opt::copy(cc_array, cc_array + array_size, c_array); + } + result = t.elapsed(); + cout << "opt::copy<const char*, char*>: " << result << endl; + + // cache load: + non_opt::copy(cc_array, cc_array + array_size, c_array); + + // time optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + non_opt::copy(cc_array, cc_array + array_size, c_array); + } + result = t.elapsed(); + cout << "non_opt::copy<const char*, char*>: " << result << endl; + + // cache load: + std::copy(cc_array, cc_array + array_size, c_array); + + // time standard version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + std::copy(cc_array, cc_array + array_size, c_array); + } + result = t.elapsed(); + cout << "std::copy<const char*, char*>: " << result << endl; + + return 0; +} + + + + + + + + diff --git a/src/boost/libs/type_traits/examples/fill_example.cpp b/src/boost/libs/type_traits/examples/fill_example.cpp new file mode 100644 index 000000000..3e3af0615 --- /dev/null +++ b/src/boost/libs/type_traits/examples/fill_example.cpp @@ -0,0 +1,200 @@ + +/* + * + * (C) Copyright John Maddock 1999-2005. + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file provides some example of type_traits usage - + * by "optimising" various algorithms: + * + * opt::fill - optimised for trivial copy/small types (cf std::fill) + * + */ + +#include <iostream> +#include <typeinfo> +#include <algorithm> +#include <iterator> +#include <memory> +#include <cstring> + +#include <boost/test/included/prg_exec_monitor.hpp> +#include <boost/timer.hpp> +#include <boost/type_traits.hpp> + +#if defined(BOOST_NO_STDC_NAMESPACE) || (defined(std) && defined(__SGI_STL_PORT)) +namespace std{ using :: memset; } +#endif + +using std::cout; +using std::endl; +using std::cin; + +namespace opt{ +// +// fill +// same as std::fill, but uses memset where appropriate +// +namespace detail{ + +template <typename I, typename T, bool b> +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) +{ + while(first != last) + { + *first = val; + ++first; + } +} + +template <typename T> +void do_fill(T* first, T* last, const T& val, const boost::true_type&) +{ + std::memset(first, val, last-first); +} + +} + +template <class I, class T> +inline void fill(I first, I last, const T& val) +{ + // + // We can do an optimised fill if T has a trivial assignment + // operator and if it's size is one: + // + typedef boost::integral_constant<bool, + ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; + detail::do_fill(first, last, val, truth_type()); +} + +} // namespace opt + +namespace non_opt{ + +template <class I, class T> +inline void fill(I first, I last, const T& val) +{ + opt::detail::do_fill(first, last, val, boost::false_type()); +} + +} + +// +// define some global data: +// +const int array_size = 1000; +int i_array_[array_size] = {0,}; +const int ci_array_[array_size] = {0,}; +char c_array_[array_size] = {0,}; +const char cc_array_[array_size] = { 0,}; +// +// since arrays aren't iterators we define a set of pointer +// aliases into the arrays (otherwise the compiler is entitled +// to deduce the type passed to the template functions as +// T (&)[N] rather than T*). +int* i_array = i_array_; +const int* ci_array = ci_array_; +char* c_array = c_array_; +const char* cc_array = cc_array_; + +const int iter_count = 1000000; + +int cpp_main(int argc, char* argv[]) +{ + boost::timer t; + double result; + int i; + // + // test destroy_array, + // compare destruction time of an array of ints + // with unoptimised form. + // + cout << "Measuring times in micro-seconds per 1000 elements processed" << endl << endl; + + cout << "testing fill(char)...\n" + "[Some standard library versions may already perform this optimisation.]" << endl; + + // cache load: + opt::fill(c_array, c_array + array_size, (char)3); + + // time optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + opt::fill(c_array, c_array + array_size, (char)3); + } + result = t.elapsed(); + cout << "opt::fill<char*, char>: " << result << endl; + + // cache load: + non_opt::fill(c_array, c_array + array_size, (char)3); + + // time optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + non_opt::fill(c_array, c_array + array_size, (char)3); + } + result = t.elapsed(); + cout << "non_opt::fill<char*, char>: " << result << endl; + + // cache load: + std::fill(c_array, c_array + array_size, (char)3); + + // time standard version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + std::fill(c_array, c_array + array_size, (char)3); + } + result = t.elapsed(); + cout << "std::fill<char*, char>: " << result << endl << endl; + + cout << "testing fill(int)...\n" << endl; + + // cache load: + opt::fill(i_array, i_array + array_size, 3); + + // timer optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + opt::fill(i_array, i_array + array_size, 3); + } + result = t.elapsed(); + cout << "opt::fill<int*, int>: " << result << endl; + + // cache load: + non_opt::fill(i_array, i_array + array_size, 3); + + // timer optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + non_opt::fill(i_array, i_array + array_size, 3); + } + result = t.elapsed(); + cout << "non_opt::fill<int*, int>: " << result << endl; + + // cache load: + std::fill(i_array, i_array + array_size, 3); + + // time standard version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + std::fill(i_array, i_array + array_size, 3); + } + result = t.elapsed(); + cout << "std::fill<int*, int>: " << result << endl << endl; + + return 0; +} + + + + + + diff --git a/src/boost/libs/type_traits/examples/iter_swap_example.cpp b/src/boost/libs/type_traits/examples/iter_swap_example.cpp new file mode 100644 index 000000000..ea04747f7 --- /dev/null +++ b/src/boost/libs/type_traits/examples/iter_swap_example.cpp @@ -0,0 +1,97 @@ + +/* + * + * (C) Copyright John Maddock 1999-2005. + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file provides some example of type_traits usage - + * by "optimising" various algorithms: + * + * opt::iter_swap - uses type_traits to determine whether the iterator is a proxy + * in which case it uses a "safe" approach, otherwise calls swap + * on the assumption that swap may be specialised for the pointed-to type. + * + */ + +#include <iostream> +#include <typeinfo> +#include <algorithm> +#include <iterator> +#include <vector> +#include <memory> + +#include <boost/test/included/prg_exec_monitor.hpp> +#include <boost/type_traits.hpp> + +using std::cout; +using std::endl; +using std::cin; + +namespace opt{ + +// +// iter_swap: +// tests whether iterator is a proxy iterator or not, and +// uses optimal form accordingly: +// +namespace detail{ + +template <typename I> +static void do_swap(I one, I two, const boost::false_type&) +{ + typedef typename std::iterator_traits<I>::value_type v_t; + v_t v = *one; + *one = *two; + *two = v; +} +template <typename I> +static void do_swap(I one, I two, const boost::true_type&) +{ + using std::swap; + swap(*one, *two); +} + +} + +template <typename I1, typename I2> +inline void iter_swap(I1 one, I2 two) +{ + // + // See is both arguments are non-proxying iterators, + // and if both iterator the same type: + // + typedef typename std::iterator_traits<I1>::reference r1_t; + typedef typename std::iterator_traits<I2>::reference r2_t; + + typedef boost::integral_constant<bool, + ::boost::is_reference<r1_t>::value + && ::boost::is_reference<r2_t>::value + && ::boost::is_same<r1_t, r2_t>::value> truth_type; + + detail::do_swap(one, two, truth_type()); +} + + +}; // namespace opt + +int cpp_main(int argc, char* argv[]) +{ + // + // testing iter_swap + // really just a check that it does in fact compile... + std::vector<int> v1; + v1.push_back(0); + v1.push_back(1); + std::vector<bool> v2; + v2.push_back(0); + v2.push_back(1); + opt::iter_swap(v1.begin(), v1.begin()+1); + opt::iter_swap(v2.begin(), v2.begin()+1); + + return 0; +} + + + diff --git a/src/boost/libs/type_traits/examples/trivial_destructor_example.cpp b/src/boost/libs/type_traits/examples/trivial_destructor_example.cpp new file mode 100644 index 000000000..49ee63ab6 --- /dev/null +++ b/src/boost/libs/type_traits/examples/trivial_destructor_example.cpp @@ -0,0 +1,153 @@ + +/* + * + * (C) Copyright John Maddock 1999-2005. + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + * This file provides some example of type_traits usage - + * by "optimising" various algorithms: + * + * opt::destroy_array - an example of optimisation based upon omitted destructor calls + * + */ + + +#include <iostream> +#include <boost/test/included/prg_exec_monitor.hpp> +#include <boost/timer.hpp> +#include <boost/type_traits.hpp> + +using std::cout; +using std::endl; +using std::cin; + +namespace opt{ + +// +// algorithm destroy_array: +// The reverse of std::unitialized_copy, takes a block of +// initialized memory and calls destructors on all objects therein. +// + +namespace detail{ + +template <class T> +void do_destroy_array(T* first, T* last, const boost::false_type&) +{ + while(first != last) + { + first->~T(); + ++first; + } +} + +template <class T> +inline void do_destroy_array(T* first, T* last, const boost::true_type&) +{ +} + +} // namespace detail + +template <class T> +inline void destroy_array(T* p1, T* p2) +{ + detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); +} + +// +// unoptimised versions of destroy_array: +// +template <class T> +void destroy_array1(T* first, T* last) +{ + while(first != last) + { + first->~T(); + ++first; + } +} +template <class T> +void destroy_array2(T* first, T* last) +{ + for(; first != last; ++first) first->~T(); +} + +} // namespace opt + +// +// define some global data: +// +const int array_size = 1000; +int i_array[array_size] = {0,}; +const int ci_array[array_size] = {0,}; +char c_array[array_size] = {0,}; +const char cc_array[array_size] = { 0,}; + +const int iter_count = 1000000; + + +int cpp_main(int argc, char* argv[]) +{ + boost::timer t; + double result; + int i; + // + // test destroy_array, + // compare destruction time of an array of ints + // with unoptimised form. + // + cout << "Measuring times in micro-seconds per 1000 elements processed" << endl << endl; + cout << "testing destroy_array...\n" + "[Some compilers may be able to optimise the \"unoptimised\"\n versions as well as type_traits does.]" << endl; + + // cache load: + opt::destroy_array(i_array, i_array + array_size); + + // time optimised version: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + opt::destroy_array(i_array, i_array + array_size); + } + result = t.elapsed(); + cout << "destroy_array<int>: " << result << endl; + + // cache load: + opt::destroy_array1(i_array, i_array + array_size); + + // time unoptimised version #1: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + opt::destroy_array1(i_array, i_array + array_size); + } + result = t.elapsed(); + cout << "destroy_array<int>(unoptimised#1): " << result << endl; + + // cache load: + opt::destroy_array2(i_array, i_array + array_size); + + // time unoptimised version #2: + t.restart(); + for(i = 0; i < iter_count; ++i) + { + opt::destroy_array2(i_array, i_array + array_size); + } + result = t.elapsed(); + cout << "destroy_array<int>(unoptimised#2): " << result << endl << endl; + + return 0; +} + + + + + + + + + + + diff --git a/src/boost/libs/type_traits/index.html b/src/boost/libs/type_traits/index.html new file mode 100644 index 000000000..030742009 --- /dev/null +++ b/src/boost/libs/type_traits/index.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <meta http-equiv="refresh" content="0; URL=doc/html/index.html"> + </head> + <body> + <P>Automatic redirection failed, please go to + <a href="doc/html/index.html">doc/html/index.html</a>.</P> + <P>Copyright John Maddock 2001</P> + <P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt"> + LICENSE_1_0.txt</A> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>).</P> + </body> +</html> + + + + + + diff --git a/src/boost/libs/type_traits/meta/explicit-failures-markup.xml b/src/boost/libs/type_traits/meta/explicit-failures-markup.xml new file mode 100644 index 000000000..01514e0d5 --- /dev/null +++ b/src/boost/libs/type_traits/meta/explicit-failures-markup.xml @@ -0,0 +1,244 @@ +<?xml version="1.0" encoding="utf-8"?> +<explicit-failures-markup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/boostorg/boost/master/status/explicit-failures.xsd"> + <!-- type_traits --> + <library name="type_traits"> + <mark-expected-failures> + <test name="is_virtual_base_of_test"/> + <toolset name="gcc-3.4.6"/> + <note author="John Maddock"> + Type Traits tests are run with warnings-as-errors and GCC 3.x emits warnings with this test + that I haven't been able to suppress. + </note> + </mark-expected-failures> + <mark-expected-failures> + <test name="has_operator_new_test"/> + <test name="make_signed_test"/> + <test name="make_unsigned_test"/> + <toolset name="msvc-7.1"/> + <note author="John Maddock"> + Apparently the compiler can't cope with these - later versions are fine though. + Probably work-round-able if someone would care to look into these. + </note> + </mark-expected-failures> + <mark-expected-failures> + <test name="function_traits_test"/> + <test name="remove_bounds_test"/> + <test name="remove_const_test"/> + <test name="remove_cv_test"/> + <test name="remove_pointer_test"/> + <test name="remove_reference_test"/> + <test name="remove_volatile_test"/> + <test name="decay_test"/> + <test name="extent_test"/> + <test name="remove_extent_test"/> + <test name="remove_all_extents_test"/> + <test name="rank_test"/> + <test name="is_unsigned_test"/> + <toolset name="msvc-6.5*"/> + <toolset name="msvc-7.0"/> + <note author="Aleksey Gurtovoy"> + This failure is caused by the lack of compiler support for class template + partial specialization. A limited subset of the tested functionality is + available on the compiler through a user-side workaround (see + <a href="http://www.boost.org/libs/type_traits/index.html#transformations"> + http://www.boost.org/libs/type_traits/index.html#transformations</a> for + details). + </note> + </mark-expected-failures> + <mark-expected-failures> + <test name="decay_test"/> + <test name="extent_test"/> + <test name="is_base_and_derived_test"/> + <test name="is_base_of_test"/> + <test name="is_convertible_test"/> + <test name="rank_test"/> + <test name="remove_all_extents_test"/> + <test name="remove_bounds_test"/> + <test name="remove_const_test"/> + <test name="remove_extent_test"/> + <test name="remove_pointer_test"/> + <test name="remove_volatile_test"/> + <test name="tricky_add_pointer_test"/> + <test name="tricky_function_type_test"/> + <test name="tricky_incomplete_type_test"/> + <test name="make_signed_test"/> + <test name="make_unsigned_test"/> + <toolset name="borland-5.6*"/> + <toolset name="borland-5.8*"/> + <toolset name="borland-5.9*"/> + <note author="John Maddock" refid="2"/> + </mark-expected-failures> + <mark-expected-failures> + <test name="promote_basic_test"/> + <test name="promote_enum_test"/> + <test name="promote_mpl_test"/> + <test name="tricky_partial_spec_test"/> + <toolset name="borland-5.6*"/> + <toolset name="borland-5.8*"/> + <toolset name="borland-5.9*"/> + <note author="AlisdairM" refid="2"/> + </mark-expected-failures> + <mark-expected-failures> + <test name="promote_enum_msvc_bug_test"/> + <toolset name="msvc-7.1*"/> + <toolset name="msvc-8.0*"/> + <toolset name="msvc-9.0*"/> + <toolset name="msvc-10.0*"/> + <toolset name="msvc-11.0*"/> + <toolset name="msvc-12.0*"/> + <toolset name="msvc-14.0*"/> + <toolset name="msvc-14.1*"/> + <toolset name="msvc-14.2*"/> + <note author="Alexander Nasonov"> + See bug 99776 'enum UIntEnum { value = UINT_MAX } is promoted to int' + http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=22b0a6b7-120f-4ca0-9136-fa1b25b26efe + https://developercommunity.visualstudio.com/content/problem/490264/standard-violation-enum-underlying-type-cannot-rep.html + </note> + </mark-expected-failures> + <test name="tricky_is_enum_test"> + <mark-failure> + <toolset name="borland-5.6*"/> + <toolset name="borland-5.8*"/> + <toolset name="borland-5.9*"/> + <toolset name="msvc-6.5*"/> + <toolset name="gcc-2.95.3-*"/> + </mark-failure> + </test> + <test name="tricky_incomplete_type_test"> + <mark-failure> + <toolset name="iw-7_1*"/> + <note author="John Maddock" refid="2"/> + </mark-failure> + </test> + <test name="is_abstract_test"> + <mark-failure> + <toolset name="borland-5.6*"/> + <toolset name="borland-5.8*"/> + <toolset name="borland-5.9*"/> + <toolset name="cw-8.3*"/> + <toolset name="cw-9.3*"/> + <toolset name="cw-9.4"/> + <toolset name="cw-9.5"/> + <toolset name="msvc-6.5*"/> + <toolset name="msvc-7.0"/> + <toolset name="mingw-3_3*"/> + <toolset name="gcc-2*"/> + <toolset name="gcc-3.2*"/> + <toolset name="gcc-3.3*"/> + <toolset name="qcc-3.3*"/> + <toolset name="sunpro-5_3-sunos"/> + <toolset name="hp_cxx-65*"/> + <toolset name="darwin"/> + <toolset name="mingw"/> + <note author="Aleksey Gurtovoy"> + This functionality is available only on compilers that implement C++ Core Language + <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#337">Defect Report 337</a>. + </note> + </mark-failure> + </test> + + <mark-expected-failures> + <test name="is_polymorphic_test"/> + <toolset name="gcc-2.95.3-stlport-*"/> + <note author="Doug Gregor" refid="3"/> + </mark-expected-failures> + + <mark-expected-failures> + <test name="decay_test"/> + <test name="extent_test"/> + <test name="has_nothrow_assign_test"/> + <test name="has_nothrow_constr_test"/> + <test name="has_nothrow_copy_test"/> + <test name="has_trivial_assign_test"/> + <test name="has_trivial_constr_test"/> + <test name="has_trivial_copy_test"/> + <test name="has_trivial_destructor_test"/> + <test name="is_array_test"/> + <test name="is_base_and_derived_test"/> + <test name="is_base_of_test"/> + <test name="is_class_test"/> + <test name="is_convertible_test"/> + <test name="is_object_test"/> + <test name="is_pod_test"/> + <test name="is_polymorphic_test"/> + <test name="rank_test"/> + <test name="remove_all_extents_test"/> + <test name="remove_bounds_test"/> + <test name="remove_extent_test"/> + <toolset name="sunpro-5_3-sunos"/> + + <note author="John Maddock"> + The Type Traits library is broken when used with Sunpro-5.3 and the + argument to the template is an array or function type. Most other argument types + do work as expected: in other words the functionality is limited + with this compiler, but not so much as to render the library unuseable. + </note> + </mark-expected-failures> + <mark-expected-failures> + <test name="is_empty_test"/> + <test name="is_function_test"/> + <test name="is_member_func_test"/> + <test name="is_member_obj_test"/> + <test name="is_reference_test"/> + <test name="tricky_function_type_test"/> + <test name="tricky_incomplete_type_test"/> + <test name="tricky_is_enum_test"/> + <toolset name="sunpro-5_3-sunos"/> + <note author="John Maddock" refid="2"/> + </mark-expected-failures> + <mark-expected-failures> + <test name="decay_test"/> + <test name="extent_test"/> + <test name="is_abstract_test"/> + <test name="is_empty_test"/> + <test name="is_function_test"/> + <test name="is_member_func_test"/> + <test name="is_member_obj_test"/> + <test name="is_object_test"/> + <test name="is_reference_test"/> + <test name="rank_test"/> + <test name="tricky_function_type_test"/> + <toolset name="sun-5.8"/> + + <note author="John Maddock"> + The Type Traits library is broken when used with Sunpro-5.8 and the + argument to the template is a function type. Most other argument types + do work as expected: in other words the functionality is limited + with this compiler, but not so much as to render the library unuseable. + </note> + </mark-expected-failures> + <mark-expected-failures> + <test name="tricky_partial_spec_test"/> + <toolset name="sun-5.9"/> + <note author="John Maddock"> + This fails with an internal compiler error, + there is no workaround as yet. + </note> + </mark-expected-failures> + <mark-expected-failures> + <test name="tricky_function_type_test"/> + <test name="is_const_test"/> + <test name="is_volatile_test"/> + <test name="is_convertible_test"/> + <toolset name="gcc-2*"/> + <note author="John Maddock" refid="2"/> + </mark-expected-failures> + <mark-expected-failures> + <test name="aligned_storage_test"/> + <toolset name="cw-8.3"/> + <note author="John Maddock"> + Older versions of MWCW incorrectly align pointers to member functions + (they use 12-byte boundaries, rather than a power-of-2 boundary), + leading to alignment_of / aligned_storage + to fail with these types on this compiler. + </note> + </mark-expected-failures> + </library> +</explicit-failures-markup> +<!-- +(C) Copyright Nikita Kniazev 2019. +Use, modification and distribution are subject to the +Boost Software License, Version 1.0. (See accompanying file +LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +-->
\ No newline at end of file diff --git a/src/boost/libs/type_traits/meta/libraries.json b/src/boost/libs/type_traits/meta/libraries.json new file mode 100644 index 000000000..97fcb65ec --- /dev/null +++ b/src/boost/libs/type_traits/meta/libraries.json @@ -0,0 +1,18 @@ +{ + "key": "type_traits", + "name": "Type Traits", + "authors": [ + "John Maddock, Steve Cleary, et al" + ], + "description": "Templates for fundamental properties of types.", + "std": [ + "tr1" + ], + "category": [ + "Generic", + "Metaprogramming" + ], + "maintainers": [ + "John Maddock <john -at- johnmaddock.co.uk>" + ] +} diff --git a/src/boost/libs/type_traits/test/Jamfile.v2 b/src/boost/libs/type_traits/test/Jamfile.v2 new file mode 100644 index 000000000..e58b1f153 --- /dev/null +++ b/src/boost/libs/type_traits/test/Jamfile.v2 @@ -0,0 +1,58 @@ +# copyright John Maddock 2004 +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# bring in the rules for testing +import testing ; +import os ; + +if [ os.environ CI ] +{ +CI_DEFINES = <define>CI_SUPPRESS_KNOWN_ISSUES=1 ; +} + + +# type_traits in V1 seem to have two modes: standalone, triggered +# by a command line option, and a regular. For now, just imitate +# regular + +project : requirements + # default to all warnings on: + <warnings>all + # set warnings as errors for those compilers we know we get warning free: + <toolset>gcc:<cxxflags>-Wextra + <toolset>gcc:<cxxflags>-Wno-uninitialized + <toolset>gcc:<cxxflags>-Wno-int-in-bool-context + <toolset>gcc:<cxxflags>-Wno-bool-operation + <toolset>gcc:<warnings-as-errors>on + <toolset>intel:<warnings-as-errors>on + <toolset>sun:<warnings-as-errors>on + <toolset>msvc:<warnings-as-errors>on + <include>libs/tt2/light/include + $(CI_DEFINES) +; + +rule all-tests { + local result ; + for local source in [ glob *_test*.cpp ] + { + result += [ run $(source) ] ; + } + for local source in [ glob compile_fail/*.cpp ] + { + result += [ compile-fail $(source) ] ; + } + # + # These traits have both intrinsic support, and a std conforming version, test a version with intrinsics disabled for better code coverage: + # + for local source in has_nothrow_assign_test has_nothrow_constr_test has_nothrow_copy_test is_nothrow_move_assignable_test is_nothrow_move_constructible_test + { + result += [ run $(source).cpp : : : <define>BOOST_TT_DISABLE_INTRINSICS : $(source)_no_intrinsics ] ; + } + return $(result) ; +} + +test-suite type_traits : [ all-tests ] ; + + diff --git a/src/boost/libs/type_traits/test/add_const_test.cpp b/src/boost/libs/type_traits/test/add_const_test.cpp new file mode 100644 index 000000000..41fe75f45 --- /dev/null +++ b/src/boost/libs/type_traits/test/add_const_test.cpp @@ -0,0 +1,61 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_const.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(add_const_test_1, ::tt::add_const, const, const) +BOOST_DECL_TRANSFORM_TEST(add_const_test_2, ::tt::add_const, volatile, volatile const) +BOOST_DECL_TRANSFORM_TEST(add_const_test_3, ::tt::add_const, *, *const) +BOOST_DECL_TRANSFORM_TEST2(add_const_test_4, ::tt::add_const, const) +BOOST_DECL_TRANSFORM_TEST(add_const_test_7, ::tt::add_const, *volatile, *volatile const) +BOOST_DECL_TRANSFORM_TEST(add_const_test_10, ::tt::add_const, const*, const*const) +BOOST_DECL_TRANSFORM_TEST(add_const_test_11, ::tt::add_const, volatile*, volatile*const) +BOOST_DECL_TRANSFORM_TEST(add_const_test_5, ::tt::add_const, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_const_test_6, ::tt::add_const, &, &) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(add_const_test_5a, ::tt::add_const, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(add_const_test_6a, ::tt::add_const, &&, &&) +#endif +BOOST_DECL_TRANSFORM_TEST(add_const_test_8, ::tt::add_const, const [2], const [2]) +BOOST_DECL_TRANSFORM_TEST(add_const_test_9, ::tt::add_const, volatile &, volatile&) +BOOST_DECL_TRANSFORM_TEST(add_const_test_12, ::tt::add_const, [2][3], const[2][3]) +BOOST_DECL_TRANSFORM_TEST(add_const_test_13, ::tt::add_const, (&)[2], (&)[2]) + +TT_TEST_BEGIN(add_const) + + add_const_test_1(); + add_const_test_2(); + add_const_test_3(); + add_const_test_4(); + add_const_test_7(); + add_const_test_10(); + add_const_test_11(); + add_const_test_5(); + add_const_test_6(); + add_const_test_8(); + add_const_test_9(); + add_const_test_12(); + add_const_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + add_const_test_5a(); + add_const_test_6a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/add_cv_test.cpp b/src/boost/libs/type_traits/test/add_cv_test.cpp new file mode 100644 index 000000000..c1a270207 --- /dev/null +++ b/src/boost/libs/type_traits/test/add_cv_test.cpp @@ -0,0 +1,61 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_cv.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(add_cv_test_1, ::tt::add_cv, const, const volatile) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_2, ::tt::add_cv, volatile, volatile const) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_3, ::tt::add_cv, *, *const volatile) +BOOST_DECL_TRANSFORM_TEST2(add_cv_test_4, ::tt::add_cv, const volatile) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_7, ::tt::add_cv, *volatile, *volatile const) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_10, ::tt::add_cv, const*, const*const volatile) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_11, ::tt::add_cv, volatile*, volatile*const volatile ) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_5, ::tt::add_cv, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_6, ::tt::add_cv, &, &) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(add_cv_test_5a, ::tt::add_cv, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_6a, ::tt::add_cv, &&, &&) +#endif +BOOST_DECL_TRANSFORM_TEST(add_cv_test_8, ::tt::add_cv, const [2], const volatile [2]) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_9, ::tt::add_cv, volatile &, volatile&) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_12, ::tt::add_cv, [2][3], const volatile[2][3]) +BOOST_DECL_TRANSFORM_TEST(add_cv_test_13, ::tt::add_cv, (&)[2], (&)[2]) + +TT_TEST_BEGIN(add_const) + + add_cv_test_1(); + add_cv_test_2(); + add_cv_test_3(); + add_cv_test_4(); + add_cv_test_7(); + add_cv_test_10(); + add_cv_test_11(); + add_cv_test_5(); + add_cv_test_6(); + add_cv_test_8(); + add_cv_test_9(); + add_cv_test_12(); + add_cv_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + add_cv_test_5a(); + add_cv_test_6a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/add_lvalue_reference_test.cpp b/src/boost/libs/type_traits/test/add_lvalue_reference_test.cpp new file mode 100644 index 000000000..3a695c925 --- /dev/null +++ b/src/boost/libs/type_traits/test/add_lvalue_reference_test.cpp @@ -0,0 +1,68 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_lvalue_reference.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_1, ::tt::add_lvalue_reference, const, const&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_2, ::tt::add_lvalue_reference, volatile, volatile&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_3, ::tt::add_lvalue_reference, *, *&) +BOOST_DECL_TRANSFORM_TEST2(add_lvalue_reference_test_4, ::tt::add_lvalue_reference, &) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_5, ::tt::add_lvalue_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_6, ::tt::add_lvalue_reference, &, &) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_7, ::tt::add_lvalue_reference, *volatile, *volatile&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_8, ::tt::add_lvalue_reference, const [2], const (&)[2]) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_9, ::tt::add_lvalue_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_10, ::tt::add_lvalue_reference, const*, const*&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_11, ::tt::add_lvalue_reference, volatile*, volatile*&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_12, ::tt::add_lvalue_reference, const[2][3], const (&)[2][3]) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_13, ::tt::add_lvalue_reference, (&)[2], (&)[2]) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_5a, ::tt::add_lvalue_reference, const &&, const&) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_6a, ::tt::add_lvalue_reference, &&, &) +BOOST_DECL_TRANSFORM_TEST(add_lvalue_reference_test_13a, ::tt::add_lvalue_reference, (&&)[2], (&)[2]) +#endif + +TT_TEST_BEGIN(add_lvalue_reference) + + add_lvalue_reference_test_1(); + add_lvalue_reference_test_2(); + add_lvalue_reference_test_3(); + add_lvalue_reference_test_4(); + add_lvalue_reference_test_5(); + add_lvalue_reference_test_6(); + add_lvalue_reference_test_7(); + add_lvalue_reference_test_8(); + add_lvalue_reference_test_9(); + add_lvalue_reference_test_10(); + add_lvalue_reference_test_11(); + add_lvalue_reference_test_12(); + add_lvalue_reference_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + add_lvalue_reference_test_5a(); + add_lvalue_reference_test_6a(); + add_lvalue_reference_test_13a(); +#endif + + BOOST_CHECK_TYPE(tt::add_lvalue_reference<void>::type, void); + BOOST_CHECK_TYPE(tt::add_lvalue_reference<const void>::type, const void); + BOOST_CHECK_TYPE(tt::add_lvalue_reference<const volatile void>::type, const volatile void); + BOOST_CHECK_TYPE(tt::add_lvalue_reference<volatile void>::type, volatile void); + + TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/add_pointer_test.cpp b/src/boost/libs/type_traits/test/add_pointer_test.cpp new file mode 100644 index 000000000..3a9744588 --- /dev/null +++ b/src/boost/libs/type_traits/test/add_pointer_test.cpp @@ -0,0 +1,41 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_pointer.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_1, ::tt::add_pointer, const, const*) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_2, ::tt::add_pointer, volatile, volatile*) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_3, ::tt::add_pointer, *, **) +BOOST_DECL_TRANSFORM_TEST2(add_pointer_test_4, ::tt::add_pointer, *) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_7, ::tt::add_pointer, *volatile, *volatile*) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_10, ::tt::add_pointer, const*, const**) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_11, ::tt::add_pointer, volatile*, volatile**) + +TT_TEST_BEGIN(add_pointer) + + add_pointer_test_1(); + add_pointer_test_2(); + add_pointer_test_3(); + add_pointer_test_4(); + add_pointer_test_7(); + add_pointer_test_10(); + add_pointer_test_11(); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/add_reference_test.cpp b/src/boost/libs/type_traits/test/add_reference_test.cpp new file mode 100644 index 000000000..368181b3e --- /dev/null +++ b/src/boost/libs/type_traits/test/add_reference_test.cpp @@ -0,0 +1,68 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_reference.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(add_reference_test_1, ::tt::add_reference, const, const&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_2, ::tt::add_reference, volatile, volatile&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_3, ::tt::add_reference, *, *&) +BOOST_DECL_TRANSFORM_TEST2(add_reference_test_4, ::tt::add_reference, &) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_5, ::tt::add_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_6, ::tt::add_reference, &, &) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_7, ::tt::add_reference, *volatile, *volatile&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_8, ::tt::add_reference, const [2], const (&)[2]) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_9, ::tt::add_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_10, ::tt::add_reference, const*, const*&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_11, ::tt::add_reference, volatile*, volatile*&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_12, ::tt::add_reference, const[2][3], const (&)[2][3]) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_13, ::tt::add_reference, (&)[2], (&)[2]) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(add_reference_test_5a, ::tt::add_reference, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_6a, ::tt::add_reference, &&, &&) +BOOST_DECL_TRANSFORM_TEST(add_reference_test_13a, ::tt::add_reference, (&&)[2], (&&)[2]) +#endif + +TT_TEST_BEGIN(add_reference) + + add_reference_test_1(); + add_reference_test_2(); + add_reference_test_3(); + add_reference_test_4(); + add_reference_test_5(); + add_reference_test_6(); + add_reference_test_7(); + add_reference_test_8(); + add_reference_test_9(); + add_reference_test_10(); + add_reference_test_11(); + add_reference_test_12(); + add_reference_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + add_reference_test_5a(); + add_reference_test_6a(); + add_reference_test_13a(); +#endif + + BOOST_CHECK_TYPE(tt::add_reference<void>::type, void); + BOOST_CHECK_TYPE(tt::add_reference<const void>::type, const void); + BOOST_CHECK_TYPE(tt::add_reference<const volatile void>::type, const volatile void); + BOOST_CHECK_TYPE(tt::add_reference<volatile void>::type, volatile void); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/add_rvalue_reference_test.cpp b/src/boost/libs/type_traits/test/add_rvalue_reference_test.cpp new file mode 100644 index 000000000..ae0d75c29 --- /dev/null +++ b/src/boost/libs/type_traits/test/add_rvalue_reference_test.cpp @@ -0,0 +1,85 @@ + +// Copyright 2010 Vicente J. Botet Escriba +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_rvalue_reference.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES + +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_1, ::tt::add_rvalue_reference, const, const) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_2, ::tt::add_rvalue_reference, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_3, ::tt::add_rvalue_reference, *, *) +BOOST_DECL_TRANSFORM_TEST0(add_rvalue_reference_test_4, ::tt::add_rvalue_reference) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_5, ::tt::add_rvalue_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_6, ::tt::add_rvalue_reference, &, &) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_7, ::tt::add_rvalue_reference, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_8, ::tt::add_rvalue_reference, const [2], const [2]) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_9, ::tt::add_rvalue_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_10, ::tt::add_rvalue_reference, const*, const*) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_11, ::tt::add_rvalue_reference, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_12, ::tt::add_rvalue_reference, const[2][3], const [2][3]) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_13, ::tt::add_rvalue_reference, (&)[2], (&)[2]) +#else + +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_1, ::tt::add_rvalue_reference, const, const&&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_2, ::tt::add_rvalue_reference, volatile, volatile&&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_3, ::tt::add_rvalue_reference, *, *&&) +BOOST_DECL_TRANSFORM_TEST2(add_rvalue_reference_test_4, ::tt::add_rvalue_reference, &&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_5, ::tt::add_rvalue_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_6, ::tt::add_rvalue_reference, &, &) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_7, ::tt::add_rvalue_reference, *volatile, *volatile&&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_8, ::tt::add_rvalue_reference, const [2], const (&&) [2]) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_9, ::tt::add_rvalue_reference, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_10, ::tt::add_rvalue_reference, const*, const*&&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_11, ::tt::add_rvalue_reference, volatile*, volatile*&&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_12, ::tt::add_rvalue_reference, const[2][3], const (&&) [2][3]) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_13, ::tt::add_rvalue_reference, (&)[2], (&)[2]) + +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_5a, ::tt::add_rvalue_reference, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_6a, ::tt::add_rvalue_reference, &&, &&) +BOOST_DECL_TRANSFORM_TEST(add_rvalue_reference_test_13a, ::tt::add_rvalue_reference, (&&)[2], (&&)[2]) +#endif + +TT_TEST_BEGIN(add_rvalue_reference) + + add_rvalue_reference_test_1(); + add_rvalue_reference_test_2(); + add_rvalue_reference_test_3(); + add_rvalue_reference_test_4(); + add_rvalue_reference_test_5(); + add_rvalue_reference_test_6(); + add_rvalue_reference_test_7(); + add_rvalue_reference_test_8(); + add_rvalue_reference_test_9(); + add_rvalue_reference_test_10(); + add_rvalue_reference_test_11(); + add_rvalue_reference_test_12(); + add_rvalue_reference_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + add_rvalue_reference_test_5a(); + add_rvalue_reference_test_6a(); + add_rvalue_reference_test_13a(); +#endif + + BOOST_CHECK_TYPE(tt::add_rvalue_reference<void>::type, void); + BOOST_CHECK_TYPE(tt::add_rvalue_reference<const void>::type, const void); + BOOST_CHECK_TYPE(tt::add_rvalue_reference<const volatile void>::type, const volatile void); + BOOST_CHECK_TYPE(tt::add_rvalue_reference<volatile void>::type, volatile void); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/add_volatile_test.cpp b/src/boost/libs/type_traits/test/add_volatile_test.cpp new file mode 100644 index 000000000..d0c416c3b --- /dev/null +++ b/src/boost/libs/type_traits/test/add_volatile_test.cpp @@ -0,0 +1,59 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_volatile.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_1, ::tt::add_volatile, const, const volatile) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_2, ::tt::add_volatile, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_3, ::tt::add_volatile, *, *volatile) +BOOST_DECL_TRANSFORM_TEST2(add_volatile_test_4, ::tt::add_volatile, volatile) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_7, ::tt::add_volatile, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_10, ::tt::add_volatile, const*, const*volatile) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_11, ::tt::add_volatile, volatile*, volatile*volatile) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_5, ::tt::add_volatile, const &, const&) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_6, ::tt::add_volatile, &, &) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_6a, ::tt::add_volatile, &&, &&) +#endif +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_8, ::tt::add_volatile, const [2], const volatile [2]) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_9, ::tt::add_volatile, volatile &, volatile&) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_12, ::tt::add_volatile, [2][3], volatile[2][3]) +BOOST_DECL_TRANSFORM_TEST(add_volatile_test_13, ::tt::add_volatile, (&)[2], (&)[2]) + +TT_TEST_BEGIN(add_volatile) + + add_volatile_test_1(); + add_volatile_test_2(); + add_volatile_test_3(); + add_volatile_test_4(); + add_volatile_test_7(); + add_volatile_test_10(); + add_volatile_test_11(); + add_volatile_test_5(); + add_volatile_test_6(); + add_volatile_test_8(); + add_volatile_test_9(); + add_volatile_test_12(); + add_volatile_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + add_volatile_test_6a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp b/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp new file mode 100644 index 000000000..f2a49ad54 --- /dev/null +++ b/src/boost/libs/type_traits/test/aligned_storage_a2_test.cpp @@ -0,0 +1,128 @@ + +#ifdef _MSC_VER +#pragma pack(2) +#endif + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +# include <boost/type_traits/type_with_alignment.hpp> // max_align and long_long_type +#else +# include <boost/type_traits/alignment_of.hpp> +# include <boost/type_traits/aligned_storage.hpp> +# include <boost/type_traits/is_pod.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +template <class T> +union must_be_pod +{ + int i; + T t; +}; + +template <class T> +inline void no_unused_warning(const volatile T&) +{ +} + +template <class T> +void do_check(const T&) +{ + typedef typename tt::aligned_storage<T::value,T::value>::type t1; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + // In order to test this with warnings-as-errors with GCC, we need + // a slightly different initializer here to suppress spurious + // GCC warnings (ie to work around a GCC buglet). + t1 as1 = {{{ 0, }}}; +#else + t1 as1 = { 0, }; +#endif + must_be_pod<t1> pod1; + no_unused_warning(as1); + no_unused_warning(pod1); + BOOST_TEST_MESSAGE(typeid(t1).name()); + BOOST_CHECK(::tt::alignment_of<t1>::value == T::value); + BOOST_CHECK(sizeof(t1) == T::value); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod<t1>::value == true); +#endif + typedef typename tt::aligned_storage<T::value*2,T::value>::type t2; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + t2 as2 = {{{ 0, }}}; +#else + t2 as2 = { 0, }; +#endif + must_be_pod<t2> pod2; + no_unused_warning(as2); + no_unused_warning(pod2); + BOOST_TEST_MESSAGE(typeid(t2).name()); + BOOST_CHECK(::tt::alignment_of<t2>::value == T::value); + BOOST_CHECK(sizeof(t2) == T::value*2); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod<t2>::value == true); +#endif + +#ifndef TEST_STD + // Non-Tr1 behaviour: + typedef typename tt::aligned_storage<T::value,(std::size_t)(-1L)>::type t3; +#if defined(BOOST_GCC) && (BOOST_GCC < 40800) + t3 as3 = {{{ 0, }}}; +#else + t3 as3 = { 0, }; +#endif + must_be_pod<t3> pod3; + no_unused_warning(as3); + no_unused_warning(pod3); + BOOST_TEST_MESSAGE(typeid(t3).name()); + BOOST_CHECK(::tt::alignment_of<t3>::value == ::tt::alignment_of< ::boost::detail::max_align>::value); + BOOST_CHECK((sizeof(t3) % T::value) == 0); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod<t3>::value == true); +#endif +#endif +} + +TT_TEST_BEGIN(type_with_alignment) + +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<char>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<short>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<long>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<float>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<double>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<long double>::value>()); + +#ifdef BOOST_HAS_LONG_LONG +do_check(tt::integral_constant<std::size_t,::tt::alignment_of< ::boost::long_long_type>::value>()); +#endif +#ifdef BOOST_HAS_MS_INT64 +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<__int64>::value>()); +#endif +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int[4]>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int(*)(int)>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int*>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<VB>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<VD>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<enum_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<mf2>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<POD_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<empty_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<union_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<boost::detail::max_align>::value>()); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/aligned_storage_empy_test.cpp b/src/boost/libs/type_traits/test/aligned_storage_empy_test.cpp new file mode 100644 index 000000000..3e19a379c --- /dev/null +++ b/src/boost/libs/type_traits/test/aligned_storage_empy_test.cpp @@ -0,0 +1,128 @@ + +// (C) Copyright Thorsten Ottosen 2009. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +# include <boost/type_traits/type_with_alignment.hpp> // max_align and long_long_type +#else +# include <boost/type_traits/alignment_of.hpp> +# include <boost/type_traits/aligned_storage.hpp> +# include <boost/type_traits/is_pod.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + + +namespace +{ + template< unsigned N, unsigned Alignment > + struct alignment_implementation1 + { + boost::detail::aligned_storage::aligned_storage_imp<N,Alignment> type; + const void* address() const { return type.address(); } + }; + + template< unsigned N, unsigned Alignment > + struct alignment_implementation2 : +#ifndef __BORLANDC__ + private +#else + public +#endif + boost::detail::aligned_storage::aligned_storage_imp<N,Alignment> + { + typedef boost::detail::aligned_storage::aligned_storage_imp<N,Alignment> type; + const void* address() const { return static_cast<const type*>(this)->address(); } + }; + + template< unsigned N, class T > + std::ptrdiff_t get_address1() + { + static alignment_implementation1<N*sizeof(T), tt::alignment_of<T>::value> imp1; + return static_cast<const char*>(imp1.address()) - reinterpret_cast<const char*>(&imp1); + } + + template< unsigned N, class T > + std::ptrdiff_t get_address2() + { + static alignment_implementation2<N*sizeof(T), tt::alignment_of<T>::value> imp2; + return static_cast<const char*>(imp2.address()) - reinterpret_cast<const char*>(&imp2); + } + + template< class T > + void do_check() + { + std::ptrdiff_t addr1 = get_address1<0,T>(); + std::ptrdiff_t addr2 = get_address2<0,T>(); + // + // @remark: only the empty case differs + // + BOOST_CHECK( addr1 != addr2 ); + + addr1 = get_address1<1,T>(); + addr2 = get_address2<1,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<2,T>(); + addr2 = get_address2<2,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<3,T>(); + addr2 = get_address2<3,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<4,T>(); + addr2 = get_address2<4,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<17,T>(); + addr2 = get_address2<17,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<32,T>(); + addr2 = get_address2<32,T>(); + BOOST_CHECK( addr1 == addr2 ); + } +} + +TT_TEST_BEGIN(type_with_empty_alignment_buffer) + +do_check<char>(); +do_check<short>(); +do_check<int>(); +do_check<long>(); +do_check<float>(); +do_check<double>(); +do_check<long double>(); + +#ifdef BOOST_HAS_MS_INT64 +do_check<__int64>(); +#endif +#ifdef BOOST_HAS_LONG_LONG +do_check<boost::long_long_type>(); +#endif + +do_check<int(*)(int)>(); +do_check<int*>(); +do_check<VB>(); +do_check<VD>(); +do_check<enum_UDT>(); +do_check<mf2>(); +do_check<POD_UDT>(); +do_check<empty_UDT>(); +do_check<union_UDT>(); +do_check<boost::detail::max_align>(); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/aligned_storage_test.cpp b/src/boost/libs/type_traits/test/aligned_storage_test.cpp new file mode 100644 index 000000000..517a40276 --- /dev/null +++ b/src/boost/libs/type_traits/test/aligned_storage_test.cpp @@ -0,0 +1,116 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +# include <boost/type_traits/type_with_alignment.hpp> // max_align and long_long_type +#else +# include <boost/type_traits/alignment_of.hpp> +# include <boost/type_traits/aligned_storage.hpp> +# include <boost/type_traits/is_pod.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +template <class T> +union must_be_pod +{ + int i; + T t; +}; + +template <class T> +inline void no_unused_warning(const volatile T&) +{ +} + +#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(BOOST_INTEL) +#pragma GCC diagnostic ignored "-Wmissing-braces" +#endif + +template <class T> +void do_check(const T&) +{ + typedef typename tt::aligned_storage<T::value,T::value>::type t1; + t1 as1 = { 0, }; + must_be_pod<t1> pod1; + no_unused_warning(as1); + no_unused_warning(pod1); + BOOST_TEST_MESSAGE(typeid(t1).name()); + BOOST_CHECK(::tt::alignment_of<t1>::value == T::value); + BOOST_CHECK(sizeof(t1) == T::value); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod<t1>::value == true); +#endif + typedef typename tt::aligned_storage<T::value*2,T::value>::type t2; + t2 as2 = { 0, }; + must_be_pod<t2> pod2; + no_unused_warning(as2); + no_unused_warning(pod2); + BOOST_TEST_MESSAGE(typeid(t2).name()); + BOOST_CHECK(::tt::alignment_of<t2>::value == T::value); + BOOST_CHECK(sizeof(t2) == T::value*2); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod<t2>::value == true); +#endif + +#ifndef TEST_STD + // Non-Tr1 behaviour: + typedef typename tt::aligned_storage<T::value, ~static_cast<std::size_t>(0UL)>::type t3; + t3 as3 = { 0, }; + must_be_pod<t3> pod3; + no_unused_warning(as3); + no_unused_warning(pod3); + BOOST_TEST_MESSAGE(typeid(t3).name()); + BOOST_CHECK(::tt::alignment_of<t3>::value == ::tt::alignment_of< ::boost::detail::max_align>::value); + BOOST_CHECK((sizeof(t3) % T::value) == 0); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod<t3>::value == true); +#endif + BOOST_CHECK(as3.address() == &as3); + const t3 as4 = { 0, }; + BOOST_CHECK(as4.address() == static_cast<const void*>(&as4)); +#endif +} + +TT_TEST_BEGIN(type_with_alignment) + +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<char>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<short>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<long>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<float>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<double>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<long double>::value>()); + +#ifdef BOOST_HAS_LONG_LONG +do_check(tt::integral_constant<std::size_t,::tt::alignment_of< ::boost::long_long_type>::value>()); +#endif +#ifdef BOOST_HAS_MS_INT64 +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<__int64>::value>()); +#endif +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int[4]>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int(*)(int)>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<int*>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<VB>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<VD>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<enum_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<mf2>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<POD_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<empty_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<union_UDT>::value>()); +do_check(tt::integral_constant<std::size_t,::tt::alignment_of<boost::detail::max_align>::value>()); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/alignment_of_a2_test.cpp b/src/boost/libs/type_traits/test/alignment_of_a2_test.cpp new file mode 100644 index 000000000..42f0fe365 --- /dev/null +++ b/src/boost/libs/type_traits/test/alignment_of_a2_test.cpp @@ -0,0 +1,126 @@ + +#ifdef _MSC_VER +#pragma pack(2) +#endif + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/alignment_of.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +// +// Need to defined some member functions for empty_UDT, +// we don't want to put these in the test.hpp as that +// causes overly-clever compilers to figure out that they can't throw +// which in turn breaks other tests. +// +empty_UDT::empty_UDT(){} +empty_UDT::~empty_UDT(){} +empty_UDT::empty_UDT(const empty_UDT&){} +empty_UDT& empty_UDT::operator=(const empty_UDT&){ return *this; } +bool empty_UDT::operator==(const empty_UDT&)const{ return true; } + + +// +// VC++ emits an awful lot of warnings unless we define these: +#ifdef BOOST_MSVC +# pragma warning(disable:4244 4121) +// +// What follows here is the test case for issue 1946. +// +#include <boost/function.hpp> +// This kind of packing is set within MSVC 9.0 headers. +// E.g. std::ostream has it. +#pragma pack(push,8) + +// The issue is gone if Root has no data members +struct Root { int a; }; +// The issue is gone if Root is inherited non-virtually +struct A : virtual public Root {}; + +#pragma pack(pop) +// +// This class has 8-byte alignment but is 44 bytes in size, which means +// that elements in an array of this type will not actually be 8 byte +// aligned. This appears to be an MSVC bug, and throws off our +// alignment calculations: causing us to report a non-sensical 12-byte +// alignment for this type. This is fixed by using the native __alignof +// operator. +// +class issue1946 : + public A +{ +public: + // The issue is gone if the type is not a boost::function. The signature doesn't matter. + typedef boost::function0< void > function_type; + function_type m_function; +}; + +#endif + + +template <class T> +struct align_calc +{ + char padding; + T instance; + static std::ptrdiff_t get() + { + static align_calc<T> a; + return reinterpret_cast<const char*>(&(a.instance)) - reinterpret_cast<const char*>(&(a.padding)); + } +}; + +#define ALIGNOF(x) align_calc< x>::get() + +TT_TEST_BEGIN(alignment_of) + +#ifndef TEST_STD +// This test is not required to work for non-boost implementations: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<void>::value, 0); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char>::value, ALIGNOF(char)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<short>::value, ALIGNOF(short)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int>::value, ALIGNOF(int)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<long>::value, ALIGNOF(long)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<float>::value, ALIGNOF(float)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<double>::value, ALIGNOF(double)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<long double>::value, ALIGNOF(long double)); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of< ::boost::long_long_type>::value, ALIGNOF(::boost::long_long_type)); +#endif +#ifdef BOOST_HAS_MS_INT64 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<__int64>::value, ALIGNOF(__int64)); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int[4]>::value, ALIGNOF(int[4])); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int(*)(int)>::value, ALIGNOF(int(*)(int))); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int*>::value, ALIGNOF(int*)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<VB>::value, ALIGNOF(VB)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<VD>::value, ALIGNOF(VD)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<enum_UDT>::value, ALIGNOF(enum_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<mf2>::value, ALIGNOF(mf2)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<POD_UDT>::value, ALIGNOF(POD_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<empty_UDT>::value, ALIGNOF(empty_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<union_UDT>::value, ALIGNOF(union_UDT)); + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<issue1946>::value, ALIGNOF(issue1946)); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/alignment_of_test.cpp b/src/boost/libs/type_traits/test/alignment_of_test.cpp new file mode 100644 index 000000000..5f92d0765 --- /dev/null +++ b/src/boost/libs/type_traits/test/alignment_of_test.cpp @@ -0,0 +1,121 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/alignment_of.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +// +// Need to defined some member function for empty_UDT, +// we don't want to put these in the test.hpp as that +// causes overly-clever compilers to figure out that they can't throw +// which in turn breaks other tests. +// +empty_UDT::empty_UDT(){} +empty_UDT::~empty_UDT(){} +empty_UDT::empty_UDT(const empty_UDT&){} +empty_UDT& empty_UDT::operator=(const empty_UDT&){ return *this; } +bool empty_UDT::operator==(const empty_UDT&)const{ return true; } + +// +// VC++ emits an awful lot of warnings unless we define these: +#ifdef BOOST_MSVC +# pragma warning(disable:4244) +// +// What follows here is the test case for issue 1946. +// +#include <boost/function.hpp> +// This kind of packing is set within MSVC 9.0 headers. +// E.g. std::ostream has it. +#pragma pack(push,8) + +// The issue is gone if Root has no data members +struct Root { int a; }; +// The issue is gone if Root is inherited non-virtually +struct A : virtual public Root {}; + +#pragma pack(pop) +// +// This class has 8-byte alignment but is 44 bytes in size, which means +// that elements in an array of this type will not actually be 8 byte +// aligned. This appears to be an MSVC bug, and throws off our +// alignment calculations: causing us to report a non-sensical 12-byte +// alignment for this type. This is fixed by using the native __alignof +// operator. +// +class issue1946 : + public A +{ +public: + // The issue is gone if the type is not a boost::function. The signature doesn't matter. + typedef boost::function0< void > function_type; + function_type m_function; +}; + +#endif + + +template <class T> +struct align_calc +{ + char padding; + T instance; + static std::ptrdiff_t get() + { + static align_calc<T> a; + return reinterpret_cast<const char*>(&(a.instance)) - reinterpret_cast<const char*>(&(a.padding)); + } +}; + +#define ALIGNOF(x) align_calc< x>::get() + +TT_TEST_BEGIN(alignment_of) + +#ifndef TEST_STD +// This test is not required to work for non-boost implementations: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<void>::value, 0); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char>::value, ALIGNOF(char)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<short>::value, ALIGNOF(short)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int>::value, ALIGNOF(int)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<long>::value, ALIGNOF(long)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<float>::value, ALIGNOF(float)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<double>::value, ALIGNOF(double)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<long double>::value, ALIGNOF(long double)); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of< ::boost::long_long_type>::value, ALIGNOF(::boost::long_long_type)); +#endif +#ifdef BOOST_HAS_MS_INT64 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<__int64>::value, ALIGNOF(__int64)); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int[4]>::value, ALIGNOF(int[4])); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int(*)(int)>::value, ALIGNOF(int(*)(int))); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<int*>::value, ALIGNOF(int*)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<VB>::value, ALIGNOF(VB)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<VD>::value, ALIGNOF(VD)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<enum_UDT>::value, ALIGNOF(enum_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<mf2>::value, ALIGNOF(mf2)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<POD_UDT>::value, ALIGNOF(POD_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<empty_UDT>::value, ALIGNOF(empty_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<union_UDT>::value, ALIGNOF(union_UDT)); + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<issue1946>::value, ALIGNOF(issue1946)); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/check_integral_constant.hpp b/src/boost/libs/type_traits/test/check_integral_constant.hpp new file mode 100644 index 000000000..a21b6c5de --- /dev/null +++ b/src/boost/libs/type_traits/test/check_integral_constant.hpp @@ -0,0 +1,79 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CHECK_INTEGRAL_CONSTANT_HPP +#define BOOST_CHECK_INTEGRAL_CONSTANT_HPP + +#include "test.hpp" + +namespace boost{ + namespace detail{ + + /* + macro: + BOOST_CHECK_INTEGRAL_CONSTANT(expression, expected_value) + + expression: an integral constant expression to check. + expected_value: the value expected. + */ + + template <long test_value> + struct integral_constant + { + static long value() { return test_value; } + }; + + template <class T, class U> + bool tt_compare(T found, U expected) + { return static_cast<U>(found) == expected; } + +#define BOOST_CHECK_INTEGRAL_CONSTANT(expression, expected_value)\ + if(!::boost::detail::tt_compare(::boost::detail::integral_constant<(int)(expression)>::value(), (int)expression)){\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression) << "\" had differing values depending upon whether it was used as an integral constant expression or not");\ + }else{\ + BOOST_CHECK_MESSAGE(true, "Validating Integral Constant Expression: \"" << BOOST_STRINGIZE(expression) << "\"");\ + }\ + if(!::boost::detail::tt_compare((int)expression, expected_value))\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression) << "\" had an invalid value (found " << ::boost::detail::integral_constant<(int)(expression)>::value() << ", expected " << expected_value << ")" ) + + /* + macro: + BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(expression, expected_value, alternate_value) + + expression: an integral constant expression to check. + expected_value: the value expected. + alternate_value: an alternative value that results is a warning not a failure if found. + */ + +#define BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(expression, expected_value, alternate_value)\ + if(!::boost::detail::tt_compare(::boost::detail::integral_constant<(int)(expression)>::value(), (int)expression)){\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression) << "\" had differing values depending upon whether it was used as an integral constant expression or not");\ + }else{\ + BOOST_CHECK_MESSAGE(true, "Validating Integral Constant Expression: \"" << BOOST_STRINGIZE(expression) << "\"");\ + }\ + if(!::boost::detail::tt_compare((int)expression, expected_value))\ + {\ + if(!::boost::detail::tt_compare((int)expression, alternate_value))\ + {\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression) << "\" had an invalid value (found " << ::boost::detail::integral_constant<(int)(expression)>::value() << ", expected " << expected_value << ")" );\ + }\ + else\ + {\ + BOOST_WARN_MESSAGE(false, "<note>The expression: \"" << BOOST_STRINGIZE(expression) << "\" did not have the value we wish it to have (found " << ::boost::detail::integral_constant<(int)(expression)>::value() << ", expected " << expected_value << ")</note>" );\ + }\ + } + + + }//detail +}//boost + + +#endif + + + + + diff --git a/src/boost/libs/type_traits/test/check_type.hpp b/src/boost/libs/type_traits/test/check_type.hpp new file mode 100644 index 000000000..7bd0779fc --- /dev/null +++ b/src/boost/libs/type_traits/test/check_type.hpp @@ -0,0 +1,67 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CHECK_TYPE_HPP +#define BOOST_CHECK_TYPE_HPP + +#include "test.hpp" +#include <boost/type_traits/is_same.hpp> + +/* +macro: +BOOST_CHECK_TYPE(type_expression, expected_type) + +type_expression: an expression that evaluates to a typename. +expected_value: the type we expect to find. +*/ + +#ifdef __BORLANDC__ +#pragma option -w-8008 -w-8066 -w-8019 +#endif + + +#define BOOST_CHECK_TYPE(type_expression, expected_type)\ +do{\ + if(!::boost::is_same< type_expression, expected_type >::value){\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression)\ + << "\" did not have the expected type:\n\tevaluating: boost::is_same<"\ + << BOOST_STRINGIZE(type_expression) << ", " << BOOST_STRINGIZE(expected_type)\ + << ">" << "\n\tfound: "\ + << typeid(::boost::is_same< type_expression, expected_type >).name());\ + }else\ + BOOST_CHECK_MESSAGE(true, "Validating Type Expression: \""\ + << BOOST_STRINGIZE(expression) << "\"");\ +}while(0) + +#define BOOST_CHECK_TYPE3(type_expression, type_expression_suffix, expected_type)\ +do{\ + if(!::boost::is_same< type_expression, type_expression_suffix, expected_type >::value){\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression)\ + << "\" did not have the expected type:\n\tevaluating: boost::is_same<"\ + << BOOST_STRINGIZE((type_expression, type_expression_suffix)) << ", " << BOOST_STRINGIZE(expected_type)\ + << ">" << "\n\tfound: "\ + << typeid(::boost::is_same< type_expression, type_expression_suffix, expected_type >).name());\ + }else\ + BOOST_CHECK_MESSAGE(true, "Validating Type Expression: \""\ + << BOOST_STRINGIZE(expression) << "\"");\ +}while(0) + +#define BOOST_CHECK_TYPE4(type_expression, suffix1, suffix2, expected_type)\ +do{\ + if(!::boost::is_same< type_expression, suffix1, suffix2, expected_type >::value){\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression)\ + << "\" did not have the expected type:\n\tevaluating: boost::is_same<"\ + << BOOST_STRINGIZE((type_expression, suffix1, suffix2)) << ", " << BOOST_STRINGIZE(expected_type)\ + << ">" << "\n\tfound: "\ + << typeid(::boost::is_same< type_expression, suffix1, suffix2, expected_type >).name());\ + }else\ + BOOST_CHECK_MESSAGE(true, "Validating Type Expression: \""\ + << BOOST_STRINGIZE(expression) << "\"");\ +}while(0) + +#endif + + diff --git a/src/boost/libs/type_traits/test/common_type_2_test.cpp b/src/boost/libs/type_traits/test/common_type_2_test.cpp new file mode 100644 index 000000000..84e81a27e --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_2_test.cpp @@ -0,0 +1,222 @@ +// common_type_test.cpp ----------------------------------------------------// + +// Copyright 2010 Beman Dawes + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#define BOOST_COMMON_TYPE_DONT_USE_TYPEOF 1 + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +#ifdef BOOST_INTEL +#pragma warning(disable: 304 383) +#endif + +struct C1 {}; + +struct C2 {}; + + +struct C3 : C2 {}; +struct C1C2 { + C1C2() {} + C1C2(C1 const&) {} + C1C2(C2 const&) {} + C1C2& operator=(C1C2 const&) { + return *this; + } +}; + +template <typename C, typename A> +void proc2(typename boost::common_type<A, C>::type const& ) {} + +template <typename C, typename A, typename B> +void proc3(typename boost::common_type<C, A, B>::type const& ) {} + +template <typename C, typename A> +void assignation_2() { +typedef typename boost::common_type<A, C>::type AC; + A a; + C c; + AC ac; + ac=a; + ac=c; + + proc2<C, A>(a); + proc2<C, A>(c); + +} + +template <typename C, typename A, typename B> +void assignation_3() { +typedef typename boost::common_type<C, A, B>::type ABC; + A a; + B b; + C c; + ABC abc; + + abc=a; + abc=b; + abc=c; + + proc3<C, A, B>(a); + proc3<C, A, B>(b); + proc3<C, A, B>(c); +} + +C1C2 c1c2; +C1 c1; + +int f(C1C2 ) { return 1;} +int f(C1 ) { return 2;} +template <typename OSTREAM> +OSTREAM& operator<<(OSTREAM& os, C1 const&) {return os;} + +C1C2& declval_C1C2() {return c1c2;} +C1& declval_C1(){return c1;} +bool declval_bool(){return true;} + + +TT_TEST_BEGIN(common_type) +{ +#ifndef __SUNPRO_CC + assignation_2<C1C2, C1>(); + typedef tt::common_type<C1C2&, C1&>::type T1; + BOOST_CHECK_TYPE(T1, C1C2); + typedef tt::common_type<C3*, C2*>::type T2; + BOOST_CHECK_TYPE(T2, C2*); + typedef tt::common_type<int*, int const*>::type T3; + BOOST_CHECK_TYPE(T3, int const*); +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) + // fails if BOOST_COMMON_TYPE_DONT_USE_TYPEOF: + typedef tt::common_type<int volatile*, int const*>::type T4; + BOOST_CHECK_TYPE(T4, int const volatile*); +#endif + typedef tt::common_type<int*, int volatile*>::type T5; + BOOST_CHECK_TYPE(T5, int volatile*); + + assignation_2<C1, C1C2>(); + assignation_2<C1C2, C2>(); + assignation_2<C2, C1C2>(); + assignation_3<C1, C1C2, C2>(); + assignation_3<C1C2, C1, C2>(); + assignation_3<C2, C1C2, C1>(); + assignation_3<C1C2, C2, C1>(); + //assignation_3<C1, C2, C1C2>(); // fails because the common type is the third +#endif + + typedef tt::common_type<C1C2, C1>::type t1; + BOOST_CHECK_TYPE(t1, C1C2); + + BOOST_CHECK_TYPE(tt::common_type<int>::type, int); + BOOST_CHECK_TYPE(tt::common_type<char>::type, char); + + BOOST_CHECK_TYPE3(tt::common_type<char, char>::type, char); + BOOST_CHECK_TYPE3(tt::common_type<char, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<char, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<char, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<char, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, unsigned char>::type, unsigned char); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<short, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, short>::type, short); + BOOST_CHECK_TYPE3(tt::common_type<short, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<short, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<short, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<short, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, unsigned short>::type, unsigned short); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<int, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<int, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<int, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<int, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, char>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, unsigned char>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, short>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, unsigned short>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, int>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, double>::type, double); + +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, char>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, unsigned char>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, short>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, unsigned short>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, int>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, unsigned int>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, boost::ulong_long_type>::type, boost::ulong_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, double>::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type<double, char>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, unsigned char>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, short>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, unsigned short>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, int>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, unsigned int>::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<double, boost::long_long_type>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, boost::ulong_long_type>::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type<double, double>::type, double); + + BOOST_CHECK_TYPE4(tt::common_type<double, char, int>::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE4(tt::common_type<unsigned, char, boost::long_long_type>::type, boost::long_long_type); +#endif +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/common_type_3_test.cpp b/src/boost/libs/type_traits/test/common_type_3_test.cpp new file mode 100644 index 000000000..7472304d3 --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_3_test.cpp @@ -0,0 +1,22 @@ + +// Copyright Peter Dimov 2015 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +TT_TEST_BEGIN(common_type_3) +{ + // just check whether the nullary specialization compiles + tt::common_type<> tmp; + (void)tmp; +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/common_type_4_test.cpp b/src/boost/libs/type_traits/test/common_type_4_test.cpp new file mode 100644 index 000000000..d046b6af8 --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_4_test.cpp @@ -0,0 +1,57 @@ + +// Copyright Peter Dimov 2015 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +TT_TEST_BEGIN(common_type_4) +{ + // the unary case should be the same as decay + + BOOST_CHECK_TYPE(tt::common_type<void>::type, void); + BOOST_CHECK_TYPE(tt::common_type<void const>::type, void); + BOOST_CHECK_TYPE(tt::common_type<void volatile>::type, void); + BOOST_CHECK_TYPE(tt::common_type<void const volatile>::type, void); + + BOOST_CHECK_TYPE(tt::common_type<char>::type, char); + BOOST_CHECK_TYPE(tt::common_type<char const>::type, char); + BOOST_CHECK_TYPE(tt::common_type<char volatile>::type, char); + BOOST_CHECK_TYPE(tt::common_type<char const volatile>::type, char); + + BOOST_CHECK_TYPE(tt::common_type<char&>::type, char); + BOOST_CHECK_TYPE(tt::common_type<char const&>::type, char); + BOOST_CHECK_TYPE(tt::common_type<char volatile&>::type, char); + BOOST_CHECK_TYPE(tt::common_type<char const volatile&>::type, char); + + BOOST_CHECK_TYPE(tt::common_type<char[]>::type, char*); + BOOST_CHECK_TYPE(tt::common_type<char const[]>::type, char const*); + BOOST_CHECK_TYPE(tt::common_type<char volatile[]>::type, char volatile*); + BOOST_CHECK_TYPE(tt::common_type<char const volatile[]>::type, char const volatile*); + + BOOST_CHECK_TYPE(tt::common_type<char[2]>::type, char*); + BOOST_CHECK_TYPE(tt::common_type<char const[2]>::type, char const*); + BOOST_CHECK_TYPE(tt::common_type<char volatile[2]>::type, char volatile*); + BOOST_CHECK_TYPE(tt::common_type<char const volatile[2]>::type, char const volatile*); + + BOOST_CHECK_TYPE(tt::common_type<char (&) [2]>::type, char*); + BOOST_CHECK_TYPE(tt::common_type<char const (&) [2]>::type, char const*); + BOOST_CHECK_TYPE(tt::common_type<char volatile (&) [2]>::type, char volatile*); + BOOST_CHECK_TYPE(tt::common_type<char const volatile (&) [2]>::type, char const volatile*); + + BOOST_CHECK_TYPE(tt::common_type<char()>::type, char(*)()); + + BOOST_CHECK_TYPE(tt::common_type<UDT()>::type, UDT(*)()); + BOOST_CHECK_TYPE(tt::common_type<UDT const()>::type, UDT const(*)()); + BOOST_CHECK_TYPE(tt::common_type<UDT volatile()>::type, UDT volatile(*)()); + BOOST_CHECK_TYPE(tt::common_type<UDT const volatile()>::type, UDT const volatile(*)()); +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/common_type_5_test.cpp b/src/boost/libs/type_traits/test/common_type_5_test.cpp new file mode 100644 index 000000000..600937209 --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_5_test.cpp @@ -0,0 +1,56 @@ + +// Copyright Peter Dimov 2015 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +template<class T> struct X +{ + T t_; + + X(): t_() {} + template<class U> X( X<U> const & x ): t_( x.t_ ) {} +}; + +namespace boost +{ + + template<class T, class U> struct common_type< X<T>, X<U> > + { + typedef X<typename common_type<T, U>::type> type; + }; + +} // namespace boost + +TT_TEST_BEGIN(common_type_5) +{ + // user specializations, binary + + BOOST_CHECK_TYPE3( tt::common_type< X<char>, X<char> >::type, X<char> ); + + BOOST_CHECK_TYPE3( tt::common_type< X<char>&, X<char>& >::type, X<char> ); + BOOST_CHECK_TYPE3( tt::common_type< X<char>&, X<char> const& >::type, X<char> ); + BOOST_CHECK_TYPE3( tt::common_type< X<char> const&, X<char>& >::type, X<char> ); + BOOST_CHECK_TYPE3( tt::common_type< X<char> const&, X<char> const& >::type, X<char> ); + + BOOST_CHECK_TYPE3( tt::common_type< X<char>, X<unsigned char> >::type, X<int> ); + + BOOST_CHECK_TYPE3( tt::common_type< X<char>&, X<unsigned char>& >::type, X<int> ); + BOOST_CHECK_TYPE3( tt::common_type< X<char>&, X<unsigned char> const& >::type, X<int> ); + BOOST_CHECK_TYPE3( tt::common_type< X<char> const&, X<unsigned char>& >::type, X<int> ); + BOOST_CHECK_TYPE3( tt::common_type< X<char> const&, X<unsigned char> const& >::type, X<int> ); + + // ternary + + BOOST_CHECK_TYPE4( tt::common_type< X<char>&, X<long> const&, X<short> volatile& >::type, X<long> ); +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/common_type_6_test.cpp b/src/boost/libs/type_traits/test/common_type_6_test.cpp new file mode 100644 index 000000000..7e6b3235f --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_6_test.cpp @@ -0,0 +1,39 @@ + +// Copyright Peter Dimov 2015 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +struct X {}; +struct Y: X {}; + +TT_TEST_BEGIN(common_type_6) +{ + // binary case + + BOOST_CHECK_TYPE3(tt::common_type<void, void>::type, void); + + BOOST_CHECK_TYPE3(tt::common_type<int, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int&, int&>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int&, int const&>::type, int); + + BOOST_CHECK_TYPE3(tt::common_type<X, X>::type, X); + BOOST_CHECK_TYPE3(tt::common_type<X&, X&>::type, X); + BOOST_CHECK_TYPE3(tt::common_type<X&, X const&>::type, X); + + BOOST_CHECK_TYPE3(tt::common_type<X, Y>::type, X); + BOOST_CHECK_TYPE3(tt::common_type<X&, Y&>::type, X); + BOOST_CHECK_TYPE3(tt::common_type<X const&, Y&>::type, X); + BOOST_CHECK_TYPE3(tt::common_type<X&, Y const&>::type, X); + BOOST_CHECK_TYPE3(tt::common_type<X const&, Y const&>::type, X); +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/common_type_fail.cpp b/src/boost/libs/type_traits/test/common_type_fail.cpp new file mode 100644 index 000000000..2b522526b --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_fail.cpp @@ -0,0 +1,27 @@ +// common_type_test.cpp ----------------------------------------------------// + +// Copyright 2010 Beman Dawes + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#define _CRT_SECURE_NO_WARNINGS // disable VC++ foolishness + +#include "test.hpp" +#ifndef TEST_STD +#include <boost/type_traits/common_type.hpp> +#else +#include <type_traits> +#endif + +struct C1 { + //~ private: + //~ C1(); +}; + +struct C2 {}; + + + +typedef tt::common_type<C1, C2>::type AC; + diff --git a/src/boost/libs/type_traits/test/common_type_sfinae2_test.cpp b/src/boost/libs/type_traits/test/common_type_sfinae2_test.cpp new file mode 100644 index 000000000..8cc9730b6 --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_sfinae2_test.cpp @@ -0,0 +1,39 @@ + +// Copyright Peter Dimov 2015 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +# include <boost/type_traits/integral_constant.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <iostream> + +typedef char(&s1)[1]; +typedef char(&s2)[2]; + +template<class T> s1 has_type_impl( typename T::type * ); +template<class T> s2 has_type_impl( ... ); + +template<class T> struct has_type: tt::integral_constant<bool, sizeof(has_type_impl<T>(0)) == sizeof(s1)> {}; + +struct X {}; +struct Y {}; + +TT_TEST_BEGIN(common_type_sfinae2) +{ +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + + BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type<int, void*> >::value), false ); + BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type<X, Y> >::value), false ); + BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type<X&, int const*> >::value), false ); + BOOST_CHECK_INTEGRAL_CONSTANT( (has_type< tt::common_type<X, Y, int, void*> >::value), false ); + +#endif +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/common_type_sfinae_test.cpp b/src/boost/libs/type_traits/test/common_type_sfinae_test.cpp new file mode 100644 index 000000000..a88be83b2 --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_sfinae_test.cpp @@ -0,0 +1,45 @@ + +// Copyright Peter Dimov 2015 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +struct X {}; +struct Y {}; + +TT_TEST_BEGIN(common_type_sfinae) +{ +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + + { + tt::common_type<int, void*> tmp; + (void)tmp; + } + + { + tt::common_type<X, Y> tmp; + (void)tmp; + } + + { + tt::common_type<X&, int const*> tmp; + (void)tmp; + } + + { + tt::common_type<X, Y, int, void*> tmp; + (void)tmp; + } + +#endif +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/common_type_test.cpp b/src/boost/libs/type_traits/test/common_type_test.cpp new file mode 100644 index 000000000..a01d1baa7 --- /dev/null +++ b/src/boost/libs/type_traits/test/common_type_test.cpp @@ -0,0 +1,221 @@ +// common_type_test.cpp ----------------------------------------------------// + +// Copyright 2010 Beman Dawes + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/common_type.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +#ifdef BOOST_INTEL +#pragma warning(disable: 304 383) +#endif + +struct C1 {}; + +struct C2 {}; + + +struct C3 : C2 {}; +struct C1C2 { + C1C2() {} + C1C2(C1 const&) {} + C1C2(C2 const&) {} + C1C2& operator=(C1C2 const&) { + return *this; + } +}; + +template <typename C, typename A> +void proc2(typename boost::common_type<A, C>::type const& ) {} + +template <typename C, typename A, typename B> +void proc3(typename boost::common_type<C, A, B>::type const& ) {} + +template <typename C, typename A> +void assignation_2() { +typedef typename boost::common_type<A, C>::type AC; + A a; + C c; + AC ac; + ac=a; + ac=c; + + proc2<C, A>(a); + proc2<C, A>(c); + +} + +template <typename C, typename A, typename B> +void assignation_3() { +typedef typename boost::common_type<C, A, B>::type ABC; + A a; + B b; + C c; + ABC abc; + + abc=a; + abc=b; + abc=c; + + proc3<C, A, B>(a); + proc3<C, A, B>(b); + proc3<C, A, B>(c); +} + +C1C2 c1c2; +C1 c1; + +int f(C1C2 ) { return 1;} +int f(C1 ) { return 2;} +template <typename OSTREAM> +OSTREAM& operator<<(OSTREAM& os, C1 const&) {return os;} + +C1C2& declval_C1C2() {return c1c2;} +C1& declval_C1(){return c1;} +bool declval_bool(){return true;} + + +TT_TEST_BEGIN(common_type) +{ + assignation_2<C1C2, C1>(); + typedef tt::common_type<C1C2&, C1&>::type T1; + BOOST_CHECK_TYPE(T1, C1C2); + typedef tt::common_type<C3*, C2*>::type T2; + BOOST_CHECK_TYPE(T2, C2*); + typedef tt::common_type<int*, int const*>::type T3; + BOOST_CHECK_TYPE(T3, int const*); +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) + // fails if BOOST_COMMON_TYPE_DONT_USE_TYPEOF: + typedef tt::common_type<int volatile*, int const*>::type T4; + BOOST_CHECK_TYPE(T4, int const volatile*); +#endif + typedef tt::common_type<int*, int volatile*>::type T5; + BOOST_CHECK_TYPE(T5, int volatile*); + + assignation_2<C1, C1C2>(); + assignation_2<C1C2, C2>(); + assignation_2<C2, C1C2>(); + assignation_3<C1, C1C2, C2>(); + assignation_3<C1C2, C1, C2>(); + assignation_3<C2, C1C2, C1>(); + assignation_3<C1C2, C2, C1>(); + //assignation_3<C1, C2, C1C2>(); // fails because the common type is the third + + BOOST_CHECK_TYPE(tt::common_type<int>::type, int); + BOOST_CHECK_TYPE(tt::common_type<char>::type, char); + + BOOST_CHECK_TYPE3(tt::common_type<char, char>::type, char); + BOOST_CHECK_TYPE3(tt::common_type<char, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<char, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<char, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<char, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<char, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, unsigned char>::type, unsigned char); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<unsigned char, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<short, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, short>::type, short); + BOOST_CHECK_TYPE3(tt::common_type<short, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<short, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<short, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<short, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<short, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, unsigned short>::type, unsigned short); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<unsigned short, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<int, char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, unsigned char>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, unsigned short>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<int, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<int, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<int, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<int, double>::type, double); + + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, char>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, unsigned char>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, short>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, unsigned short>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, int>::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, unsigned int>::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, boost::ulong_long_type>::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type<unsigned int, double>::type, double); + +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, char>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, unsigned char>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, short>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, unsigned short>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, int>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, unsigned int>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, boost::long_long_type>::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, boost::ulong_long_type>::type, boost::ulong_long_type); + BOOST_CHECK_TYPE3(tt::common_type<boost::long_long_type, double>::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type<double, char>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, unsigned char>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, short>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, unsigned short>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, int>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, unsigned int>::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type<double, boost::long_long_type>::type, double); + BOOST_CHECK_TYPE3(tt::common_type<double, boost::ulong_long_type>::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type<double, double>::type, double); + + BOOST_CHECK_TYPE4(tt::common_type<double, char, int>::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE4(tt::common_type<unsigned, char, boost::long_long_type>::type, boost::long_long_type); +#endif + + //changes related to defect LWG2141 + BOOST_CHECK_TYPE(tt::common_type<int&>::type, int); + BOOST_CHECK_TYPE(tt::common_type<const int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<const int, const int>::type, int); + BOOST_CHECK_TYPE3(tt::common_type<const int, const long>::type, long); +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/compile_fail/common_type2_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/common_type2_fail.cpp new file mode 100644 index 000000000..a4b3db476 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/common_type2_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/common_type.hpp> +#include "../test.hpp" + +int main() +{ + return sizeof(boost::common_type<int, incomplete_type>::type); +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/common_type_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/common_type_fail.cpp new file mode 100644 index 000000000..75948114a --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/common_type_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/common_type.hpp> +#include "../test.hpp" + +int main() +{ + return sizeof(boost::common_type<incomplete_type, int>::type); +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/has_nothrow_assign_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_assign_fail.cpp new file mode 100644 index 000000000..3196d3af3 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_assign_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/has_nothrow_assign.hpp> +#include "../test.hpp" + +int main() +{ + return boost::has_nothrow_assign<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/has_nothrow_cons_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_cons_fail.cpp new file mode 100644 index 000000000..8512e5d7c --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_cons_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/has_nothrow_constructor.hpp> +#include "../test.hpp" + +int main() +{ + return boost::has_nothrow_constructor<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/has_nothrow_copy_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_copy_fail.cpp new file mode 100644 index 000000000..997a48ae1 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_copy_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/has_nothrow_copy.hpp> +#include "../test.hpp" + +int main() +{ + return boost::has_nothrow_copy<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/has_nothrow_destruct_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_destruct_fail.cpp new file mode 100644 index 000000000..1b0d5a0c0 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/has_nothrow_destruct_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/has_nothrow_destructor.hpp> +#include "../test.hpp" + +int main() +{ + return boost::has_nothrow_destructor<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_assignable_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_assignable_fail.cpp new file mode 100644 index 000000000..2ea6ac2cb --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_assignable_fail.cpp @@ -0,0 +1,19 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_assignable.hpp> +#include "../test.hpp" + +#ifndef BOOST_TT_HAS_WORKING_IS_COMPLETE +#error "Sorry can't test this." +#endif + +int main() +{ + return boost::is_assignable<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_base_of_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_base_of_fail.cpp new file mode 100644 index 000000000..cff40b20d --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_base_of_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_base_of.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_base_of<UDT, incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_constructible_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_constructible_fail.cpp new file mode 100644 index 000000000..926b43c3a --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_constructible_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_constructible.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_constructible<incomplete_type, int>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_convertible2_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_convertible2_fail.cpp new file mode 100644 index 000000000..8a4a0517e --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_convertible2_fail.cpp @@ -0,0 +1,19 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_convertible.hpp> +#include "../test.hpp" + +#ifndef BOOST_TT_HAS_WORKING_IS_COMPLETE +#error "Sorry can't test this." +#endif + +int main() +{ + return boost::is_convertible<incomplete_type, UDT>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_convertible_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_convertible_fail.cpp new file mode 100644 index 000000000..792c442a7 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_convertible_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_convertible.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_convertible<UDT, incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_copy_assignable_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_copy_assignable_fail.cpp new file mode 100644 index 000000000..f8c512e04 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_copy_assignable_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_copy_assignable.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_copy_assignable<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_copy_constructible_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_copy_constructible_fail.cpp new file mode 100644 index 000000000..8ab35da04 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_copy_constructible_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_copy_constructible.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_copy_constructible<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_default_constructible_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_default_constructible_fail.cpp new file mode 100644 index 000000000..78381b35f --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_default_constructible_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_default_constructible.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_default_constructible<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_destructible_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_destructible_fail.cpp new file mode 100644 index 000000000..33dea9b48 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_destructible_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_destructible.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_destructible<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_empty_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_empty_fail.cpp new file mode 100644 index 000000000..ef3d17194 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_empty_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_empty.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_empty<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_list_constructible_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_list_constructible_fail.cpp new file mode 100644 index 000000000..eb69bd1c9 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_list_constructible_fail.cpp @@ -0,0 +1,19 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_list_constructible.hpp> +#include "../test.hpp" + +#ifndef BOOST_TT_HAS_WORKING_IS_COMPLETE +#error "Sorry can't test this." +#endif + +int main() +{ + return boost::is_list_constructible<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_nothrow_move_assignable_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_nothrow_move_assignable_fail.cpp new file mode 100644 index 000000000..5cb5f54e6 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_nothrow_move_assignable_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_nothrow_move_assignable.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_nothrow_move_assignable<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_nothrow_move_constructible_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_nothrow_move_constructible_fail.cpp new file mode 100644 index 000000000..54d132948 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_nothrow_move_constructible_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_nothrow_move_constructible.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_nothrow_move_constructible<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_polymorphic_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_polymorphic_fail.cpp new file mode 100644 index 000000000..d18251992 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_polymorphic_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_polymorphic.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_polymorphic<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_stateless_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_stateless_fail.cpp new file mode 100644 index 000000000..2a8b4aa06 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_stateless_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_stateless.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_stateless<incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/compile_fail/is_virtual_base_of_fail.cpp b/src/boost/libs/type_traits/test/compile_fail/is_virtual_base_of_fail.cpp new file mode 100644 index 000000000..a8ca79ee1 --- /dev/null +++ b/src/boost/libs/type_traits/test/compile_fail/is_virtual_base_of_fail.cpp @@ -0,0 +1,15 @@ + +// (C) Copyright John Maddock 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# include <boost/type_traits/is_virtual_base_of.hpp> +#include "../test.hpp" + +int main() +{ + return boost::is_virtual_base_of<UDT, incomplete_type>::value; +} + + diff --git a/src/boost/libs/type_traits/test/conditional_test.cpp b/src/boost/libs/type_traits/test/conditional_test.cpp new file mode 100644 index 000000000..3afc398d8 --- /dev/null +++ b/src/boost/libs/type_traits/test/conditional_test.cpp @@ -0,0 +1,31 @@ + +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/conditional.hpp> +#endif +#include <boost/type_traits/is_same.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(conditional) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<true, int, long>::type, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<false, int, long>::type, long>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<true, int, long>::type, long>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<false, int, long>::type, int>::value), false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/copy_cv_ref_test.cpp b/src/boost/libs/type_traits/test/copy_cv_ref_test.cpp new file mode 100644 index 000000000..974b6fd8d --- /dev/null +++ b/src/boost/libs/type_traits/test/copy_cv_ref_test.cpp @@ -0,0 +1,186 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/copy_cv_ref.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +TT_TEST_BEGIN(copy_cv_ref) + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, char>::type, int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, const char>::type, const int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, volatile char>::type, volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, const volatile char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, const char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, volatile char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, const volatile char&>::type, const volatile int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, char>::type, const int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, const char>::type, const int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, volatile char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, const volatile char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, const char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, volatile char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, const volatile char&>::type, const volatile int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, char>::type, volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, const char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, volatile char>::type, volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, const volatile char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, const char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, volatile char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, const volatile char&>::type, const volatile int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, const char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, volatile char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, const volatile char>::type, const volatile int); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, const char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, volatile char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, const volatile char&>::type, const volatile int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, char>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, const char>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, volatile char>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, const volatile char>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, const char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, volatile char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, const volatile char&>::type, int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, char>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, const char>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, volatile char>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, const volatile char>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, const char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, volatile char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, const volatile char&>::type, const int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, char>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, const char>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, volatile char>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, const volatile char>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, const char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, volatile char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, const volatile char&>::type, volatile int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, char>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, const char>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, volatile char>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, const volatile char>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, const char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, volatile char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, const volatile char&>::type, const volatile int&); + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, char&&>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, const char&&>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, volatile char&&>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int, const volatile char&&>::type, const volatile int&&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, char&&>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, const char&&>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, volatile char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int, const volatile char&&>::type, const volatile int&&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, char&&>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, const char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, volatile char&&>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int, const volatile char&&>::type, const volatile int&&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, const char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, volatile char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int, const volatile char&&>::type, const volatile int&&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, char&&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, const char&&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, volatile char&&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&, const volatile char&&>::type, int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, char&&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, const char&&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, volatile char&&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&, const volatile char&&>::type, const int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, char&&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, const char&&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, volatile char&&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&, const volatile char&&>::type, volatile int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, char&&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, const char&&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, volatile char&&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&, const volatile char&&>::type, const volatile int&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, char>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, const char>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, volatile char>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, const volatile char>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, const char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, volatile char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, const volatile char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, char&&>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, const char&&>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, volatile char&&>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<int&&, const volatile char&&>::type, int&&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, char>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, const char>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, volatile char>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, const volatile char>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, const char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, volatile char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, const volatile char&>::type, const int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, char&&>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, const char&&>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, volatile char&&>::type, const int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const int&&, const volatile char&&>::type, const int&&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, char>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, const char>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, volatile char>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, const volatile char>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, const char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, volatile char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, const volatile char&>::type, volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, char&&>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, const char&&>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, volatile char&&>::type, volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<volatile int&&, const volatile char&&>::type, volatile int&&); + +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, char>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, const char>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, volatile char>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, const volatile char>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, const char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, volatile char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, const volatile char&>::type, const volatile int&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, const char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, volatile char&&>::type, const volatile int&&); +BOOST_CHECK_TYPE3(::tt::copy_cv_ref<const volatile int&&, const volatile char&&>::type, const volatile int&&); +#endif + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/copy_cv_test.cpp b/src/boost/libs/type_traits/test/copy_cv_test.cpp new file mode 100644 index 000000000..6c5ec3e60 --- /dev/null +++ b/src/boost/libs/type_traits/test/copy_cv_test.cpp @@ -0,0 +1,44 @@ + +// Copyright Peter Dimov 2015 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/copy_cv.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +TT_TEST_BEGIN(copy_cv) +{ + BOOST_CHECK_TYPE3(tt::copy_cv<int, void>::type, int); + BOOST_CHECK_TYPE3(tt::copy_cv<int const, void>::type, int const); + BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void>::type, int volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void>::type, int const volatile); + + BOOST_CHECK_TYPE3(tt::copy_cv<int, void const>::type, int const); + BOOST_CHECK_TYPE3(tt::copy_cv<int const, void const>::type, int const); + BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void const>::type, int const volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void const>::type, int const volatile); + + BOOST_CHECK_TYPE3(tt::copy_cv<int, void volatile>::type, int volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int const, void volatile>::type, int const volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void volatile>::type, int volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void volatile>::type, int const volatile); + + BOOST_CHECK_TYPE3(tt::copy_cv<int, void const volatile>::type, int const volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int const, void const volatile>::type, int const volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void const volatile>::type, int const volatile); + BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void const volatile>::type, int const volatile); + + BOOST_CHECK_TYPE3(tt::copy_cv<int&, void const volatile>::type, int&); + + BOOST_CHECK_TYPE3(tt::copy_cv<int const*, void volatile>::type, int const* volatile); + + BOOST_CHECK_TYPE3(tt::copy_cv<long, int const volatile&>::type, long); +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/copy_reference_test.cpp b/src/boost/libs/type_traits/test/copy_reference_test.cpp new file mode 100644 index 000000000..e30428873 --- /dev/null +++ b/src/boost/libs/type_traits/test/copy_reference_test.cpp @@ -0,0 +1,33 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/copy_reference.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +TT_TEST_BEGIN(copy_reference) + +BOOST_CHECK_TYPE3(::tt::copy_reference<int, char>::type, int); +BOOST_CHECK_TYPE3(::tt::copy_reference<int, char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_reference<int&, char>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_reference<int&, char&>::type, int&); + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +BOOST_CHECK_TYPE3(::tt::copy_reference<int, char&&>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_reference<int&, char&&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_reference<int&&, char>::type, int&&); +BOOST_CHECK_TYPE3(::tt::copy_reference<int&&, char&>::type, int&); +BOOST_CHECK_TYPE3(::tt::copy_reference<int&&, char&&>::type, int&&); +#endif + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/cxx14_aliases_test.cpp b/src/boost/libs/type_traits/test/cxx14_aliases_test.cpp new file mode 100644 index 000000000..415939841 --- /dev/null +++ b/src/boost/libs/type_traits/test/cxx14_aliases_test.cpp @@ -0,0 +1,46 @@ + +// Copyright Peter Dimov 2017 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include <iostream> + +TT_TEST_BEGIN(cxx14_aliases_test) +{ +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + + BOOST_CHECK_TYPE(tt::add_const_t<int>, int const); + BOOST_CHECK_TYPE(tt::add_cv_t<int>, int const volatile); + BOOST_CHECK_TYPE(tt::add_lvalue_reference_t<int>, int&); + BOOST_CHECK_TYPE(tt::add_pointer_t<int>, int*); + BOOST_CHECK_TYPE(tt::add_rvalue_reference_t<int>, int&&); + BOOST_CHECK_TYPE(tt::add_volatile_t<int>, int volatile); + BOOST_CHECK_TYPE3(tt::common_type_t<char, short>, int); + BOOST_CHECK_TYPE4(tt::conditional_t<true, char, short>, char); + BOOST_CHECK_TYPE4(tt::conditional_t<false, char, short>, short); + BOOST_CHECK_TYPE3(tt::copy_cv_t<char, short const volatile>, char const volatile); + BOOST_CHECK_TYPE(tt::decay_t<char const(&)[7]>, char const*); + BOOST_CHECK_TYPE(tt::make_signed_t<unsigned char>, signed char); + BOOST_CHECK_TYPE(tt::make_unsigned_t<signed char>, unsigned char); + BOOST_CHECK_TYPE(tt::remove_all_extents_t<int[][10][20]>, int); + BOOST_CHECK_TYPE(tt::remove_const_t<int const>, int); + BOOST_CHECK_TYPE(tt::remove_cv_t<int const volatile>, int); + BOOST_CHECK_TYPE(tt::remove_extent_t<int[]>, int); + BOOST_CHECK_TYPE(tt::remove_pointer_t<int*>, int); + BOOST_CHECK_TYPE(tt::remove_reference_t<int&>, int); + BOOST_CHECK_TYPE(tt::remove_volatile_t<int volatile>, int); + BOOST_CHECK_TYPE(tt::floating_point_promotion_t<float>, double); + BOOST_CHECK_TYPE(tt::integral_promotion_t<char>, int); + BOOST_CHECK_TYPE(tt::promote_t<char>, int); + +#endif +} +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/decay_test.cpp b/src/boost/libs/type_traits/test/decay_test.cpp new file mode 100644 index 000000000..71c11ec9e --- /dev/null +++ b/src/boost/libs/type_traits/test/decay_test.cpp @@ -0,0 +1,163 @@ + +// (C) Copyright John Maddock & Thorsten Ottosen 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/decay.hpp> +# include <boost/type_traits/is_same.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include "check_integral_constant.hpp" +#include <iostream> +#include <string> +#include <utility> + +#ifdef BOOST_INTEL +// remark #383: value copied to temporary, reference to temporary used +// std::pair<std::string, int> p2 = boost::make_pair( "foo", 1 ); +// ^ +#pragma warning(disable:383) +#endif + +namespace boost +{ + + int proc1() + { + return 0; + } + int proc2(int c) + { + return c; + } + + // + // An almost optimal version of std::make_pair() + // + template< class F, class S > + inline std::pair< BOOST_DEDUCED_TYPENAME tt::decay<const F>::type, + BOOST_DEDUCED_TYPENAME tt::decay<const S>::type > + make_pair( const F& f, const S& s ) + { + return std::pair< BOOST_DEDUCED_TYPENAME tt::decay<const F>::type, + BOOST_DEDUCED_TYPENAME tt::decay<const S>::type >( f, s ); + } + + /* + This overload will mess up vc7.1 + + template< class F, class S > + inline std::pair< BOOST_DEDUCED_TYPENAME ::tt::decay<F>::type, + BOOST_DEDUCED_TYPENAME ::tt::decay<S>::type > + make_pair( F& f, S& s ) + { + return std::pair< BOOST_DEDUCED_TYPENAME ::tt::decay<F>::type, + BOOST_DEDUCED_TYPENAME ::tt::decay<S>::type >( f, s ); + } + */ +} + +BOOST_DECL_TRANSFORM_TEST3(decay_test_1, ::tt::decay, const) +BOOST_DECL_TRANSFORM_TEST3(decay_test_2, ::tt::decay, volatile) +BOOST_DECL_TRANSFORM_TEST3(decay_test_3, ::tt::decay, const volatile) +BOOST_DECL_TRANSFORM_TEST3(decay_test_4, ::tt::decay, const&) +BOOST_DECL_TRANSFORM_TEST3(decay_test_5, ::tt::decay, volatile&) +BOOST_DECL_TRANSFORM_TEST3(decay_test_6, ::tt::decay, const volatile&) +BOOST_DECL_TRANSFORM_TEST(decay_test_7, ::tt::decay, const*, const*) +BOOST_DECL_TRANSFORM_TEST(decay_test_8, ::tt::decay, [], *) +BOOST_DECL_TRANSFORM_TEST(decay_test_9, ::tt::decay, [2], *) +BOOST_DECL_TRANSFORM_TEST(decay_test_10, ::tt::decay, [2][3], (*)[3]) +BOOST_DECL_TRANSFORM_TEST(decay_test_11, ::tt::decay, const[], const*) +BOOST_DECL_TRANSFORM_TEST(decay_test_12, ::tt::decay, const[2], const*) +BOOST_DECL_TRANSFORM_TEST(decay_test_13, ::tt::decay, const[2][3], const(*)[3]) +BOOST_DECL_TRANSFORM_TEST(decay_test_14, ::tt::decay, (int), (*)(int)) + + +TT_TEST_BEGIN(decay) + + decay_test_1(); + decay_test_2(); + decay_test_3(); + decay_test_4(); + decay_test_5(); + decay_test_6(); + decay_test_7(); + decay_test_8(); + decay_test_9(); + decay_test_10(); + decay_test_11(); + decay_test_12(); + decay_test_13(); + decay_test_14(); + + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<int>::type,int>::value), + true ); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<char[2]>::type,char*>::value), + true ); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<char[2][3]>::type,char(*)[3]>::value), + true ); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<const char[2]>::type,const char*>::value), + true ); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<wchar_t[2]>::type,wchar_t*>::value), + true ); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<const wchar_t[2]>::type,const wchar_t*>::value), + true ); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<const wchar_t[2]>::type,const wchar_t*>::value), + true ); + + typedef int f1_type(void); + typedef int f2_type(int); + + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<f1_type>::type,int (*)(void)>::value), + true ); + BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< + ::tt::decay<f2_type>::type,int (*)(int)>::value), + true ); + +#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS + // + // Don't test this if the std lib has no templated constructors (Oracle+STLPort): + // + std::pair<std::string,std::string> p = boost::make_pair( "foo", "bar" ); + std::pair<std::string, int> p2 = boost::make_pair( "foo", 1 ); +#ifndef BOOST_NO_STD_WSTRING + std::pair<std::wstring,std::string> p3 = boost::make_pair( L"foo", "bar" ); + std::pair<std::wstring, int> p4 = boost::make_pair( L"foo", 1 ); +#endif +#endif + // + // Todo: make these work sometime. The test id not directly + // related to decay<T>::type and can be avoided for now. + // + /* + int array[10]; + std::pair<int*,int*> p5 = boost::make_pair( array, array ); +#ifndef __BORLANDC__ + std::pair<int(*)(void), int(*)(int)> p6 = boost::make_pair(boost::proc1, boost::proc2); + p6.first(); + p6.second(1); +#endif + */ + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/detected_or_test.cpp b/src/boost/libs/type_traits/test/detected_or_test.cpp new file mode 100644 index 000000000..e4d1d4dfd --- /dev/null +++ b/src/boost/libs/type_traits/test/detected_or_test.cpp @@ -0,0 +1,50 @@ +/* +Copyright 2017 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#include <boost/config.hpp> +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/detected_or.hpp> +#endif +#include "check_integral_constant.hpp" +#include "check_type.hpp" + +#define CHECK_FALSE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, false) +#define CHECK_TRUE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, true) + +template<class T> +using type_t = typename T::type; + +struct has_type { + using type = char; +}; + +struct no_type { }; + +TT_TEST_BEGIN(detected_or) + +CHECK_FALSE((::tt::detected_or<bool, type_t, int>::value_t::value)); +CHECK_TRUE((::tt::detected_or<bool, type_t, has_type>::value_t::value)); +CHECK_FALSE((::tt::detected_or<bool, type_t, no_type>::value_t::value)); +BOOST_CHECK_TYPE4(::tt::detected_or<bool, type_t, int>::type, bool); +BOOST_CHECK_TYPE4(::tt::detected_or<bool, type_t, has_type>::type, char); +BOOST_CHECK_TYPE4(::tt::detected_or<bool, type_t, no_type>::type, bool); +BOOST_CHECK_TYPE4(::tt::detected_or_t<bool, type_t, int>, bool); +BOOST_CHECK_TYPE4(::tt::detected_or_t<bool, type_t, has_type>, char); +BOOST_CHECK_TYPE4(::tt::detected_or_t<bool, type_t, no_type>, bool); + +TT_TEST_END +#else +int main() +{ + return 0; +} +#endif diff --git a/src/boost/libs/type_traits/test/detected_test.cpp b/src/boost/libs/type_traits/test/detected_test.cpp new file mode 100644 index 000000000..4ffcd3d85 --- /dev/null +++ b/src/boost/libs/type_traits/test/detected_test.cpp @@ -0,0 +1,44 @@ +/* +Copyright 2017 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#include <boost/config.hpp> +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/detected.hpp> +#endif +#include "check_integral_constant.hpp" +#include "check_type.hpp" + +#define CHECK_FALSE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, false) +#define CHECK_TRUE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, true) + +template<class T> +using type_t = typename T::type; + +struct has_type { + using type = char; +}; + +struct no_type { }; + +TT_TEST_BEGIN(detected) + +BOOST_CHECK_TYPE3(::tt::detected_t<type_t, int>, boost::nonesuch); +BOOST_CHECK_TYPE3(::tt::detected_t<type_t, has_type>, char); +BOOST_CHECK_TYPE3(::tt::detected_t<type_t, no_type>, boost::nonesuch); + +TT_TEST_END +#else +int main() +{ + return 0; +} +#endif diff --git a/src/boost/libs/type_traits/test/enable_if_test.cpp b/src/boost/libs/type_traits/test/enable_if_test.cpp new file mode 100644 index 000000000..f3a30a0c6 --- /dev/null +++ b/src/boost/libs/type_traits/test/enable_if_test.cpp @@ -0,0 +1,92 @@ +/* +Copyright 2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#include <boost/type_traits/enable_if.hpp> +#include "test.hpp" + +template<bool B> +struct Constant { + enum { + value = B + }; +}; + +template<class T> +struct Check + : Constant<false> { }; + +template<> +struct Check<long> + : Constant<true> { }; + +class Construct { +public: + template<class T> + Construct(T, typename boost::enable_if_<Check<T>::value>::type* = 0) + : value_(true) { } + template<class T> + Construct(T, typename boost::enable_if_<!Check<T>::value>::type* = 0) + : value_(false) { } + bool value() const { + return value_; + } +private: + bool value_; +}; + +template<class T, class E = void> +struct Specialize; + +template<class T> +struct Specialize<T, typename boost::enable_if_<Check<T>::value>::type> + : Constant<true> { }; + +template<class T> +struct Specialize<T, typename boost::enable_if_<!Check<T>::value>::type> + : Constant<false> { }; + +template<class T> +typename boost::enable_if_<Check<T>::value, bool>::type Returns(T) +{ + return true; +} + +template<class T> +typename boost::enable_if_<!Check<T>::value, bool>::type Returns(T) +{ + return false; +} + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template<class T> +boost::enable_if_t<Check<T>::value, bool> Alias(T) +{ + return true; +} + +template<class T> +boost::enable_if_t<!Check<T>::value, bool> Alias(T) +{ + return false; +} +#endif + +TT_TEST_BEGIN(enable_if) + +BOOST_CHECK(!Construct(1).value()); +BOOST_CHECK(Construct(1L).value()); +BOOST_CHECK(!Specialize<int>::value); +BOOST_CHECK(Specialize<long>::value); +BOOST_CHECK(!Returns(1)); +BOOST_CHECK(Returns(1L)); +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +BOOST_CHECK(!Alias(1)); +BOOST_CHECK(Alias(1L)); +#endif + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/extent_test.cpp b/src/boost/libs/type_traits/test/extent_test.cpp new file mode 100644 index 000000000..d8f4d7c6a --- /dev/null +++ b/src/boost/libs/type_traits/test/extent_test.cpp @@ -0,0 +1,49 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/extent.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(extent) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int[]>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int[][10]>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int[5][10]>::value, 5); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int[5][10][40]>::value, 5); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int (&)[5][10]>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int (*)[5][10]>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int,1>::value), 0); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int[],1>::value), 0); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int[][10],1>::value), 10); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int[5][10],1>::value), 10); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int[5][10][40],1>::value), 10); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int (&)[5][10],1>::value), 0); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int (*)[5][10],1>::value), 0); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int[5][10],2>::value), 0); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int[5][10][40],2>::value), 40); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent<int[5][10][40],3>::value), 0); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int*>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int&>::value, 0); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int&&>::value, 0); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/floating_point_promotion_test.cpp b/src/boost/libs/type_traits/test/floating_point_promotion_test.cpp new file mode 100644 index 000000000..15e03a20a --- /dev/null +++ b/src/boost/libs/type_traits/test/floating_point_promotion_test.cpp @@ -0,0 +1,38 @@ + +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/floating_point_promotion.hpp> +#endif +#include <boost/type_traits/is_same.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(floating_point_promotion) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<void>::type, void>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<void const>::type, void const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<void volatile>::type, void volatile>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<void const volatile>::type, void const volatile>::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float>::type, double>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float const>::type, double const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float volatile>::type, double volatile>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float const volatile>::type, double const volatile>::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<double>::type, double>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<double const>::type, double const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<double volatile>::type, double volatile>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<double const volatile>::type, double const volatile>::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float&>::type, float&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float const&>::type, float const&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float volatile&>::type, float volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::floating_point_promotion<float const volatile&>::type, float const volatile&>::value), true); + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/function_traits_test.cpp b/src/boost/libs/type_traits/test/function_traits_test.cpp new file mode 100644 index 000000000..01f712a52 --- /dev/null +++ b/src/boost/libs/type_traits/test/function_traits_test.cpp @@ -0,0 +1,68 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/function_traits.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include "check_integral_constant.hpp" + +typedef void(pf_zero1)(); +typedef int(pf_zero2)(); +typedef const int& (pf_zero3)(); +typedef void(pf_one1)(int); +typedef int(pf_one2)(int); +typedef const int&(pf_one3)(const int&); +typedef void(pf_two1)(int,int); +typedef int(pf_two2)(int,int); +typedef const int&(pf_two3)(const int&,const int&); + + +TT_TEST_BEGIN(function_traits) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_zero1>::arity, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_zero2>::arity, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_zero3>::arity, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_one1>::arity, 1); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_one2>::arity, 1); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_one3>::arity, 1); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_two1>::arity, 2); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_two2>::arity, 2); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits<pf_two3>::arity, 2); + +BOOST_CHECK_TYPE(void, ::tt::function_traits<pf_zero1>::result_type); +BOOST_CHECK_TYPE(::tt::function_traits<pf_zero2>::result_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_zero3>::result_type, const int&); +BOOST_CHECK_TYPE(::tt::function_traits<pf_one1>::result_type, void); +BOOST_CHECK_TYPE(::tt::function_traits<pf_one2>::result_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_one3>::result_type, const int&); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two1>::result_type, void); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two2>::result_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two3>::result_type, const int&); + +BOOST_CHECK_TYPE(::tt::function_traits<pf_one1>::arg1_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_one2>::arg1_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_one3>::arg1_type, const int&); + +BOOST_CHECK_TYPE(::tt::function_traits<pf_two1>::arg1_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two2>::arg1_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two3>::arg1_type, const int&); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two1>::arg2_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two2>::arg2_type, int); +BOOST_CHECK_TYPE(::tt::function_traits<pf_two3>::arg2_type, const int&); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/has_binary_classes.hpp b/src/boost/libs/type_traits/test/has_binary_classes.hpp new file mode 100644 index 000000000..1ecf60de5 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes.hpp @@ -0,0 +1,252 @@ +// (C) Copyright Frederic Bron 2009-2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef TT_HAS_BINARY_CLASSES_HPP +#define TT_HAS_BINARY_CLASSES_HPP + +struct ret { }; +ret ret_val; + +class C000 { C000(); public: C000(int) { } }; +void operator+(C000, C000) { } + +class C001 { C001(); public: C001(int) { } }; +ret operator+(C001, C001) { return ret_val; } + +class C002 { C002(); public: C002(int) { } }; +ret const operator+(C002, C002) { return ret_val; } + +class C005 { C005(); public: C005(int) { } }; +ret & operator+(C005, C005) { return ret_val; } + +class C006 { C006(); public: C006(int) { } }; +ret const & operator+(C006, C006) { return ret_val; } + +class C009 { C009(); public: C009(int) { } }; +void operator+(C009, C009 const) { } + +class C010 { C010(); public: C010(int) { } }; +ret operator+(C010, C010 const) { return ret_val; } + +class C011 { C011(); public: C011(int) { } }; +ret const operator+(C011, C011 const) { return ret_val; } + +class C014 { C014(); public: C014(int) { } }; +ret & operator+(C014, C014 const) { return ret_val; } + +class C015 { C015(); public: C015(int) { } }; +ret const & operator+(C015, C015 const) { return ret_val; } + +class C036 { C036(); public: C036(int) { } }; +void operator+(C036, C036 &) { } + +class C037 { C037(); public: C037(int) { } }; +ret operator+(C037, C037 &) { return ret_val; } + +class C038 { C038(); public: C038(int) { } }; +ret const operator+(C038, C038 &) { return ret_val; } + +class C041 { C041(); public: C041(int) { } }; +ret & operator+(C041, C041 &) { return ret_val; } + +class C042 { C042(); public: C042(int) { } }; +ret const & operator+(C042, C042 &) { return ret_val; } + +class C045 { C045(); public: C045(int) { } }; +void operator+(C045, C045 const &) { } + +class C046 { C046(); public: C046(int) { } }; +ret operator+(C046, C046 const &) { return ret_val; } + +class C047 { C047(); public: C047(int) { } }; +ret const operator+(C047, C047 const &) { return ret_val; } + +class C050 { C050(); public: C050(int) { } }; +ret & operator+(C050, C050 const &) { return ret_val; } + +class C051 { C051(); public: C051(int) { } }; +ret const & operator+(C051, C051 const &) { return ret_val; } + +class C072 { C072(); public: C072(int) { } }; +void operator+(C072 const, C072) { } + +class C073 { C073(); public: C073(int) { } }; +ret operator+(C073 const, C073) { return ret_val; } + +class C074 { C074(); public: C074(int) { } }; +ret const operator+(C074 const, C074) { return ret_val; } + +class C077 { C077(); public: C077(int) { } }; +ret & operator+(C077 const, C077) { return ret_val; } + +class C078 { C078(); public: C078(int) { } }; +ret const & operator+(C078 const, C078) { return ret_val; } + +class C081 { C081(); public: C081(int) { } }; +void operator+(C081 const, C081 const) { } + +class C082 { C082(); public: C082(int) { } }; +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 C086 { C086(); public: C086(int) { } }; +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 C108 { C108(); public: C108(int) { } }; +void operator+(C108 const, C108 &) { } + +class C109 { C109(); public: C109(int) { } }; +ret operator+(C109 const, C109 &) { return ret_val; } + +class C110 { C110(); public: C110(int) { } }; +ret const operator+(C110 const, C110 &) { return ret_val; } + +class C113 { C113(); public: C113(int) { } }; +ret & operator+(C113 const, C113 &) { return ret_val; } + +class C114 { C114(); public: C114(int) { } }; +ret const & operator+(C114 const, C114 &) { return ret_val; } + +class C117 { C117(); public: C117(int) { } }; +void operator+(C117 const, C117 const &) { } + +class C118 { C118(); public: C118(int) { } }; +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 C122 { C122(); public: C122(int) { } }; +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 C288 { C288(); public: C288(int) { } }; +void operator+(C288 &, C288) { } + +class C289 { C289(); public: C289(int) { } }; +ret operator+(C289 &, C289) { return ret_val; } + +class C290 { C290(); public: C290(int) { } }; +ret const operator+(C290 &, C290) { return ret_val; } + +class C293 { C293(); public: C293(int) { } }; +ret & operator+(C293 &, C293) { return ret_val; } + +class C294 { C294(); public: C294(int) { } }; +ret const & operator+(C294 &, C294) { return ret_val; } + +class C297 { C297(); public: C297(int) { } }; +void operator+(C297 &, C297 const) { } + +class C298 { C298(); public: C298(int) { } }; +ret operator+(C298 &, C298 const) { return ret_val; } + +class C299 { C299(); public: C299(int) { } }; +ret const operator+(C299 &, C299 const) { return ret_val; } + +class C302 { C302(); public: C302(int) { } }; +ret & operator+(C302 &, C302 const) { return ret_val; } + +class C303 { C303(); public: C303(int) { } }; +ret const & operator+(C303 &, C303 const) { return ret_val; } + +class C324 { C324(); public: C324(int) { } }; +void operator+(C324 &, C324 &) { } + +class C325 { C325(); public: C325(int) { } }; +ret operator+(C325 &, C325 &) { return ret_val; } + +class C326 { C326(); public: C326(int) { } }; +ret const operator+(C326 &, C326 &) { return ret_val; } + +class C329 { C329(); public: C329(int) { } }; +ret & operator+(C329 &, C329 &) { return ret_val; } + +class C330 { C330(); public: C330(int) { } }; +ret const & operator+(C330 &, C330 &) { return ret_val; } + +class C333 { C333(); public: C333(int) { } }; +void operator+(C333 &, C333 const &) { } + +class C334 { C334(); public: C334(int) { } }; +ret operator+(C334 &, C334 const &) { return ret_val; } + +class C335 { C335(); public: C335(int) { } }; +ret const operator+(C335 &, C335 const &) { return ret_val; } + +class C338 { C338(); public: C338(int) { } }; +ret & operator+(C338 &, C338 const &) { return ret_val; } + +class C339 { C339(); public: C339(int) { } }; +ret const & operator+(C339 &, C339 const &) { return ret_val; } + +class C360 { C360(); public: C360(int) { } }; +void operator+(C360 const &, C360) { } + +class C361 { C361(); public: C361(int) { } }; +ret operator+(C361 const &, C361) { return ret_val; } + +class C362 { C362(); public: C362(int) { } }; +ret const operator+(C362 const &, C362) { return ret_val; } + +class C365 { C365(); public: C365(int) { } }; +ret & operator+(C365 const &, C365) { return ret_val; } + +class C366 { C366(); public: C366(int) { } }; +ret const & operator+(C366 const &, C366) { return ret_val; } + +class C369 { C369(); public: C369(int) { } }; +void operator+(C369 const &, C369 const) { } + +class C370 { C370(); public: C370(int) { } }; +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 C374 { C374(); public: C374(int) { } }; +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 C396 { C396(); public: C396(int) { } }; +void operator+(C396 const &, C396 &) { } + +class C397 { C397(); public: C397(int) { } }; +ret operator+(C397 const &, C397 &) { return ret_val; } + +class C398 { C398(); public: C398(int) { } }; +ret const operator+(C398 const &, C398 &) { return ret_val; } + +class C401 { C401(); public: C401(int) { } }; +ret & operator+(C401 const &, C401 &) { return ret_val; } + +class C402 { C402(); public: C402(int) { } }; +ret const & operator+(C402 const &, C402 &) { return ret_val; } + +class C405 { C405(); public: C405(int) { } }; +void operator+(C405 const &, C405 const &) { } + +class C406 { C406(); public: C406(int) { } }; +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 C410 { C410(); public: C410(int) { } }; +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; } + +#endif diff --git a/src/boost/libs/type_traits/test/has_binary_classes0_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes0_test.cpp new file mode 100644 index 000000000..a77a34b49 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes0_test.cpp @@ -0,0 +1,263 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000, C000, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000, C000 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000, C000 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000, C000 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000, C000 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const, C000, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const, C000 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const, C000 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const, C000 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const, C000 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 &, C000, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 &, C000, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 &, C000, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 &, C000 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 &, C000 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 &, C000 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const &, C000, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const &, C000 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const &, C000 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const &, C000 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C000 const &, C000 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001, C001, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001, C001 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001, C001 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001, C001 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const, C001 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const, C001 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const, C001 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const, C001 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const, C001 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 &, C001 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C001 const &, C001 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002, C002 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const, C002, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const, C002 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const, C002 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const, C002 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const, C002 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const, C002 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 &, C002 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C002 const &, C002 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005, C005 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const, C005, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const, C005, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const, C005 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const, C005 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const, C005 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const, C005 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 &, C005 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C005 const &, C005 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006, C006, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006, C006 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006, C006 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const, C006 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 &, C006, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 &, C006, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 &, C006, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 &, C006 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 &, C006 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 &, C006 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 &, C006 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const &, C006, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const &, C006 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const &, C006 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const &, C006 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const &, C006 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C006 const &, C006 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009, C009, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009, C009, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009, C009 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009, C009 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009, C009 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009, C009 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009, C009 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const, C009, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const, C009 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const, C009 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const, C009 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const, C009 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const, C009 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const, C009 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 &, C009 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C009 const &, C009 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010, C010 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const, C010, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const, C010, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const, C010, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const, C010, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const, C010 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const, C010 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const, C010 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 &, C010, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 &, C010, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 &, C010 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 &, C010 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 &, C010 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const &, C010, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const &, C010, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const &, C010 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const &, C010 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const &, C010 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const &, C010 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C010 const &, C010 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011, C011 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const, C011 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 &, C011 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C011 const &, C011 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014, ret const >::value), 1); + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes1_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes1_test.cpp new file mode 100644 index 000000000..636e62268 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes1_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 &, C014 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const &, C014 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015, C015, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015, C015, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015, C015 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015, C015 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015, C015 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const, C015, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const, C015, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const, C015 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const, C015 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const, C015 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const, C015 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const, C015 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 &, C015, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 &, C015, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 &, C015 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 &, C015 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 &, C015 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const &, C015, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const &, C015 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const &, C015 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const &, C015 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C015 const &, C015 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036, C036, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036, C036 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036, C036 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036, C036 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036, C036 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036, C036 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036, C036 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const, C036, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const, C036, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const, C036 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const, C036 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const, C036 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const, C036 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 &, C036 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C036 const &, C036 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037, C037 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const, C037 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 &, C037 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const &, C037, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const &, C037, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const &, C037 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const &, C037 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const &, C037 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C037 const &, C037 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038, C038 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const, C038 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 &, C038, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 &, C038, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 &, C038 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 &, C038 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 &, C038 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 &, C038 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 &, C038 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const &, C038, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const &, C038, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const &, C038, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C038 const &, C038 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041, C041, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041, C041 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041, C041 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041, C041 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041, C041 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041, C041 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041, C041 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const, C041, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const, C041 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const, C041 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const, C041 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const, C041 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const, C041 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const, C041 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 &, C041 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 &, C041 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 &, C041 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 &, C041 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 &, C041 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C041 const &, C041 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042, C042 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const, C042, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const, C042, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const, C042, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const, C042 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const, C042 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const, C042 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const, C042 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 &, C042, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 &, C042 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 &, C042 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 &, C042 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 &, C042 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 &, C042 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C042 const &, C042 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045, C045 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045, C045 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045, C045 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const, C045 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 &, C045 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const &, C045 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const &, C045 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const &, C045 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const &, C045 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C045 const &, C045 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046, C046 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046, C046 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046, C046 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const, C046, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const, C046 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const, C046 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const, C046 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const, C046 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const, C046 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const, C046 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 &, C046 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 &, C046 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 &, C046 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 &, C046 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 &, C046 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 &, ret const >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes2_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes2_test.cpp new file mode 100644 index 000000000..ed681fd91 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes2_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C046 const &, C046 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047, C047, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047, C047, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047, C047, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047, C047 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047, C047 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047, C047 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047, C047 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const, C047 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 &, C047 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const &, C047, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const &, C047 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const &, C047 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const &, C047 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const &, C047 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const &, C047 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C047 const &, C047 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050, C050, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050, C050 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050, C050 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050, C050 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050, C050 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050, C050 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050, C050 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const, C050, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const, C050, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const, C050, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const, C050 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const, C050 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const, C050 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const, C050 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 &, C050 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C050 const &, C050 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051, C051 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const, C051, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const, C051 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const, C051 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const, C051 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const, C051 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const, C051 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 &, C051, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 &, C051 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 &, C051 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 &, C051 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 &, C051 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 &, C051 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const &, C051, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const &, C051, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const &, C051 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const &, C051 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const &, C051 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C051 const &, C051 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072, C072 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const, C072, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const, C072, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const, C072, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const, C072 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const, C072 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const, C072 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const, C072 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 &, C072 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C072 const &, C072 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073, C073 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const, C073, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const, C073 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const, C073 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const, C073 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const, C073 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 &, C073, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 &, C073, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 &, C073, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 &, C073 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 &, C073 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C073 const &, C073 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074, C074 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const, C074, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const, C074, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const, C074 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const, C074 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const, C074 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const, C074 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const, C074 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 &, C074 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C074 const &, C074 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077, C077 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const, C077 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 &, C077, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 &, C077 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 &, C077 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 &, C077 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C077 const &, C077 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078, C078 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const, C078, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const, C078, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const, C078, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const, C078 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const, C078 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const, C078 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const, C078 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 const, void >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes3_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes3_test.cpp new file mode 100644 index 000000000..50134544c --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes3_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 &, C078 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C078 const &, C078 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081, C081 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const, C081 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 &, C081 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const &, C081 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const &, C081 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const &, C081 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const &, C081 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C081 const &, C081 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082, C082, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082, C082, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082, C082, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082, C082 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082, C082 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082, C082 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082, C082 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const, C082 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 &, C082 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C082 const &, C082 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083, C083, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083, C083, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083, C083 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083, C083 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083, C083 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083, C083 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083, C083 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const, C083 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 &, C083, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 &, C083, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 &, C083, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 &, C083 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 &, C083 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 &, C083 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C083 const &, C083 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086, C086 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const, C086 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 &, C086, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 &, C086 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 &, C086 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 &, C086 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 &, C086 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 &, C086 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C086 const &, C086 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087, C087, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087, C087, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087, C087, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087, C087 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087, C087 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087, C087 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087, C087 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const, C087, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const, C087, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const, C087 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const, C087 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 &, C087, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 &, C087, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 &, C087, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 &, C087 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 &, C087 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 &, C087 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const &, C087, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const &, C087, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const &, C087, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const &, C087 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const &, C087 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C087 const &, C087 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108, C108 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const, C108 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 &, C108 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const &, C108, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const &, C108 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const &, C108 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const &, C108 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C108 const &, C108 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109, C109, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109, C109 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109, C109 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109, C109 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109, C109 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109, C109 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109, C109 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const, C109 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 &, C109, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 &, C109 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 &, C109 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 &, C109 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 &, C109 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 &, C109 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 &, C109 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C109 const &, C109 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110, C110, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110, C110, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110, C110, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110, C110 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110, C110 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110, C110 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110, ret >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes4_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes4_test.cpp new file mode 100644 index 000000000..49c6c5440 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes4_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const, C110 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 &, C110, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 &, C110, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 &, C110 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 &, C110 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 &, C110 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 &, C110 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C110 const &, C110 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113, C113 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const, C113 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 &, C113, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 &, C113, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 &, C113 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 &, C113 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 &, C113 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 &, C113 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 &, C113 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C113 const &, C113 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114, C114 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const, C114 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 &, C114, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 &, C114 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 &, C114 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 &, C114 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const &, C114, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const &, C114, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const &, C114 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const &, C114 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const &, C114 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C114 const &, C114 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117, C117, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117, C117, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117, C117 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117, C117 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117, C117 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117, C117 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const, C117, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const, C117, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const, C117 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const, C117 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const, C117 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const, C117 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const, C117 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 &, C117, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 &, C117 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 &, C117 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 &, C117 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 &, C117 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 &, C117 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C117 const &, C117 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118, C118 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const, C118, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const, C118 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const, C118 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const, C118 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const, C118 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const, C118 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 &, C118 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C118 const &, C118 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119, C119 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const, C119, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const, C119 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const, C119 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const, C119 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const, C119 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const, C119 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 &, C119 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C119 const &, C119 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122, C122, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122, C122 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122, C122 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122, C122 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const, C122 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 &, C122 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 &, C122 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 &, C122 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C122 const &, C122 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123, C123, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123, C123, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123, C123 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123, C123 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123, C123 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const, C123 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const, C123 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const, C123 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const, C123 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const, C123 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const, C123 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const, C123 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 &, C123, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 &, C123 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 &, C123 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 &, C123 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 &, C123 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const &, C123, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const &, C123, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const &, C123 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const &, C123 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const &, C123 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const &, C123 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C123 const &, C123 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288, C288 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const, C288, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const, C288, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const, C288 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const, C288 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const, C288 &, ret const >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes5_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes5_test.cpp new file mode 100644 index 000000000..016988808 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes5_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const, C288 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const, C288 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 &, C288 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const &, C288, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const &, C288, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const &, C288, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const &, C288 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const &, C288 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const &, C288 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C288 const &, C288 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289, C289, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289, C289 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289, C289 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289, C289 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const, C289 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 &, C289 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const &, C289, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const &, C289 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const &, C289 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C289 const &, C289 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290, C290, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290, C290, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290, C290 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290, C290 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290, C290 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290, C290 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const, C290, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const, C290, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const, C290 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const, C290 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const, C290 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const, C290 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const, C290 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 &, C290, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 &, C290, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 &, C290, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 &, C290 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 &, C290 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 &, C290 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 &, C290 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C290 const &, C290 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293, C293 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const, C293, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const, C293 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const, C293 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const, C293 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const, C293 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const, C293 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const, C293 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 &, C293 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const &, C293 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const &, C293 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const &, C293 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const &, C293 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const &, C293 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const &, C293 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C293 const &, C293 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294, C294 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const, C294 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 &, C294 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C294 const &, C294 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297, C297, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297, C297, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297, C297, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297, C297 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297, C297 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297, C297 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297, C297 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const, C297 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 &, C297 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const &, C297, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const &, C297, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const &, C297 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const &, C297 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const &, C297 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C297 const &, C297 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298, C298 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const, C298, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const, C298, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const, C298 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const, C298 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const, C298 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 &, C298, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 &, C298, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 &, C298 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 &, C298 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 &, C298 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C298 const &, C298 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299, C299, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299, C299, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299, C299 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299, C299 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299, C299 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299, C299 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299, C299 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const, C299 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const, C299 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const, C299 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const, C299 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 &, C299, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 &, C299 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 &, C299 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 &, C299 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 &, C299 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 &, C299 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C299 const &, C299 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302, C302 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302, ret const >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes6_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes6_test.cpp new file mode 100644 index 000000000..d09aa684e --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes6_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const, C302 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 &, C302, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 &, C302 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 &, C302 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 &, C302 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 &, C302 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C302 const &, C302 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303, C303 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const, C303 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 &, C303 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C303 const &, C303 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324, C324 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const, C324 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 &, C324 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C324 const &, C324 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325, C325, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325, C325 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325, C325 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325, C325 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const, C325 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 &, C325, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 &, C325 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 &, C325 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 &, C325 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 &, C325 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const &, C325, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const &, C325, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const &, C325, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const &, C325 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const &, C325 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const &, C325 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C325 const &, C325 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326, C326, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326, C326, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326, C326 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326, C326 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326, C326 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326, C326 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326, C326 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const, C326 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 &, C326 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const &, C326, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const &, C326 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const &, C326 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const &, C326 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C326 const &, C326 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329, C329 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const, C329, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const, C329, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const, C329 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const, C329 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const, C329 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const, C329 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 &, C329 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const &, C329 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const &, C329 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C329 const &, C329 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330, C330 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const, C330, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const, C330, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const, C330 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const, C330 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const, C330 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const, C330 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 &, C330 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const &, C330 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const &, C330 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C330 const &, C330 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333, C333 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const, C333 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const, C333 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const, C333 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const, C333 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const, C333 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const, C333 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 &, C333, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 &, C333, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 &, C333, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 &, C333 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 &, C333 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 &, C333 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 &, C333 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C333 const &, C333 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334, C334 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const, C334, ret const >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes7_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes7_test.cpp new file mode 100644 index 000000000..1792b7455 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes7_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const, C334 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const, C334 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const, C334 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const, C334 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const, C334 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 &, C334 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C334 const &, C334 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335, C335, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335, C335 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335, C335 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335, C335 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335, C335 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const, C335 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 &, C335 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C335 const &, C335 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338, C338, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338, C338, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338, C338, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338, C338 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338, C338 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338, C338 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338, C338 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const, C338 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 &, C338, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 &, C338 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 &, C338 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 &, C338 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 &, C338 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 &, C338 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const &, C338, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const &, C338 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const &, C338 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const &, C338 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const &, C338 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const &, C338 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C338 const &, C338 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339, C339, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339, C339 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339, C339 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339, C339 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339, C339 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339, C339 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339, C339 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const, C339 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 &, C339 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C339 const &, C339 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360, C360, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360, C360 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360, C360 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360, C360 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360, C360 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const, C360, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const, C360 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const, C360 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const, C360 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 &, C360 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const &, C360, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const &, C360, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const &, C360 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const &, C360 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const &, C360 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const &, C360 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C360 const &, C360 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361, C361, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361, C361, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361, C361 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361, C361 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361, C361 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361, C361 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const, C361 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 &, C361 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C361 const &, C361 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362, C362 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const, C362 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 &, C362 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 &, C362 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 &, C362 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 &, C362 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 &, C362 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 &, C362 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C362 const &, C362 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365, C365, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365, C365, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365, C365 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365, C365 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365, C365 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365, C365 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const, C365 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 &, C365, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 &, C365, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 &, C365, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 &, C365 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 &, C365 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 &, C365 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 &, C365 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const &, C365 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const &, C365 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const &, C365 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C365 const &, C365 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366, C366, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366, C366, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366, C366, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366, C366 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366, C366 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366, C366 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366, C366 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366, ret const & >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes8_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes8_test.cpp new file mode 100644 index 000000000..30d85cadc --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes8_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const, C366 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 &, C366 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C366 const &, C366 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369, C369 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const, C369, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const, C369 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const, C369 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const, C369 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const, C369 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const, C369 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const, C369 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 &, C369, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 &, C369, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 &, C369, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 &, C369 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 &, C369 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 &, C369 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 &, C369 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C369 const &, C369 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370, C370 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const, C370 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const, C370 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const, C370 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const, C370 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const, C370 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const, C370 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 &, C370 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C370 const &, C370 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371, C371 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const, C371 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const, C371 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const, C371 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 &, C371 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C371 const &, C371 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374, C374 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const, C374 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 &, C374, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 &, C374 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 &, C374 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 &, C374 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 &, C374 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 &, C374 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 &, C374 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const &, C374, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const &, C374, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const &, C374 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C374 const &, C374 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375, C375 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const, C375 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 &, C375 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const &, C375, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const &, C375 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const &, C375 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const &, C375 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const &, C375 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C375 const &, C375 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396, C396 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const, C396 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 &, C396 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const &, C396, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const &, C396, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const &, C396, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const &, C396 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C396 const &, C396 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397, C397, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397, C397 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397, C397 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397, C397 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397, C397 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397, C397 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const, C397 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 &, C397 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397 const, ret const & >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_classes9_test.cpp b/src/boost/libs/type_traits/test/has_binary_classes9_test.cpp new file mode 100644 index 000000000..420bda196 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_classes9_test.cpp @@ -0,0 +1,262 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_binary_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C397 const &, C397 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398, C398 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const, C398, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const, C398, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const, C398 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const, C398 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const, C398 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const, C398 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 &, C398 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const &, C398, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const &, C398, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const &, C398 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const &, C398 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const &, C398 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const &, C398 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C398 const &, C398 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401, C401 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401, C401 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401, C401 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401, C401 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401, C401 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401, C401 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const, C401 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 &, C401, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 &, C401, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 &, C401 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 &, C401 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 &, C401 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const &, C401, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const &, C401, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const &, C401 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C401 const &, C401 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402, C402, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402, C402 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402, C402 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402, C402 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402, C402 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402, C402 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402, C402 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const, C402 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 &, C402 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const &, C402, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const &, C402, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const &, C402 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const &, C402 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const &, C402 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C402 const &, C402 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405, C405, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405, C405, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405, C405 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405, C405 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405, C405 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405, C405 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const, C405 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 &, C405 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C405 const &, C405 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406, C406, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406, C406, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406, C406 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406, C406 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406, C406 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406, C406 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const, C406, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const, C406, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const, C406 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const, C406 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const, C406 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const, C406 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const, C406 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 &, C406, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 &, C406, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 &, C406 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 &, C406 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 &, C406 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 &, C406 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const &, C406, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const &, C406 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C406 const &, C406 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407, C407 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const, C407 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 &, C407 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C407 const &, C407 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410, C410, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410, C410 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410, C410 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410, C410 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410, C410 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410, C410 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const, C410 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 &, C410, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 &, C410 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 &, C410 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 &, C410 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 &, C410 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 &, C410 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const &, C410, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const &, C410, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const &, C410 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const &, C410 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const &, C410 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const &, C410 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C410 const &, C410 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411, C411, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411, C411 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411, C411 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411, C411 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const, C411 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 &, C411 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C411 const &, C411 const &, ret & >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_binary_operators.hpp b/src/boost/libs/type_traits/test/has_binary_operators.hpp new file mode 100644 index 000000000..8eb6c7b1b --- /dev/null +++ b/src/boost/libs/type_traits/test/has_binary_operators.hpp @@ -0,0 +1,179 @@ +// (C) Copyright Frederic Bron 2009-2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// It would be nice to get rid of the unnamed namespace here, +// but for now we just turn off inspection reporting :( +// boostinspect:nounnamed + +#ifndef TT_HAS_BINARY_OPERATORS_HPP +#define TT_HAS_BINARY_OPERATORS_HPP + +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" +#endif + + +// test with one template parameter +#define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE>::value), RESULT) +// test with one template parameter plus return value +#define TEST_TR(TYPE,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE,TYPE,RET>::value), RESULT) +// test with two template parameters +#define TEST_TT(TYPE1,TYPE2,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE1,TYPE2>::value), RESULT) +// test with two template parameters plus return value +#define TEST_TTR(TYPE1,TYPE2,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE1,TYPE2,RET>::value), RESULT) + +namespace { + +struct without { }; + +struct ret { }; + +struct internal { ret operator BOOST_TT_TRAIT_OP (const internal&) const; }; + +struct external { }; +inline ret operator BOOST_TT_TRAIT_OP (const external&, const external&) { return ret(); } + +struct comma1_ret { }; +struct ret_with_comma1 { comma1_ret operator,(int); }; + +struct internal_comma1 { 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(); } + +struct ret_with_comma2 { void operator,(int); }; + +struct internal_comma2 { 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(); } + +struct returns_int { int operator BOOST_TT_TRAIT_OP (const returns_int&); }; + +struct returns_void { void operator BOOST_TT_TRAIT_OP (const returns_void&); }; + +struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (const returns_void_star&); }; + +struct returns_double { double operator BOOST_TT_TRAIT_OP (const returns_double&); }; + +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&); }; + +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&); }; + +class Base1 { }; +class Derived1 : public Base1 { }; + +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 +}; + +bool operator BOOST_TT_TRAIT_OP (const Derived2&, const Derived2&) { return true; } + +struct tag { }; + +struct A { }; +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; } + +struct private_op { private: 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(); } }; + +//class internal_private { ret operator BOOST_TT_TRAIT_OP (const internal_private&) const; }; + +void common() { + TEST_T(void, false); + TEST_TT(void, void, false); + TEST_TTR(void, void, void, false); + TEST_TTR(void, void, int, false); + + TEST_T(without, false); + TEST_T(internal, true); + TEST_T(external, true); + TEST_T(internal_comma1, true); + TEST_T(external_comma1, true); + TEST_T(internal_comma2, true); + TEST_T(external_comma2, true); + TEST_T(returns_int, true); + TEST_T(returns_void, true); + TEST_T(returns_void_star, true); + TEST_T(returns_double, true); + TEST_T(returns_convertible_to_ret1, true); + TEST_T(returns_convertible_to_ret2, true); + TEST_T(Base1, true); + TEST_T(Derived1, true); + TEST_T(Base2, false); + TEST_T(Derived2, true); + + TEST_TR(without, void, false); + TEST_TR(without, bool, false); + TEST_TR(internal, void, false); + TEST_TR(internal, bool, false); + TEST_TR(internal, ret, true); + TEST_TR(internal_comma1, void, false); + TEST_TR(internal_comma1, bool, false); + TEST_TR(internal_comma1, ret_with_comma1, true); + TEST_TR(internal_comma2, void, false); + TEST_TR(internal_comma2, bool, false); + TEST_TR(internal_comma2, ret_with_comma2, true); + TEST_TR(external, void, false); + TEST_TR(external, bool, false); + TEST_TR(external, ret, true); + TEST_TR(returns_int, void, false); + TEST_TR(returns_int, bool, true); + TEST_TR(returns_int, int, true); + TEST_TR(returns_void, void, true); + TEST_TR(returns_void, bool, false); + TEST_TR(returns_void_star, bool, true); + TEST_TR(returns_double, void, false); + TEST_TR(returns_double, bool, true); + TEST_TR(returns_double, double, true); + TEST_TR(returns_convertible_to_ret1, void, false); + TEST_TR(returns_convertible_to_ret1, ret1, true); + TEST_TR(returns_convertible_to_ret2, ret2, true); + TEST_TR(Base1, bool, true); + TEST_TR(Derived1, bool, true); + TEST_TR(Base2, bool, false); + TEST_TR(Derived2, bool, true); +// compile time error +// TEST_T(internal_private, false); +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) +// There are some things that pass that wouldn't otherwise do so: +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1910) + TEST_TR(private_op, bool, false); + TEST_T(private_op, false); +#endif + TEST_TR(ambiguous_A, bool, true); + TEST_T(ambiguous_A, true); + TEST_TR(ambiguous_B, bool, true); + TEST_T(ambiguous_B, true); +#endif +} + +} + +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic pop +#endif + +#endif + diff --git a/src/boost/libs/type_traits/test/has_bit_and_assign_test.cpp b/src/boost/libs/type_traits/test/has_bit_and_assign_test.cpp new file mode 100644 index 000000000..13e2ee2b1 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_bit_and_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_bit_and_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_bit_and_assign +#define BOOST_TT_TRAIT_OP &= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_bit_and_test.cpp b/src/boost/libs/type_traits/test/has_bit_and_test.cpp new file mode 100644 index 000000000..7daac172c --- /dev/null +++ b/src/boost/libs/type_traits/test/has_bit_and_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_bit_and.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_bit_and +#define BOOST_TT_TRAIT_OP & + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_bit_or_assign_test.cpp b/src/boost/libs/type_traits/test/has_bit_or_assign_test.cpp new file mode 100644 index 000000000..c1baaa056 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_bit_or_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_bit_or_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_bit_or_assign +#define BOOST_TT_TRAIT_OP |= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_bit_or_test.cpp b/src/boost/libs/type_traits/test/has_bit_or_test.cpp new file mode 100644 index 000000000..2c50a6895 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_bit_or_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_bit_or.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_bit_or +#define BOOST_TT_TRAIT_OP | + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_bit_xor_assign_test.cpp b/src/boost/libs/type_traits/test/has_bit_xor_assign_test.cpp new file mode 100644 index 000000000..cfedbfcef --- /dev/null +++ b/src/boost/libs/type_traits/test/has_bit_xor_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_bit_xor_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_bit_xor_assign +#define BOOST_TT_TRAIT_OP ^= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_bit_xor_test.cpp b/src/boost/libs/type_traits/test/has_bit_xor_test.cpp new file mode 100644 index 000000000..6df2296e1 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_bit_xor_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_bit_xor.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_bit_xor +#define BOOST_TT_TRAIT_OP ^ + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_complement_test.cpp b/src/boost/libs/type_traits/test/has_complement_test.cpp new file mode 100644 index 000000000..d1b92544c --- /dev/null +++ b/src/boost/libs/type_traits/test/has_complement_test.cpp @@ -0,0 +1,247 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if defined(__GNUC__) && (__GNUC__ >= 7) +#pragma GCC diagnostic ignored "-Wbool-operation" +#endif + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_complement.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_complement +#define BOOST_TT_TRAIT_OP ~ + + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0); + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0); +#endif +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_dereference_test.cpp b/src/boost/libs/type_traits/test/has_dereference_test.cpp new file mode 100644 index 000000000..21aaa05a4 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_dereference_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_dereference.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_dereference +#define BOOST_TT_TRAIT_OP * + + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::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, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::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 const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool*, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool*, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool*, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double*, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double* const &, int const >::value), 1); + 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 const & >::value), 1); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_divides_assign_test.cpp b/src/boost/libs/type_traits/test/has_divides_assign_test.cpp new file mode 100644 index 000000000..9c8938bb1 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_divides_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_divides_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_divides_assign +#define BOOST_TT_TRAIT_OP /= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_divides_test.cpp b/src/boost/libs/type_traits/test/has_divides_test.cpp new file mode 100644 index 000000000..ca409c69a --- /dev/null +++ b/src/boost/libs/type_traits/test/has_divides_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_divides.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_divides +#define BOOST_TT_TRAIT_OP / + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::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* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 0); + 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 const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_equal_to_test.cpp b/src/boost/libs/type_traits/test/has_equal_to_test.cpp new file mode 100644 index 000000000..b3eb4c701 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_equal_to_test.cpp @@ -0,0 +1,249 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_equal_to.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_equal_to +#define BOOST_TT_TRAIT_OP == + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; +#ifndef BOOST_MSVC + TEST_TR(decltype(f), bool, true); + TEST_TR(decltype(f2), bool, true); +#else + TEST_TR(decltype(f), bool, false); + TEST_TR(decltype(f2), bool, false); +#endif + (void)f; + (void)f2; + +#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0); + (void)f; + (void)f2; +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_greater_equal_test.cpp b/src/boost/libs/type_traits/test/has_greater_equal_test.cpp new file mode 100644 index 000000000..501d98b9d --- /dev/null +++ b/src/boost/libs/type_traits/test/has_greater_equal_test.cpp @@ -0,0 +1,249 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_greater_equal.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_greater_equal +#define BOOST_TT_TRAIT_OP >= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; +#ifndef BOOST_MSVC + TEST_TR(decltype(f), bool, true); + TEST_TR(decltype(f2), bool, true); +#else + TEST_TR(decltype(f), bool, false); + TEST_TR(decltype(f2), bool, false); +#endif + (void)f; + (void)f2; + +#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0); + (void)f; + (void)f2; +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_greater_test.cpp b/src/boost/libs/type_traits/test/has_greater_test.cpp new file mode 100644 index 000000000..f2daef76d --- /dev/null +++ b/src/boost/libs/type_traits/test/has_greater_test.cpp @@ -0,0 +1,249 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_greater.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_greater +#define BOOST_TT_TRAIT_OP > + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; +#ifndef BOOST_MSVC + TEST_TR(decltype(f), bool, true); + TEST_TR(decltype(f2), bool, true); +#else + TEST_TR(decltype(f), bool, false); + TEST_TR(decltype(f2), bool, false); +#endif + (void)f; + (void)f2; + +#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0); + (void)f; + (void)f2; +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_left_shift_assign_test.cpp b/src/boost/libs/type_traits/test/has_left_shift_assign_test.cpp new file mode 100644 index 000000000..cdf2229e5 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_left_shift_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_left_shift_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_left_shift_assign +#define BOOST_TT_TRAIT_OP <<= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_left_shift_test.cpp b/src/boost/libs/type_traits/test/has_left_shift_test.cpp new file mode 100644 index 000000000..933976409 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_left_shift_test.cpp @@ -0,0 +1,253 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if defined(__GNUC__) && (__GNUC__ >= 7) +#pragma GCC diagnostic ignored "-Wint-in-bool-context" +#endif + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_left_shift.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_left_shift +#define BOOST_TT_TRAIT_OP << + +#include <ostream> +#include <string> + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, long, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, unsigned long, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, bool, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, short, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, unsigned short, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, int, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, unsigned int, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, double, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, float, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, void*, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, char, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, signed char, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, unsigned char, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, const char*, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, char*, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, const signed char*, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, signed char*, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, const unsigned char*, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, unsigned char*, std::ostream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, std::string, std::ostream& >::value), 1); +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_less_equal_test.cpp b/src/boost/libs/type_traits/test/has_less_equal_test.cpp new file mode 100644 index 000000000..c5214d2db --- /dev/null +++ b/src/boost/libs/type_traits/test/has_less_equal_test.cpp @@ -0,0 +1,249 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_less_equal.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_less_equal +#define BOOST_TT_TRAIT_OP <= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; +#ifndef BOOST_MSVC + TEST_TR(decltype(f), bool, true); + TEST_TR(decltype(f2), bool, true); +#else + TEST_TR(decltype(f), bool, false); + TEST_TR(decltype(f2), bool, false); +#endif + (void)f; + (void)f2; + +#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0); + (void)f; + (void)f2; +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_less_test.cpp b/src/boost/libs/type_traits/test/has_less_test.cpp new file mode 100644 index 000000000..40d316afd --- /dev/null +++ b/src/boost/libs/type_traits/test/has_less_test.cpp @@ -0,0 +1,249 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_less.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_less +#define BOOST_TT_TRAIT_OP < + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; +#ifndef BOOST_MSVC + TEST_TR(decltype(f), bool, true); + TEST_TR(decltype(f2), bool, true); +#else + TEST_TR(decltype(f), bool, false); + TEST_TR(decltype(f2), bool, false); +#endif + (void)f; + (void)f2; + +#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0); + (void)f; + (void)f2; +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_logical_and_test.cpp b/src/boost/libs/type_traits/test/has_logical_and_test.cpp new file mode 100644 index 000000000..310d2ed3c --- /dev/null +++ b/src/boost/libs/type_traits/test/has_logical_and_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_logical_and.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_logical_and +#define BOOST_TT_TRAIT_OP && + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_logical_not_test.cpp b/src/boost/libs/type_traits/test/has_logical_not_test.cpp new file mode 100644 index 000000000..a1f7543c6 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_logical_not_test.cpp @@ -0,0 +1,230 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_logical_not.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_logical_not +#define BOOST_TT_TRAIT_OP ! + +#include <iostream> + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int const >::value), 1); + 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 const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const >::value), 1); + 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 const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* >::value), 1); + 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), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* & >::value), 1); + 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), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 1); + + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::ostream, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, bool >::value), 1); +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_logical_or_test.cpp b/src/boost/libs/type_traits/test/has_logical_or_test.cpp new file mode 100644 index 000000000..a344889fb --- /dev/null +++ b/src/boost/libs/type_traits/test/has_logical_or_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_logical_or.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_logical_or +#define BOOST_TT_TRAIT_OP || + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_minus_assign_test.cpp b/src/boost/libs/type_traits/test/has_minus_assign_test.cpp new file mode 100644 index 000000000..4120ce900 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_minus_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_minus_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_minus_assign +#define BOOST_TT_TRAIT_OP -= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::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* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + 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 const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_minus_test.cpp b/src/boost/libs/type_traits/test/has_minus_test.cpp new file mode 100644 index 000000000..9b9722ef9 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_minus_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_minus.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_minus +#define BOOST_TT_TRAIT_OP - + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + 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 const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 1); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_modulus_assign_test.cpp b/src/boost/libs/type_traits/test/has_modulus_assign_test.cpp new file mode 100644 index 000000000..bd36c0aac --- /dev/null +++ b/src/boost/libs/type_traits/test/has_modulus_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_modulus_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_modulus_assign +#define BOOST_TT_TRAIT_OP %= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_modulus_test.cpp b/src/boost/libs/type_traits/test/has_modulus_test.cpp new file mode 100644 index 000000000..64706cb29 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_modulus_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_modulus.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_modulus +#define BOOST_TT_TRAIT_OP % + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::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< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::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* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 0); + 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 const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_multiplies_assign_test.cpp b/src/boost/libs/type_traits/test/has_multiplies_assign_test.cpp new file mode 100644 index 000000000..ded333dcb --- /dev/null +++ b/src/boost/libs/type_traits/test/has_multiplies_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_multiplies_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_multiplies_assign +#define BOOST_TT_TRAIT_OP *= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::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* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 0); + 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 const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_multiplies_test.cpp b/src/boost/libs/type_traits/test/has_multiplies_test.cpp new file mode 100644 index 000000000..7569b3fd4 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_multiplies_test.cpp @@ -0,0 +1,231 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if defined(__GNUC__) && (__GNUC__ >= 7) +#pragma GCC diagnostic ignored "-Wint-in-bool-context" +#endif + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_multiplies.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_multiplies +#define BOOST_TT_TRAIT_OP * + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::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* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 0); + 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 const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_negate_test.cpp b/src/boost/libs/type_traits/test/has_negate_test.cpp new file mode 100644 index 000000000..fc7be4ace --- /dev/null +++ b/src/boost/libs/type_traits/test/has_negate_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_negate.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_negate +#define BOOST_TT_TRAIT_OP - + + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int const >::value), 1); + 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 const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const >::value), 1); + 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 const & >::value), 1); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_not_equal_to_test.cpp b/src/boost/libs/type_traits/test/has_not_equal_to_test.cpp new file mode 100644 index 000000000..0b097cbd9 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_not_equal_to_test.cpp @@ -0,0 +1,249 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_not_equal_to.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_not_equal_to +#define BOOST_TT_TRAIT_OP != + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::value), 1); + 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, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 1); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; +#ifndef BOOST_MSVC + TEST_TR(decltype(f), bool, true); + TEST_TR(decltype(f2), bool, true); +#else + TEST_TR(decltype(f), bool, false); + TEST_TR(decltype(f2), bool, false); +#endif + (void)f; + (void)f2; + +#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_MSVC) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< decltype(f2)>::value), 0); + (void)f; + (void)f2; +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_nothrow_assign_test.cpp b/src/boost/libs/type_traits/test/has_nothrow_assign_test.cpp new file mode 100644 index 000000000..a1e8e1f64 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_nothrow_assign_test.cpp @@ -0,0 +1,238 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_nothrow_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct non_assignable +{ + non_assignable(); + non_assignable& operator=(const non_assignable&) = delete; +}; + +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +struct noexcept_assignable +{ + noexcept_assignable(); + noexcept_assignable& operator=(const noexcept_assignable&)noexcept; +}; + +#endif + +TT_TEST_BEGIN(has_nothrow_assign) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<bool>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<bool const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<signed char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<signed char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<short>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<short const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long const volatile>::value, false); +#endif + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::long_long_type>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::long_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int8>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int8 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int16>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int16 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int32>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int32 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int64>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<float>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<float const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<float const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<void*>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int*const>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<empty_POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<nothrow_assign_UDT>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<nothrow_copy_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<nothrow_construct_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<non_assignable>::value, false); +#endif +#ifndef BOOST_NO_CXX11_NOEXCEPT +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign<noexcept_assignable>::value, true); +#endif + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/has_nothrow_constr_test.cpp b/src/boost/libs/type_traits/test/has_nothrow_constr_test.cpp new file mode 100644 index 000000000..47c0b885e --- /dev/null +++ b/src/boost/libs/type_traits/test/has_nothrow_constr_test.cpp @@ -0,0 +1,223 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_nothrow_constructor.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +class bug11324_base +{ +public: + bug11324_base & operator=(const bug11324_base&){ throw int(); } + virtual ~bug11324_base() {} +}; + +class bug11324_derived : public bug11324_base +{ +public: + char data; + explicit bug11324_derived(char arg) : data(arg) {} +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct deleted_default_construct +{ + deleted_default_construct() = delete; + deleted_default_construct(char val) : member(val) {} + char member; +}; + +#endif + +struct private_default_construct +{ +private: + private_default_construct(); +public: + private_default_construct(char val) : member(val) {} + char member; +}; + +#ifndef BOOST_NO_CXX11_NOEXCEPT +struct noexcept_default_construct +{ + noexcept_default_construct()noexcept; + noexcept_default_construct(char val)noexcept : member(val) {} + char member; +}; +#endif + + +TT_TEST_BEGIN(has_nothrow_constructor) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<empty_POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<nothrow_construct_UDT>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<nothrow_assign_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<nothrow_copy_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bug11324_derived>::value, false); +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<deleted_default_construct>::value, false); +#endif +#if !defined(BOOST_GCC) || (BOOST_GCC >= 40800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<private_default_construct>::value, false); +#endif +#ifndef BOOST_NO_CXX11_NOEXCEPT +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<noexcept_default_construct>::value, true); +#endif + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/has_nothrow_copy_test.cpp b/src/boost/libs/type_traits/test/has_nothrow_copy_test.cpp new file mode 100644 index 000000000..52fa2fbe7 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_nothrow_copy_test.cpp @@ -0,0 +1,261 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_nothrow_copy.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +struct non_copy +{ + non_copy(); +private: + non_copy(const non_copy&); +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct delete_move +{ + delete_move(); + delete_move(const delete_move&&) = delete; +}; + +struct delete_copy +{ + delete_copy(); + delete_copy(const delete_copy&) = delete; +}; + +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +struct noexcept_copy +{ + noexcept_copy(); + noexcept_copy& operator=(const noexcept_copy&)noexcept; +}; + +#endif + +TT_TEST_BEGIN(has_nothrow_copy) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<bool const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<signed char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<short const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<short const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long const volatile>::value, false); +#endif + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::long_long_type const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int8 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int8 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int16 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int16 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int32 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int32 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int64 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<float const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<float const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<const int&>::value, false); +// These used to be true, but are now false to match std conforming behavior: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<empty_POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<nothrow_copy_UDT>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<nothrow_assign_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<nothrow_construct_UDT>::value, false); + +#if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_GCC, < 40700)) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<test_abc1>::value, false); +#endif + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<delete_copy>::value, false); +#if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_GCC, < 40600)) && !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_MSVC, == 1800))\ + && !(defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__CLR_VER)) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<delete_move>::value, false); +#endif +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<noexcept_copy>::value, true); +#endif + +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) +#if !defined(BOOST_GCC) || (BOOST_GCC >= 40800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<non_copy>::value, false); +#endif +#endif + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/has_nothrow_destructor_test.cpp b/src/boost/libs/type_traits/test/has_nothrow_destructor_test.cpp new file mode 100644 index 000000000..0f70435aa --- /dev/null +++ b/src/boost/libs/type_traits/test/has_nothrow_destructor_test.cpp @@ -0,0 +1,226 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_nothrow_destructor.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifdef BOOST_MSVC +#pragma warning(disable:4290) // exception spec ignored +#endif + +struct nothrow_destruct +{ + nothrow_destruct(int); + ~nothrow_destruct()throw(); +}; + +#if !defined(BOOST_NO_CXX11_NOEXCEPT) + +struct noexcept_destruct +{ + noexcept_destruct(int); + ~noexcept_destruct()noexcept; +}; + +struct throwing_base +{ + ~throwing_base() noexcept(false); +}; + +#else + +struct throwing_base +{ + ~throwing_base() throw(int); +}; + +#endif + +struct throwing_derived : public throwing_base {}; + +struct throwing_contained{ throwing_base data; }; + +TT_TEST_BEGIN(has_nothrow_destructor) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<enum_UDT>::value, true); + +// +// These are commented out for now because it's not clear what the semantics should be: +// on the one hand references always have trivial destructors (in the sense that there is +// nothing to destruct), on the other hand the thing referenced may not have a trivial +// destructor, it really depends upon the users code as to what should happen here: +// +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int&>::value, false); +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<const int&>::value, false); +// +// Destructors on UDT's are non-throwing by default, unless they are explicity marked otherwise: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<empty_UDT>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<trivial_except_destroy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<trivial_except_copy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<trivial_except_construct>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<trivial_except_assign>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<wrap<trivial_except_destroy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<wrap<trivial_except_copy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<wrap<trivial_except_construct> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<wrap<trivial_except_assign> >::value, true, false); + +#if !defined(BOOST_NO_CXX11_NOEXCEPT) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<noexcept_destruct>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<nothrow_destruct>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<throwing_base>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<throwing_derived>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_destructor<throwing_contained>::value, false); + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/has_operator_new_test.cpp b/src/boost/libs/type_traits/test/has_operator_new_test.cpp new file mode 100644 index 000000000..8b584c350 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_operator_new_test.cpp @@ -0,0 +1,213 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_new_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifdef BOOST_INTEL +// remark #1720: function "class_with_new_op::operator new" has no corresponding member operator delete (to be called if an exception is thrown during initialization of an allocated object) +// void * operator new(std::size_t); +// ^ +#pragma warning(disable:1720) +#endif + +#if defined(new) +# if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) +# define BOOST_TT_AUX_MACRO_NEW_DEFINED +# pragma push_macro("new") +# undef new +# else +# error "Sorry but you can't include this header if 'new' is defined as a macro." +# endif +#endif + + +struct class_with_new_op { + void * operator new(std::size_t); +}; + +struct derived_class_with_new_op : public class_with_new_op {}; + +struct class_with_new_op2 { + void* operator new(std::size_t size, const std::nothrow_t&); +}; + +struct class_with_new_op3 { + void* operator new[](std::size_t size); +}; + +struct class_with_new_op4 { + void* operator new[](std::size_t size, const std::nothrow_t&); +}; + +struct class_with_new_op5 { + void* operator new (std::size_t size, void* ptr); +}; + +struct class_with_new_op6 { + void* operator new[] (std::size_t size, void* ptr); +}; + +struct class_with_all_ops +{ + void * operator new(std::size_t); + void* operator new(std::size_t size, const std::nothrow_t&); + void* operator new[](std::size_t size); + void* operator new[](std::size_t size, const std::nothrow_t&); + void* operator new (std::size_t size, void* ptr); + void* operator new[] (std::size_t size, void* ptr); +}; + +TT_TEST_BEGIN(has_new_operator) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<derived_class_with_new_op>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op4>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op5>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op6>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_all_ops>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long const volatile>::value, false); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type const volatile>::value, false); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 const volatile>::value, false); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<void*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int*const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<f2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<f3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mf1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mf2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mf3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mp>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<cmf>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<enum_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<void>::value, false); + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_plus_assign_test.cpp b/src/boost/libs/type_traits/test/has_plus_assign_test.cpp new file mode 100644 index 000000000..488cefd68 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_plus_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_plus_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_plus_assign +#define BOOST_TT_TRAIT_OP += + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::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* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + 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 const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_plus_test.cpp b/src/boost/libs/type_traits/test/has_plus_test.cpp new file mode 100644 index 000000000..6804eb539 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_plus_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_plus.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_plus +#define BOOST_TT_TRAIT_OP + + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void, void >::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< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< 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< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, double const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const &, bool & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* &, bool & >::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< int, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int*, bool const >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool, bool & >::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 const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const, bool >::value), 0); + 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); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int*, int const >::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* const, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + 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 const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_post_decrement_test.cpp b/src/boost/libs/type_traits/test/has_post_decrement_test.cpp new file mode 100644 index 000000000..c0f144561 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_post_decrement_test.cpp @@ -0,0 +1,244 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_post_decrement.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_post_decrement +#define BOOST_TT_TRAIT_OP -- + + +#include "has_postfix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::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, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::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 &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0); + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0); +#endif +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_post_increment_test.cpp b/src/boost/libs/type_traits/test/has_post_increment_test.cpp new file mode 100644 index 000000000..28157b770 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_post_increment_test.cpp @@ -0,0 +1,244 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_post_increment.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_post_increment +#define BOOST_TT_TRAIT_OP ++ + + +#include "has_postfix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::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, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::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 &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0); + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0); +#endif +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_postfix_classes.hpp b/src/boost/libs/type_traits/test/has_postfix_classes.hpp new file mode 100644 index 000000000..b01f07d5f --- /dev/null +++ b/src/boost/libs/type_traits/test/has_postfix_classes.hpp @@ -0,0 +1,72 @@ +// (C) Copyright Frederic Bron 2009-2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef TT_HAS_POSTFIX_CLASSES_HPP +#define TT_HAS_POSTFIX_CLASSES_HPP + +struct ret { }; +ret ret_val; + +class C000 { C000(); public: C000(int) { } }; +void operator++(C000, int) { } + +class C001 { C001(); public: C001(int) { } }; +ret operator++(C001, int) { return ret_val; } + +class C002 { C002(); public: C002(int) { } }; +ret const operator++(C002, int) { return ret_val; } + +class C005 { C005(); public: C005(int) { } }; +ret & operator++(C005, int) { return ret_val; } + +class C006 { C006(); public: C006(int) { } }; +ret const & operator++(C006, int) { return ret_val; } + +class C009 { C009(); public: C009(int) { } }; +void operator++(C009 const, int) { } + +class C010 { C010(); public: C010(int) { } }; +ret operator++(C010 const, int) { return ret_val; } + +class C011 { C011(); public: C011(int) { } }; +ret const operator++(C011 const, int) { return ret_val; } + +class C014 { C014(); public: C014(int) { } }; +ret & operator++(C014 const, int) { return ret_val; } + +class C015 { C015(); public: C015(int) { } }; +ret const & operator++(C015 const, int) { return ret_val; } + +class C036 { C036(); public: C036(int) { } }; +void operator++(C036 &, int) { } + +class C037 { C037(); public: C037(int) { } }; +ret operator++(C037 &, int) { return ret_val; } + +class C038 { C038(); public: C038(int) { } }; +ret const operator++(C038 &, int) { return ret_val; } + +class C041 { C041(); public: C041(int) { } }; +ret & operator++(C041 &, int) { return ret_val; } + +class C042 { C042(); public: C042(int) { } }; +ret const & operator++(C042 &, int) { return ret_val; } + +class C045 { C045(); public: C045(int) { } }; +void operator++(C045 const &, int) { } + +class C046 { C046(); public: C046(int) { } }; +ret operator++(C046 const &, int) { return ret_val; } + +class C047 { C047(); public: C047(int) { } }; +ret const operator++(C047 const &, int) { return ret_val; } + +class C050 { C050(); public: C050(int) { } }; +ret & operator++(C050 const &, int) { return ret_val; } + +class C051 { C051(); public: C051(int) { } }; +ret const & operator++(C051 const &, int) { return ret_val; } + +#endif diff --git a/src/boost/libs/type_traits/test/has_postfix_classes0_test.cpp b/src/boost/libs/type_traits/test/has_postfix_classes0_test.cpp new file mode 100644 index 000000000..e529f527e --- /dev/null +++ b/src/boost/libs/type_traits/test/has_postfix_classes0_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_postfix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C000 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C001 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C002 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C005 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C006 const &, ret const & >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_postfix_classes1_test.cpp b/src/boost/libs/type_traits/test/has_postfix_classes1_test.cpp new file mode 100644 index 000000000..aafdd6529 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_postfix_classes1_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_postfix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C009 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C010 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C011 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C014 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C015 const &, ret const & >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_postfix_classes2_test.cpp b/src/boost/libs/type_traits/test/has_postfix_classes2_test.cpp new file mode 100644 index 000000000..8363b77db --- /dev/null +++ b/src/boost/libs/type_traits/test/has_postfix_classes2_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_postfix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C036 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C037 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C038 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C041 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C042 const &, ret const & >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_postfix_classes3_test.cpp b/src/boost/libs/type_traits/test/has_postfix_classes3_test.cpp new file mode 100644 index 000000000..6b58e4f8b --- /dev/null +++ b/src/boost/libs/type_traits/test/has_postfix_classes3_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_postfix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C045 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C046 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C047 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C050 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_post_increment< C051 const &, ret const & >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_postfix_operators.hpp b/src/boost/libs/type_traits/test/has_postfix_operators.hpp new file mode 100644 index 000000000..2bbcb9c6c --- /dev/null +++ b/src/boost/libs/type_traits/test/has_postfix_operators.hpp @@ -0,0 +1,136 @@ +// (C) Copyright Frederic Bron 2009-2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef TT_HAS_POSTFIX_OPERATORS_HPP +#define TT_HAS_POSTFIX_OPERATORS_HPP + +// It would be nice to get rid of the unnamed namespace here, +// but for now we just turn off inspection reporting :( +// boostinspect:nounnamed + +// test with one template parameter +#define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE>::value), RESULT) +// test with one template parameter plus return value +#define TEST_TR(TYPE,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE,RET>::value), RESULT) + +namespace { + +struct without { }; + +struct ret { }; + +struct internal { ret operator BOOST_TT_TRAIT_OP (int) const; }; + +struct external { }; +inline ret operator BOOST_TT_TRAIT_OP (const external&, int){ return ret(); } + +struct comma1_ret { }; +struct ret_with_comma1 { comma1_ret operator,(int); }; + +struct internal_comma1 { 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(); } + +struct ret_with_comma2 { void operator,(int); }; + +struct internal_comma2 { 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(); } + +struct returns_int { int operator BOOST_TT_TRAIT_OP (int); }; + +struct returns_void { void operator BOOST_TT_TRAIT_OP (int); }; + +struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (int); }; + +struct returns_double { 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_ret2 { }; +struct ret2 { ret2(const convertible_to_ret2); }; +struct returns_convertible_to_ret2 { 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; } + +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; } + +struct tag { }; + +//class internal_private { ret operator BOOST_TT_TRAIT_OP (int) const; }; + +void common() { + TEST_T(void, false); + TEST_TR(void, void, false); + TEST_TR(void, int, false); + + TEST_T(without, false); + TEST_T(internal, true); + TEST_T(external, true); + TEST_T(internal_comma1, true); + TEST_T(external_comma1, true); + TEST_T(internal_comma2, true); + TEST_T(external_comma2, true); + TEST_T(returns_int, true); + TEST_T(returns_void, true); + TEST_T(returns_void_star, true); + TEST_T(returns_double, true); + TEST_T(returns_convertible_to_ret1, true); + TEST_T(returns_convertible_to_ret2, true); + TEST_T(Base1, true); + TEST_T(Derived1, true); + TEST_T(Base2, false); + TEST_T(Derived2, true); + + TEST_TR(without, void, false); + TEST_TR(without, bool, false); + TEST_TR(internal, void, false); + TEST_TR(internal, bool, false); + TEST_TR(internal, ret, true); + TEST_TR(internal_comma1, void, false); + TEST_TR(internal_comma1, bool, false); + TEST_TR(internal_comma1, ret_with_comma1, true); + TEST_TR(internal_comma2, void, false); + TEST_TR(internal_comma2, bool, false); + TEST_TR(internal_comma2, ret_with_comma2, true); + TEST_TR(external, void, false); + TEST_TR(external, bool, false); + TEST_TR(external, ret, true); + TEST_TR(returns_int, void, false); + TEST_TR(returns_int, bool, true); + TEST_TR(returns_int, int, true); + TEST_TR(returns_void, void, true); + TEST_TR(returns_void, bool, false); + TEST_TR(returns_void_star, bool, true); + TEST_TR(returns_double, void, false); + TEST_TR(returns_double, bool, true); + TEST_TR(returns_double, double, true); + TEST_TR(returns_convertible_to_ret1, void, false); + TEST_TR(returns_convertible_to_ret1, ret1, true); + TEST_TR(returns_convertible_to_ret2, ret2, true); + TEST_TR(Base1, bool, true); + TEST_TR(Derived1, bool, true); + TEST_TR(Base2, bool, false); + TEST_TR(Derived2, bool, true); +// compile time error +// TEST_T(internal_private, false); +} + +} + +#endif + diff --git a/src/boost/libs/type_traits/test/has_pre_decrement_test.cpp b/src/boost/libs/type_traits/test/has_pre_decrement_test.cpp new file mode 100644 index 000000000..77710b63c --- /dev/null +++ b/src/boost/libs/type_traits/test/has_pre_decrement_test.cpp @@ -0,0 +1,244 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_pre_decrement.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_pre_decrement +#define BOOST_TT_TRAIT_OP -- + + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::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, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::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 &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0); + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0); +#endif +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_pre_increment_test.cpp b/src/boost/libs/type_traits/test/has_pre_increment_test.cpp new file mode 100644 index 000000000..d7eaf14bb --- /dev/null +++ b/src/boost/libs/type_traits/test/has_pre_increment_test.cpp @@ -0,0 +1,244 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_pre_increment.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_pre_increment +#define BOOST_TT_TRAIT_OP ++ + + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::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, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::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 &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + 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 const >::value), 0); + 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 const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0); + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0); +#endif +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_prefix_classes.hpp b/src/boost/libs/type_traits/test/has_prefix_classes.hpp new file mode 100644 index 000000000..ac962032b --- /dev/null +++ b/src/boost/libs/type_traits/test/has_prefix_classes.hpp @@ -0,0 +1,72 @@ +// (C) Copyright Frederic Bron 2009-2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef TT_HAS_PREFIX_CLASSES_HPP +#define TT_HAS_PREFIX_CLASSES_HPP + +struct ret { }; +ret ret_val; + +class C000 { C000(); public: C000(int) { } }; +void operator++(C000) { } + +class C001 { C001(); public: C001(int) { } }; +ret operator++(C001) { return ret_val; } + +class C002 { C002(); public: C002(int) { } }; +ret const operator++(C002) { return ret_val; } + +class C005 { C005(); public: C005(int) { } }; +ret & operator++(C005) { return ret_val; } + +class C006 { C006(); public: C006(int) { } }; +ret const & operator++(C006) { return ret_val; } + +class C009 { C009(); public: C009(int) { } }; +void operator++(C009 const) { } + +class C010 { C010(); public: C010(int) { } }; +ret operator++(C010 const) { return ret_val; } + +class C011 { C011(); public: C011(int) { } }; +ret const operator++(C011 const) { return ret_val; } + +class C014 { C014(); public: C014(int) { } }; +ret & operator++(C014 const) { return ret_val; } + +class C015 { C015(); public: C015(int) { } }; +ret const & operator++(C015 const) { return ret_val; } + +class C036 { C036(); public: C036(int) { } }; +void operator++(C036 &) { } + +class C037 { C037(); public: C037(int) { } }; +ret operator++(C037 &) { return ret_val; } + +class C038 { C038(); public: C038(int) { } }; +ret const operator++(C038 &) { return ret_val; } + +class C041 { C041(); public: C041(int) { } }; +ret & operator++(C041 &) { return ret_val; } + +class C042 { C042(); public: C042(int) { } }; +ret const & operator++(C042 &) { return ret_val; } + +class C045 { C045(); public: C045(int) { } }; +void operator++(C045 const &) { } + +class C046 { C046(); public: C046(int) { } }; +ret operator++(C046 const &) { return ret_val; } + +class C047 { C047(); public: C047(int) { } }; +ret const operator++(C047 const &) { return ret_val; } + +class C050 { C050(); public: C050(int) { } }; +ret & operator++(C050 const &) { return ret_val; } + +class C051 { C051(); public: C051(int) { } }; +ret const & operator++(C051 const &) { return ret_val; } + +#endif diff --git a/src/boost/libs/type_traits/test/has_prefix_classes0_test.cpp b/src/boost/libs/type_traits/test/has_prefix_classes0_test.cpp new file mode 100644 index 000000000..0943a4aa9 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_prefix_classes0_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_prefix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C000 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C001 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C002 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C005 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C006 const &, ret const & >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_prefix_classes1_test.cpp b/src/boost/libs/type_traits/test/has_prefix_classes1_test.cpp new file mode 100644 index 000000000..bdd1f5920 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_prefix_classes1_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_prefix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C009 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C010 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C011 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C014 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C015 const &, ret const & >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_prefix_classes2_test.cpp b/src/boost/libs/type_traits/test/has_prefix_classes2_test.cpp new file mode 100644 index 000000000..993b70d0a --- /dev/null +++ b/src/boost/libs/type_traits/test/has_prefix_classes2_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_prefix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C036 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C037 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C038 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C041 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C042 const &, ret const & >::value), 0); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_prefix_classes3_test.cpp b/src/boost/libs/type_traits/test/has_prefix_classes3_test.cpp new file mode 100644 index 000000000..90399999f --- /dev/null +++ b/src/boost/libs/type_traits/test/has_prefix_classes3_test.cpp @@ -0,0 +1,112 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/has_operator.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" +#include "has_prefix_classes.hpp" + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const &, void >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const &, ret >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const &, ret const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C045 const &, ret const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C046 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C047 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const &, ret & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C050 const &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 &, ret const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const &, ret >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const &, ret const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const &, ret & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_pre_increment< C051 const &, ret const & >::value), 1); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_prefix_operators.hpp b/src/boost/libs/type_traits/test/has_prefix_operators.hpp new file mode 100644 index 000000000..8b4365379 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_prefix_operators.hpp @@ -0,0 +1,142 @@ +// (C) Copyright Frederic Bron 2009-2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef TT_HAS_PREFIX_OPERATORS_HPP +#define TT_HAS_PREFIX_OPERATORS_HPP + +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" +#endif + +// It would be nice to get rid of the unnamed namespace here, +// but for now we just turn off inspection reporting :( +// boostinspect:nounnamed + +// test with one template parameter +#define TEST_T(TYPE,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE>::value), RESULT) +// test with one template parameter plus return value +#define TEST_TR(TYPE,RET,RESULT) BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<TYPE,RET>::value), RESULT) + +namespace { + +struct without { }; + +struct ret { }; + +struct internal { ret operator BOOST_TT_TRAIT_OP () const; }; + +struct external { }; +inline ret operator BOOST_TT_TRAIT_OP (const external&){ return ret(); } + +struct comma1_ret { }; +struct ret_with_comma1 { comma1_ret operator,(int); }; + +struct internal_comma1 { 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(); } + +struct ret_with_comma2 { void operator,(int); }; + +struct internal_comma2 { 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(); } + +struct returns_int { int operator BOOST_TT_TRAIT_OP (); }; + +struct returns_void { void operator BOOST_TT_TRAIT_OP (); }; + +struct returns_void_star { void *operator BOOST_TT_TRAIT_OP (); }; + +struct returns_double { 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_ret2 { }; +struct ret2 { ret2(const convertible_to_ret2); }; +struct returns_convertible_to_ret2 { 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; } + +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; } + +struct tag { }; + +//class internal_private { ret operator BOOST_TT_TRAIT_OP () const; }; + +void common() { + TEST_T(void, false); + TEST_TR(void, void, false); + TEST_TR(void, int, false); + + TEST_T(without, false); + TEST_T(internal, true); + TEST_T(external, true); + TEST_T(internal_comma1, true); + TEST_T(external_comma1, true); + TEST_T(internal_comma2, true); + TEST_T(external_comma2, true); + TEST_T(returns_int, true); + TEST_T(returns_void, true); + TEST_T(returns_void_star, true); + TEST_T(returns_double, true); + TEST_T(returns_convertible_to_ret1, true); + TEST_T(returns_convertible_to_ret2, true); + TEST_T(Base1, true); + TEST_T(Derived1, true); + TEST_T(Base2, false); + TEST_T(Derived2, true); + + TEST_TR(without, void, false); + TEST_TR(without, bool, false); + TEST_TR(internal_comma1, void, false); + TEST_TR(internal_comma1, bool, false); + TEST_TR(internal_comma1, ret_with_comma1, true); + TEST_TR(internal_comma2, void, false); + TEST_TR(internal_comma2, bool, false); + TEST_TR(internal_comma2, ret_with_comma2, true); + TEST_TR(external, void, false); + TEST_TR(external, bool, false); + TEST_TR(external, ret, true); + TEST_TR(returns_int, void, false); + TEST_TR(returns_int, bool, true); + TEST_TR(returns_int, int, true); + TEST_TR(returns_void, void, true); + TEST_TR(returns_void, bool, false); + TEST_TR(returns_void_star, bool, true); + TEST_TR(returns_double, void, false); + TEST_TR(returns_double, bool, true); + TEST_TR(returns_double, double, true); + TEST_TR(returns_convertible_to_ret1, void, false); + TEST_TR(returns_convertible_to_ret1, ret1, true); + TEST_TR(returns_convertible_to_ret2, ret2, true); + TEST_TR(Base1, bool, true); + TEST_TR(Derived1, bool, true); + TEST_TR(Base2, bool, false); + TEST_TR(Derived2, bool, true); +// compile time error +// TEST_T(internal_private, false); +} + +} + +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40900) +#pragma GCC diagnostic pop +#endif + +#endif + diff --git a/src/boost/libs/type_traits/test/has_right_shift_assign_test.cpp b/src/boost/libs/type_traits/test/has_right_shift_assign_test.cpp new file mode 100644 index 000000000..ddae521ef --- /dev/null +++ b/src/boost/libs/type_traits/test/has_right_shift_assign_test.cpp @@ -0,0 +1,227 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_right_shift_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_right_shift_assign +#define BOOST_TT_TRAIT_OP >>= + + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_right_shift_test.cpp b/src/boost/libs/type_traits/test/has_right_shift_test.cpp new file mode 100644 index 000000000..ff6a4da17 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_right_shift_test.cpp @@ -0,0 +1,246 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_right_shift.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_right_shift +#define BOOST_TT_TRAIT_OP >> + +#include <istream> +#include <string> + +#include "has_binary_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* 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< int* const &, void, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const, int & >::value), 0); + 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 const &, void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const &, 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 &, double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void* &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, double const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const &, int const & >::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, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, double, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, double const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int, int const & >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* const, void >::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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, double const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, void* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const, bool 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 &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, bool const >::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*, double const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const, bool & >::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* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, double &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, void* const &, bool & >::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 &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, double const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int* const &, int const & >::value), 0); + + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, bool&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, short&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, unsigned short&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, int&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, unsigned int&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, long&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, unsigned long&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, float&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, double&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, void*&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, char&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, signed char&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, unsigned char&, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, char*, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, signed char*, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, unsigned char*, std::istream& >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< std::istream, std::string&, std::istream& >::value), 1); +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_trivial_assign_test.cpp b/src/boost/libs/type_traits/test/has_trivial_assign_test.cpp new file mode 100644 index 000000000..983dacf1b --- /dev/null +++ b/src/boost/libs/type_traits/test/has_trivial_assign_test.cpp @@ -0,0 +1,232 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_trivial_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +struct non_assignable +{ + non_assignable(); +private: + non_assignable& operator=(const non_assignable&); +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct non_assignable2 +{ + non_assignable2(); + non_assignable2& operator=(const non_assignable2&) = delete; +}; + +#endif + +TT_TEST_BEGIN(has_trivial_assign) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<bool>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<bool const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<signed char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<signed char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<short>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<short const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long const volatile>::value, false); +#endif +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::long_long_type>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::long_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int8>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int8 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int16>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int16 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int32>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int32 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int64>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<float>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<float const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<float const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<double const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<void*>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int*const>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<const int&>::value, false); +// Arrays can not be explicitly assigned: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<trivial_except_assign>::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<trivial_except_destroy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<trivial_except_construct>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<trivial_except_copy>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<wrap<trivial_except_assign> >::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<wrap<trivial_except_destroy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<wrap<trivial_except_construct> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign<wrap<trivial_except_copy> >::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<non_assignable2>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<non_assignable>::value, false); + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/has_trivial_constr_test.cpp b/src/boost/libs/type_traits/test/has_trivial_constr_test.cpp new file mode 100644 index 000000000..455ee9582 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_trivial_constr_test.cpp @@ -0,0 +1,221 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_trivial_constructor.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + + +class bug11324_base +{ +public: + bug11324_base & operator=(const bug11324_base&){ throw int(); } + virtual ~bug11324_base() {} +}; + +class bug11324_derived : public bug11324_base +{ +public: + char data; + explicit bug11324_derived(char arg) : data(arg) {} +}; + +struct private_construct +{ + private_construct(int); +private: + private_construct(); +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct deleted_construct +{ + deleted_construct(int); + deleted_construct() = delete; +}; + +#endif + +TT_TEST_BEGIN(has_trivial_constructor) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<empty_UDT>::value, false); +// Can't construct type void: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_construct>::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_destroy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_assign>::value, true, false); +//BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_copy>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_construct> >::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_destroy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_assign> >::value, true, false); +//BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_copy> >::value, true, false); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bug11324_derived>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<private_construct>::value, false); +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<deleted_construct>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::has_trivial_constructor<std::pair<deleted_construct, int> >::value), false); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/has_trivial_copy_test.cpp b/src/boost/libs/type_traits/test/has_trivial_copy_test.cpp new file mode 100644 index 000000000..c0cf82758 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_trivial_copy_test.cpp @@ -0,0 +1,240 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_trivial_copy.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +class bug_10389 +{ + int m_data; +public: + bug_10389() { m_data = 0; } + bug_10389(const bug_10389&) = delete; + bug_10389(bug_10389&& r) : m_data(r.m_data) { r.m_data = 0; } +}; + +#endif + +struct private_copy +{ + private_copy(); +private: + private_copy(const private_copy&); +}; + +TT_TEST_BEGIN(has_trivial_copy) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<bool const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<signed char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<short const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<short const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long const volatile>::value, false); +#endif +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::long_long_type const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int8 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int8 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int16 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int16 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int32 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int32 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int64 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<float const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<float const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<const int&>::value, false); +// Arrays can not be explicitly copied: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<trivial_except_copy>::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<trivial_except_destroy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<trivial_except_construct>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<trivial_except_assign>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<wrap<trivial_except_copy> >::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<wrap<trivial_except_destroy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<wrap<trivial_except_construct> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy<wrap<trivial_except_assign> >::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<bug_10389>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<private_copy>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/has_trivial_destructor_test.cpp b/src/boost/libs/type_traits/test/has_trivial_destructor_test.cpp new file mode 100644 index 000000000..0ec5251d5 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_trivial_destructor_test.cpp @@ -0,0 +1,198 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_trivial_destructor.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct deleted_destruct +{ + deleted_destruct(); + ~deleted_destruct() = delete; +}; + +#endif + +struct private_destruct +{ + private_destruct(); +private: + ~private_destruct(); +}; + +TT_TEST_BEGIN(has_trivial_destructor) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<enum_UDT>::value, true); + +// +// These are commented out for now because it's not clear what the semantics should be: +// on the one hand references always have trivial destructors (in the sense that there is +// nothing to destruct), on the other hand the thing referenced may not have a trivial +// destructor, it really depends upon the users code as to what should happen here: +// +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int&>::value, false); +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<trivial_except_destroy>::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<trivial_except_copy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<trivial_except_construct>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<trivial_except_assign>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<wrap<trivial_except_destroy> >::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<wrap<trivial_except_copy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<wrap<trivial_except_construct> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<wrap<trivial_except_assign> >::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<private_destruct>::value, false); +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<deleted_destruct>::value, false); +#endif + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/has_trivial_move_assign_test.cpp b/src/boost/libs/type_traits/test/has_trivial_move_assign_test.cpp new file mode 100644 index 000000000..fd8b3c9e7 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_trivial_move_assign_test.cpp @@ -0,0 +1,284 @@ + +// (C) Copyright John Maddock 2000. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_trivial_move_assign.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct non_copyable_movable +{ + int val; + non_copyable_movable(int); + non_copyable_movable(const non_copyable_movable&) = delete; + non_copyable_movable& operator=(const non_copyable_movable&) = delete; + //non_copyable_movable(non_copyable_movable&&) = default; +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1800) || BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) + non_copyable_movable& operator=(non_copyable_movable&& o) + { + val = std::move(o.val); + return *this; + } +#else + non_copyable_movable& operator=(non_copyable_movable&&) = default; +#endif +}; + +struct copyable_non_moveable +{ + int val; + copyable_non_moveable(int); + copyable_non_moveable(const copyable_non_moveable&) = default; + copyable_non_moveable& operator=(const copyable_non_moveable&) = default; + copyable_non_moveable(copyable_non_moveable&&) = delete; + copyable_non_moveable& operator=(copyable_non_moveable&&) = delete; +}; + +#endif + +TT_TEST_BEGIN(has_trivial_move_assign) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<short const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long const volatile>::value, false); +#endif +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int8 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int16 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int32 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<float const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<double const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<void*>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int*const>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<const int&>::value, false); +// array types are not assignable: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<void>::value, false); + +#ifdef BOOST_HAS_TRIVIAL_MOVE_ASSIGN + +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_POD_union_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_assign>::value, false); +// Why does this fail on multiple compilers?? +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_destroy>::value, true); +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_construct>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_copy>::value, true); +#endif +/* +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_assign> >::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_destroy> >::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_construct> >::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_copy> >::value, true); +*/ +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<non_copyable_movable>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<copyable_non_moveable>::value, false); +#endif + +#else + +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_assign>::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_destroy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_construct>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<trivial_except_copy>::value, true, false); +/* +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_assign> >::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_destroy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_construct> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<wrap<trivial_except_copy> >::value, true, false); +*/ +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<non_copyable_movable>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_assign<copyable_non_moveable>::value, false); +#endif + +#endif + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/has_trivial_move_constructor_test.cpp b/src/boost/libs/type_traits/test/has_trivial_move_constructor_test.cpp new file mode 100644 index 000000000..26894c9c0 --- /dev/null +++ b/src/boost/libs/type_traits/test/has_trivial_move_constructor_test.cpp @@ -0,0 +1,289 @@ + +// (C) Copyright John Maddock 2000. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_trivial_move_constructor.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct non_copyable_movable +{ + int val; + non_copyable_movable(int); + non_copyable_movable(const non_copyable_movable&) = delete; + non_copyable_movable& operator=(const non_copyable_movable&) = delete; +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1800) || BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) + non_copyable_movable(non_copyable_movable&& o) : val(o.val){} + non_copyable_movable& operator=(non_copyable_movable&& o) + { + val = std::move(o.val); + return *this; + } +#else + non_copyable_movable(non_copyable_movable&&) = default; + non_copyable_movable& operator=(non_copyable_movable&&) = default; +#endif +}; + +struct copyable_non_moveable +{ + int val; + copyable_non_moveable(int); + copyable_non_moveable(const copyable_non_moveable&) = default; + copyable_non_moveable& operator=(const copyable_non_moveable&) = default; + copyable_non_moveable(copyable_non_moveable&&) = delete; + copyable_non_moveable& operator=(copyable_non_moveable&&) = delete; +}; + +#endif + +TT_TEST_BEGIN(has_trivial_move_constructor) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<short const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long const volatile>::value, false); +#endif +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int8 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int16 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int32 const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<float const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int&>::value, true); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int&&>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<const int&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<void>::value, false); + +#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR + +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<empty_POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<empty_POD_union_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_copy>::value, false); +// Why does this fail on multiple compilers?? +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_destroy>::value, true); +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_construct>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_assign>::value, true); +#endif +/* +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_copy> >::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_destroy> >::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_construct> >::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_assign> >::value, true); +*/ +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<non_copyable_movable>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<copyable_non_moveable>::value, false); +#endif + +#else + +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_copy>::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_destroy>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_construct>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<trivial_except_assign>::value, true, false); +/* +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_copy> >::value, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_destroy> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_construct> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<wrap<trivial_except_assign> >::value, true, false); +*/ +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<non_copyable_movable>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_move_constructor<copyable_non_moveable>::value, false); +#endif + +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/has_unary_minus_test.cpp b/src/boost/libs/type_traits/test/has_unary_minus_test.cpp new file mode 100644 index 000000000..33863fa3d --- /dev/null +++ b/src/boost/libs/type_traits/test/has_unary_minus_test.cpp @@ -0,0 +1,244 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_unary_minus.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_unary_minus +#define BOOST_TT_TRAIT_OP - + + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int const >::value), 1); + 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 const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const >::value), 1); + 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 const & >::value), 1); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + 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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0); + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0); +#endif +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_unary_plus_test.cpp b/src/boost/libs/type_traits/test/has_unary_plus_test.cpp new file mode 100644 index 000000000..e24d833fc --- /dev/null +++ b/src/boost/libs/type_traits/test/has_unary_plus_test.cpp @@ -0,0 +1,249 @@ +// (C) Copyright 2009-2011 Frederic Bron. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_unary_plus.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#define BOOST_TT_TRAIT_NAME has_unary_plus +#define BOOST_TT_TRAIT_OP + + + +#include "has_prefix_operators.hpp" + +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); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, bool const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< bool const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int const &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const, int const >::value), 1); + 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 const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double &, int const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int const >::value), 1); + 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 const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* >::value), 1); + 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), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* & >::value), 1); + 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), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* &, int const & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, void >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, bool const & >::value), 1); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0); + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + // There are some things that pass that wouldn't otherwise do so: + auto f = []() {}; + auto f2 = [](double)->int { return 2; }; +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1900) + bool result = false; +#else + bool result = true; +#endif + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), result); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), result); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), result); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), result); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0); + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0); + BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0); +#endif +#endif +} + +TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME) + common(); + specific(); +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/has_virtual_destructor_test.cpp b/src/boost/libs/type_traits/test/has_virtual_destructor_test.cpp new file mode 100644 index 000000000..cc47eec6c --- /dev/null +++ b/src/boost/libs/type_traits/test/has_virtual_destructor_test.cpp @@ -0,0 +1,75 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/has_virtual_destructor.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#include <iostream> +#include <stdexcept> +#include <new> + +class polymorphic_no_virtual_destructor +{ +public: + virtual void method() = 0; +}; + +TT_TEST_BEGIN(has_virtual_destructor) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<const int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<volatile int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int* const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<mf4>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<enum_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<empty_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<void>::value, false); + +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<VB>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<VD>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<test_abc1>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<test_abc2>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<polymorphic_no_virtual_destructor>::value, false); +#ifndef BOOST_NO_STD_LOCALE +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::iostream>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_streambuf<char> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_ios<char> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_istream<char> >::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_streambuf<char> >::value, true, false); +#endif +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::exception>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::bad_alloc>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::runtime_error>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::out_of_range>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::range_error>::value, true, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_abstract_test.cpp b/src/boost/libs/type_traits/test/is_abstract_test.cpp new file mode 100644 index 000000000..9afe65523 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_abstract_test.cpp @@ -0,0 +1,445 @@ + +// (C) Copyright Rani Sharoni,Robert Ramey, Pavel Vozenilek and Christoph Ludwig 2004. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_abstract.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifdef BOOST_MSVC +#pragma warning(disable: 4505) +#endif + + +struct TestA {}; +struct TestB { virtual void foo(void) = 0; }; +struct TestC { private: virtual void foo(void) = 0; }; +struct TestD : public TestA {}; +struct TestE : public TestB {}; +struct TestF : public TestC {}; +struct TestG : public TestB { virtual void foo(void) {} }; +struct TestH : public TestC { private: virtual void foo(void) {} }; +struct TestI : public TestB, public TestC {}; +struct TestJ : public TestI { virtual void foo(void) {} }; +struct TestK : public TestB { virtual void foo(void); virtual void foo2(void) = 0; }; +struct TestL : public TestK { virtual void foo2(void) {} }; +struct TestM : public virtual TestB {}; +struct TestN : public virtual TestC {}; +struct TestO : public TestM, public TestN {}; +struct TestP : public TestO { virtual void foo(void) {} }; +struct TestQ : public TestB { virtual void foo(void) = 0; }; +struct TestR : public TestC { private: virtual void foo(void) = 0; }; +struct TestS { virtual void foo(void) {} }; +struct TestT { virtual ~TestT(void) {} virtual void foo(void) {} }; +struct TestU : public TestT { virtual void foo(void) = 0; }; +struct TestV : public TestT { virtual void foo(void) {} }; +struct TestW { virtual void foo1(void) = 0; virtual void foo2(void) = 0; }; +struct TestX : public TestW { virtual void foo1(void) {} virtual void foo2(void) {} }; +struct TestY { virtual ~TestY(void) = 0; }; +struct TestZ { virtual ~TestZ(void) = 0; }; TestZ::~TestZ(void) {} +struct TestAA : public TestZ { virtual ~TestAA(void) = 0; }; TestAA::~TestAA(void) {} +struct TestAB : public TestAA { virtual ~TestAB(void) {} }; +struct TestAC { virtual void foo(void) = 0; }; void TestAC::foo(void) {} +struct TestAD : public TestAC {}; +struct TestAE : public TestAD { virtual void foo() {} }; +struct TestAF : public TestAD { virtual void foo(); }; void TestAF::foo(void) {} +struct TestAG : public virtual TestA {}; + +// template test types: +template <class T> struct TTestA {}; +template <class T> struct TTestB { virtual void foo(void) = 0; }; +template <class T> struct TTestC { private: virtual void foo(void) = 0; }; +template <class T> struct TTestD : public TTestA<T> {}; +template <class T> struct TTestE : public TTestB<T> {}; +template <class T> struct TTestF : public TTestC<T> {}; +template <class T> struct TTestG : public TTestB<T> { virtual void foo(void) {} }; +template <class T> struct TTestH : public TTestC<T> { private: virtual void foo(void) {} }; +template <class T> struct TTestI : public TTestB<T>, public TTestC<T> {}; +template <class T> struct TTestJ : public TTestI<T> { virtual void foo(void) {} }; +template <class T> struct TTestK : public TTestB<T> { virtual void foo(void); virtual void foo2(void) = 0; }; +template <class T> struct TTestL : public TTestK<T> { virtual void foo2(void) {} }; +template <class T> struct TTestM : public virtual TTestB<T> {}; +template <class T> struct TTestN : public virtual TTestC<T> {}; +template <class T> struct TTestO : public TTestM<T>, public TTestN<T> {}; +template <class T> struct TTestP : public TTestO<T> { virtual void foo(void) {} }; +template <class T> struct TTestQ : public TTestB<T> { virtual void foo(void) = 0; }; +template <class T> struct TTestR : public TTestC<T> { private: virtual void foo(void) = 0; }; +template <class T> struct TTestS { virtual void foo(void) {} }; +template <class T> struct TTestT { virtual ~TTestT(void) {} virtual void foo(void) {} }; +template <class T> struct TTestU : public TTestT<T> { virtual void foo(void) = 0; }; +template <class T> struct TTestV : public TTestT<T> { virtual void foo(void) {} }; +template <class T> struct TTestW { virtual void foo1(void) = 0; virtual void foo2(void) = 0; }; +template <class T> struct TTestX : public TTestW<T> { virtual void foo1(void) {} virtual void foo2(void) {} }; +template <class T> struct TTestY { virtual ~TTestY(void) = 0; }; +template <class T> struct TTestZ { virtual ~TTestZ(void) = 0; }; template <class T> TTestZ<T>::~TTestZ(void) {} +template <class T> struct TTestAA : public TTestZ<T> { virtual ~TTestAA(void) = 0; }; template <class T> TTestAA<T>::~TTestAA(void) {} +template <class T> struct TTestAB : public TTestAA<T> { virtual ~TTestAB(void) {} }; +template <class T> struct TTestAC { virtual void foo(void) = 0; }; template <class T> void TTestAC<T>::foo(void) {} +template <class T> struct TTestAD : public TTestAC<T> {}; +template <class T> struct TTestAE : public TTestAD<T> { virtual void foo() {} }; +template <class T> struct TTestAF : public TTestAD<T> { virtual void foo(); }; template <class T> void TTestAF<T>::foo(void) {} +template <class T> struct TTestAG : public virtual TTestA<T> {}; + + +TT_TEST_BEGIN(is_abstract) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestA>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestB>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestD>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestE>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestF>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestG>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestH>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestI>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestJ>::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestK>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestL>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestM>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestN>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestO>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestP>::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestQ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestR>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestS>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestT>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestU>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestV>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestW>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestX>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestY>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestZ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAA>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAB>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAD>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAE>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAF>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAG>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestA>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestB>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestD>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestE>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestF>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestG>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestH>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestI>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestJ>::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestK>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestL>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestM>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestN>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestO>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestP>::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestQ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestR>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestS>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestT>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestU>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestV>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestW>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestX>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestY>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestZ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestAA>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestAB>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestAC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestAD>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestAE>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestAF>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TestAG>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestA>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestB>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestD>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestE>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestF>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestG>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestH>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestI>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestJ>::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestK>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestL>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestM>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestN>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestO>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestP>::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestQ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestR>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestS>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestT>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestU>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestV>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestW>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestX>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestY>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestZ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestAA>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestAB>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestAC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestAD>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestAE>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestAF>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TestAG>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestA>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestB>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestD>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestE>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestF>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestG>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestH>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestI>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestJ>::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestK>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestL>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestM>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestN>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestO>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestP>::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestQ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestR>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestS>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestT>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestU>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestV>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestW>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestX>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestY>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestZ>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestAA>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestAB>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestAC>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestAD>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestAE>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestAF>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TestAG>::value), false); + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestA&&>::value), false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestA&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestB&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestC&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestD&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestE&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestF&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestG&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestH&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestI&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestJ&>::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestK&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestL&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestM&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestN&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestO&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestP&>::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestQ&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestR&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestS&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestT&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestU&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestV&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestW&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestX&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestY&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestZ&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAA&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAB&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAC&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAD&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAE&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAF&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TestAG&>::value), false); +#if !(defined(BOOST_MSVC) && (BOOST_MSVC < 1310)) +// MSVC prior to VC7.1 always runs out of swap space trying to +// compile these, so leave them out for now (the test fails anyway). +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestA<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestB<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestD<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestE<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestF<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestG<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestH<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestI<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestJ<int> >::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestK<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestL<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestM<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestN<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestO<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestP<int> >::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestQ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestR<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestS<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestT<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestU<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestV<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestW<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestX<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestY<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestZ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAA<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAB<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAD<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAE<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAF<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAG<int> >::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestA<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestB<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestD<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestE<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestF<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestG<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestH<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestI<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestJ<int> >::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestK<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestL<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestM<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestN<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestO<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestP<int> >::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestQ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestR<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestS<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestT<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestU<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestV<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestW<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestX<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestY<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestZ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestAA<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestAB<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestAC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestAD<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestAE<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestAF<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<const TTestAG<int> >::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestA<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestB<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestD<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestE<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestF<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestG<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestH<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestI<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestJ<int> >::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestK<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestL<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestM<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestN<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestO<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestP<int> >::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestQ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestR<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestS<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestT<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestU<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestV<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestW<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestX<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestY<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestZ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestAA<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestAB<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestAC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestAD<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestAE<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestAF<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile TTestAG<int> >::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestA<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestB<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestD<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestE<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestF<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestG<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestH<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestI<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestJ<int> >::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestK<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestL<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestM<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestN<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestO<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestP<int> >::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestQ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestR<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestS<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestT<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestU<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestV<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestW<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestX<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestY<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestZ<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestAA<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestAB<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestAC<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestAD<int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestAE<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestAF<int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<volatile const TTestAG<int> >::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestA<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestB<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestC<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestD<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestE<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestF<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestG<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestH<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestI<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestJ<int>& >::value), false); // only one method implemented! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestK<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestL<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestM<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestN<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestO<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestP<int>& >::value), false); // ??? +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestQ<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestR<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestS<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestT<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestU<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestV<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestW<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestX<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestY<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestZ<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAA<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAB<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAC<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAD<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAE<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAF<int>& >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract<TTestAG<int>& >::value), false); +#endif +TT_TEST_END + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_arithmetic_test.cpp b/src/boost/libs/type_traits/test/is_arithmetic_test.cpp new file mode 100644 index 000000000..6f0618de9 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_arithmetic_test.cpp @@ -0,0 +1,171 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_arithmetic.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_arithmetic) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<long double const volatile>::value, true); + +// +// cases that should not be true: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<const float&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<float[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<incomplete_type>::value, false); + +#ifndef BOOST_NO_CXX11_CHAR16_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char16_t>::value, true); +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char32_t>::value, true); +#endif + +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<boost::int128_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<boost::uint128_type>::value, true); +#endif + +#ifdef BOOST_HAS_FLOAT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<boost::float128_type>::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_array_test.cpp b/src/boost/libs/type_traits/test/is_array_test.cpp new file mode 100644 index 000000000..9f2858d64 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_array_test.cpp @@ -0,0 +1,55 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_array.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +struct convertible_to_pointer +{ + operator char*() const; +}; + +TT_TEST_BEGIN(is_array) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const volatile int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int*const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const int*volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const volatile int*const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const volatile int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int[2][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<UDT[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int(&)[2]>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int(&&)[2]>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<convertible_to_pointer>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<incomplete_type>::value, false); + + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_assignable_test.cpp b/src/boost/libs/type_traits/test/is_assignable_test.cpp new file mode 100644 index 000000000..8798dd438 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_assignable_test.cpp @@ -0,0 +1,151 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_assignable.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct non_assignable +{ + non_assignable(); + non_assignable& operator=(const non_assignable&) = delete; +}; + +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +struct noexcept_assignable +{ + noexcept_assignable(); + noexcept_assignable& operator=(const noexcept_assignable&)noexcept; +}; + +#endif + +TT_TEST_BEGIN(is_assignable) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<bool&, const bool&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<bool const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<bool volatile&, bool const volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<bool const volatile&>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<signed char&, const signed char&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<signed char const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<signed char volatile&, const signed char volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<signed char const volatile&>::value), false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned char&, const unsigned char&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<char&, const char&>::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned short&, const unsigned short&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<short&, const short&>::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned int&, const unsigned int&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int&, const int&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned int const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned int volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned int const volatile&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int const volatile&>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned long&, const unsigned long&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long&, const long&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned long const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned long volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<unsigned long const volatile&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long const volatile&>::value), false); +#endif + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::ulong_long_type&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::long_long_type&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::ulong_long_type const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::long_long_type const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::ulong_long_type volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::long_long_type volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::ulong_long_type const volatile&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable< ::boost::long_long_type const volatile&>::value), false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<float&, const float&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<float const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<float volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<float const volatile&>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<double&, const double&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<double const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<double volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<double const volatile&>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long double&, const long double&>::value), true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long double const&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long double volatile&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<long double const volatile&>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<void*&>::value), true); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int&, int&&>::value), true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<const int&>::value), false); +//BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int(&)[2], const int(&)[2]>::value), true); +//BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int(&)[3][2]>::value), true); +//BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<int(&)[2][4][5][6][3]>::value), true); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<UDT&>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<empty_UDT&>::value), true, false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<void>::value), false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<empty_POD_UDT&>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<POD_UDT&>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<POD_union_UDT&>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<empty_POD_union_UDT&>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<nothrow_assign_UDT&>::value), true, false); + +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_assignable<test_abc1&>::value), true, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<non_assignable&>::value), false); +#endif +#ifndef BOOST_NO_CXX11_NOEXCEPT +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_assignable<noexcept_assignable&>::value), true); +#endif + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/is_base_and_derived_test.cpp b/src/boost/libs/type_traits/test/is_base_and_derived_test.cpp new file mode 100644 index 000000000..2f6ec1729 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_base_and_derived_test.cpp @@ -0,0 +1,70 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_base_and_derived.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +// +// Additional tests added for VC7.1 bug, 2005/04/21 +// +struct marker{}; +struct foo{ int x; }; + +template<class Class,typename Type,Type Class::*PtrToMember> +struct class_member{}; +template<class Class,typename Type,Type Class::*PtrToMember> +struct class_member2 : public marker{}; + + +TT_TEST_BEGIN(is_base_and_derived) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Derived,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Derived,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Base,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<const Base,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Base,Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Base,MultiBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Derived,MultiBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Derived2,MultiBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Base,PrivateBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<NonDerived,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Base,void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<Base,const void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<void,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<const void,Derived>::value), false); +#if defined(TEST_STD) && (TEST_STD < 2006) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<int, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<const int, int>::value), true); +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<int, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<const int, int>::value), false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<VB,VD>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<VD,VB>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<test_abc1,test_abc3>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<test_abc3,test_abc1>::value), false); + +typedef class_member<foo,int,&foo::x> mem_type; +typedef class_member2<foo,int,&foo::x> mem2_type; +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<marker, mem_type>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived<marker, mem2_type>::value), true); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_base_of_test.cpp b/src/boost/libs/type_traits/test/is_base_of_test.cpp new file mode 100644 index 000000000..9350efe7a --- /dev/null +++ b/src/boost/libs/type_traits/test/is_base_of_test.cpp @@ -0,0 +1,59 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_base_of.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + + + +TT_TEST_BEGIN(is_base_of) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Derived,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Derived,Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Derived,const Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,Base>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<const Base,Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,const Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,MultiBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Derived,MultiBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Derived2,MultiBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,PrivateBase>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<NonDerived,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,const void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<void,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<const void,Derived>::value), false); +#if defined(TEST_STD) && (TEST_STD < 2006) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<int, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<const int, int>::value), true); +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<int, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<const int, int>::value), false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<VB,VD>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<VD,VB>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<test_abc1,test_abc3>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<test_abc3,test_abc1>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,virtual_inherit1>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<virtual_inherit1,Base>::value), false); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_bounded_array_test.cpp b/src/boost/libs/type_traits/test/is_bounded_array_test.cpp new file mode 100644 index 000000000..ac5fcbf49 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_bounded_array_test.cpp @@ -0,0 +1,35 @@ +/* +Copyright 2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/is_bounded_array.hpp> +#endif +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_bounded_array) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<const int[3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<const volatile int[4]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int[5][6]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int[]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<const int[]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<const volatile int[]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int[][7]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int(&)[8]>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_bounded_array<int(&&)[9]>::value, false); +#endif + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/is_class_test.cpp b/src/boost/libs/type_traits/test/is_class_test.cpp new file mode 100644 index 000000000..53f0ece03 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_class_test.cpp @@ -0,0 +1,69 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_class.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <iostream> + +TT_TEST_BEGIN(is_class) + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<const int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<volatile int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<int*>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<int* const>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<int[2]>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<int const[2]>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<int&&>::value, false); +#endif + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<mf4>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<f1>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<enum_UDT>::value, false); + +#if defined(BOOST_HAS_TYPE_TRAITS_INTRINSICS) && !defined(__sgi) + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<union_UDT>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<POD_union_UDT>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<empty_union_UDT>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<empty_POD_union_UDT>::value, false); +#else + std::cout << + "\n<note>\n" + "This compiler version does not provide support for is_class on\n" + "union types. Such support is not currently required by the\n" + "C++ Standard. It will be required to support the upcoming\n" + "Standard Library Technical Report.\n" + "</note>\n"; +#endif + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<UDT>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<UDT const>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<UDT volatile>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<empty_UDT>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<std::iostream>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<test_abc1>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<test_abc1 const>::value, true); + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<UDT*>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<UDT[2]>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<UDT&>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<void>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_complete_test.cpp b/src/boost/libs/type_traits/test/is_complete_test.cpp new file mode 100644 index 000000000..075e70d05 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_complete_test.cpp @@ -0,0 +1,55 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_complete.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_complete) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile*>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const[3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile[2][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile[4][5][6]>::value, true); +#ifdef BOOST_TT_HAS_WORKING_IS_COMPLETE +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int[]>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<enum_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<mf8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<test_abc1>::value, true); +#ifdef BOOST_TT_HAS_WORKING_IS_COMPLETE +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<incomplete_type>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<polymorphic_base>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<virtual_inherit6>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<foo0_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<foo4_t>::value, true); + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_complex_test.cpp b/src/boost/libs/type_traits/test/is_complex_test.cpp new file mode 100644 index 000000000..b764ca108 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_complex_test.cpp @@ -0,0 +1,54 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_complex.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <iostream> + +struct bad_struct +{ + operator std::complex<double> ()const; +}; + +struct derived_complex : public std::complex<double> +{ +}; + +TT_TEST_BEGIN(is_complex) + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<double>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<float>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<bad_struct>::value, false); + //BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<derived_complex>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<std::complex<long double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<std::complex<double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<std::complex<float> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<const std::complex<long double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<const std::complex<double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<const std::complex<float> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<const volatile std::complex<long double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<const volatile std::complex<double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<const volatile std::complex<float> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<volatile std::complex<long double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<volatile std::complex<double> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complex<volatile std::complex<float> >::value, true); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_compound_test.cpp b/src/boost/libs/type_traits/test/is_compound_test.cpp new file mode 100644 index 000000000..6d8c5bd63 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_compound_test.cpp @@ -0,0 +1,31 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_compound.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_compound) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<test_abc1>::value, true); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_const_test.cpp b/src/boost/libs/type_traits/test/is_const_test.cpp new file mode 100644 index 000000000..59b8214b1 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_const_test.cpp @@ -0,0 +1,49 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_const.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_const) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const void>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const test_abc1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const volatile UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<cr_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<volatile int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const volatile int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const volatile int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<volatile int[]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<const int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const<int[]>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_constructible_test.cpp b/src/boost/libs/type_traits/test/is_constructible_test.cpp new file mode 100644 index 000000000..92eab874c --- /dev/null +++ b/src/boost/libs/type_traits/test/is_constructible_test.cpp @@ -0,0 +1,83 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_constructible.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + + +struct non_copy_constructible +{ + non_copy_constructible(); + non_copy_constructible(int); + non_copy_constructible(double*, double*); +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + non_copy_constructible(const non_copy_constructible&) = delete; +#endif +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + non_copy_constructible(non_copy_constructible&&); +#endif +}; + + +struct A { }; +struct B : A { }; + +TT_TEST_BEGIN(is_constructible) + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B &&, A>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const &&, A>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const &&, A const>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B volatile &&, A>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B volatile &&, A volatile>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const volatile &&, A>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const volatile &&, A const>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const volatile &&, A volatile>::value) , false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const volatile &&, A const volatile>::value) , false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B&, A>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const &, A>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const &, A&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<B const &, A const>::value), false); + +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible, int>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible, int const>::value), true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible, int const&>::value), true, false); +#if !BOOST_WORKAROUND(BOOST_GCC, < 40500) +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible, non_copy_constructible>::value), true, false); +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible, double*, double*>::value), true, false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible, double const*, double*>::value), false); +#endif +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<non_copy_constructible, const non_copy_constructible&>::value), false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int, const int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int, const int&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int*, const int&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int*, const int*>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int*, int*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int*, int[2]>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int*, int[]>::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int(*)(int), int&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int(*)(int), int(*)(int)>::value), true); +#if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && BOOST_WORKAROUND(BOOST_GCC, < 40700)) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int(&)(int), int(int)>::value), true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int(int), int(int)>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_constructible<int(int), int(&)(int)>::value), false); + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_convertible_test.cpp b/src/boost/libs/type_traits/test/is_convertible_test.cpp new file mode 100644 index 000000000..92321db12 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_convertible_test.cpp @@ -0,0 +1,219 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_convertible.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <boost/type_traits/enable_if.hpp> + + +template <class T> +struct convertible_from +{ + convertible_from(T); +}; + +struct base2 { }; +struct middle2 : public virtual base2 { }; +struct derived2 : public middle2 { }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +template<typename T> +struct test_bug_4530 +{ + template<typename A> + test_bug_4530(A&&, typename boost::enable_if_< ::tt::is_convertible<A&&, T>::value >::type* =0); +}; + +struct A4530 +{ + template <class T> + A4530(T); +}; + +#endif + +#ifdef BOOST_MSVC + +struct bug_5271a +{ + __declspec(align(16)) int value; +}; + +struct bug_5271b +{ + __declspec(align(16)) int value; + bug_5271b(int v) : value(v) {} +}; + +#endif + +#if (defined(BOOST_TT_CXX11_IS_CONVERTIBLE) || defined(BOOST_IS_CONVERTIBLE)) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +struct bug9910 +{ + bug9910() = default; + bug9910(const bug9910&) = delete; // or private: A(const A&) = default; +}; +struct Ref_bug9910 +{ + // proxy reference to bug9910 + operator bug9910& () { return *_ptr; } + bug9910* _ptr; +}; +#endif + +TT_TEST_BEGIN(is_convertible) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Derived,Base>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Derived,Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Base,Base>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Base,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Derived,Derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<NonDerived,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<virtual_inherit2,virtual_inherit1>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<VD,VB>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<polymorphic_derived1,polymorphic_base>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<polymorphic_derived2,polymorphic_base>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<polymorphic_base,polymorphic_derived1>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<polymorphic_base,polymorphic_derived2>::value), false); +#ifndef TEST_STD +// Ill-formed behaviour, supported by Boost as an extension: +#ifndef BOOST_NO_IS_ABSTRACT +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<test_abc1,test_abc1>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Base,test_abc1>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<polymorphic_derived2,test_abc1>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int,test_abc1>::value), false); +#endif +#endif + +// The following four do not compile without member template support: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<void,void>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<void,float>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<enum1, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Derived*, Base*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Base*, Derived*>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Derived&, Base&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Base&, Derived&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const Derived*, const Base*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const Base*, const Derived*>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const Derived&, const Base&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const Base&, const Derived&>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const int *, int*>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const int&, int&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const int*, int[3]>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const int&, int>::value), true); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const int&&, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int&&, const int&>::value), true); +#if !defined(__GNUC__) || ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))) +// Machinary required to support this, not available prior to gcc-4.7.0: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int, int&>::value), false); +#endif +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(&)[4], const int*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(&)(int), int(*)(int)>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int *, const int*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int&, const int&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int[2], int*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int[2], const int*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const int[2], int*>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int*, int[3]>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<test_abc3, const test_abc1&>::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<non_pointer, void*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<non_pointer, int*>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<non_int_pointer, int*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<non_int_pointer, void*>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<test_abc1&, test_abc2&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<test_abc1&, int_constructible>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int_constructible, test_abc1&>::value), false); +#if !defined(BOOST_NO_IS_ABSTRACT) && !(defined(__hppa) && defined(__HP_aCC)) +// +// This doesn't work with aCC on PA RISC even though the is_abstract tests do +// all pass, this may indicate a deeper problem... +// +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<test_abc1&, test_abc2>::value), false); +#endif + +// +// the following tests all involve user defined conversions which do +// not compile with Borland C++ Builder 5: +// +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int, int_constructible>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,convertible_from<float> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,convertible_from<float const&> >::value), true); +// +// These two tests give different results with different compilers, we used to require *true* results +// from these, but C++0x behaviour requires *false*: +// +//BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,convertible_from<float&> >::value), false); +//BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<char,convertible_from<char&> >::value), false); + +#if !(defined(__GNUC__) && (__GNUC__ < 4)) +// GCC 3.x emits warnings here, which causes the tests to fail when we compile with warnings-as-errors: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,convertible_from<char> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,convertible_from<char const&> >::value), true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,convertible_from<char&> >::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<char,convertible_from<char> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<char,convertible_from<char const&> >::value), true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float&,convertible_from<float> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float const&,convertible_from<float> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float&,convertible_from<float&> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float const&,convertible_from<float const&> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float&,convertible_from<float const&> >::value), true); + +// +// the following all generate warnings unless we can find a way to +// suppress them: +// +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<float,int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<double,int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<double,float>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<long,int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int,char>::value), true); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<boost::long_long_type,int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<boost::long_long_type,char>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<boost::long_long_type,float>::value), true); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,char>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,float>::value), true); +#endif + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +// Test bug case 4530: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<test_bug_4530<A4530>,A4530>::value), true); +#endif + +#if defined(BOOST_MSVC) && (BOOST_MSVC > 1310) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int, bug_5271a>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int, bug_5271b>::value), true); +#endif + +#if (defined(BOOST_TT_CXX11_IS_CONVERTIBLE) || defined(BOOST_IS_CONVERTIBLE)) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +#ifndef _MSC_VER +// MSVC gives the wrong answer here, see https://connect.microsoft.com/VisualStudio/feedback/details/858956/std-is-convertible-returns-incorrect-value +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<Ref_bug9910, bug9910>::value), false); +#endif +// From https://svn.boost.org/trac/boost/ticket/9910#comment:2: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int, incomplete_type[]>::value), false); +#endif + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_copy_assignable_test.cpp b/src/boost/libs/type_traits/test/is_copy_assignable_test.cpp new file mode 100644 index 000000000..286d1a209 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_copy_assignable_test.cpp @@ -0,0 +1,222 @@ +// (C) Copyright John Maddock 2000. +// (C) Copyright Ion Gaztanaga 2014. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +//#define TEST_STD + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_copy_assignable.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#include <boost/move/core.hpp> + +struct has { + has(){} + has &operator=(const has&){ return *this; } +}; + +// MSVC can not generate neither default constructor, nor assignment operator, +// nor copy constructor for `has2` type. Suppressing those warnings is essential, +// because we treat warnings as errors in those tests +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 4512 4610) +#endif +struct has2 { + int i; + has2 &operator=(const int& val) { i = val; return *this; } +}; +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + +struct has3 { // Copy assignment must be generated by compiler + has3(has3*){} +}; + +struct has_not: public boost::noncopyable { + typedef boost::noncopyable base_t; + has_not() : base_t() {} +}; + +#if defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE) + +struct has_not2 { + has_not2() {} + has_not2& operator=(has_not2&) = delete; +}; + +struct has_not3 { + has_not3() {} + has_not3& operator=(const has_not3&) = delete; +}; + +#endif // BOOST_TT_CXX11_IS_COPY_ASSIGNABLE + +struct has_not4: private boost::noncopyable { + typedef boost::noncopyable base_t; + has_not4() : base_t() {} +private: + has_not4& operator=(const has_not4&); +}; + +struct has_not5 { +private: + BOOST_MOVABLE_BUT_NOT_COPYABLE(has_not5) +}; + +struct has_not6 { + has_not6& operator=(has_not6&){ return *this; } +}; + + +TT_TEST_BEGIN(is_copy_assignable) + +// Main part of the test +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has_not>::value, false); +#if defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has_not2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has_not3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has_not6>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has_not4>::value, false); + +// Requires some basic support from Boost.Move in C++03 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<has_not5>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<bool const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<bool const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<signed char const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<signed char const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<char const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<char const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<short const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<short const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long const volatile>::value, false); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::long_long_type const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable< ::boost::long_long_type const volatile>::value, false); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<float const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<float const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<double const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<double const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long double const>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<long double const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int*const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<const int&>::value, false); + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<const int&&>::value, false); +#endif + +// Following three tests may give different results because of compiler and C++03/C++11. +// On C++11 compiler following code: +// int c[2][4][5][6][3]; +// int b[2][4][5][6][3] = std::move(c); +// does not compile, so we expect `false` to be the result of those three tests. +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int[2]>::value, false, true); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int[3][2]>::value, false, true); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_copy_assignable<int[2][4][5][6][3]>::value, false, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<void>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<empty_POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<empty_POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<nothrow_copy_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<nothrow_assign_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_assignable<nothrow_construct_UDT>::value, true); + + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_copy_constructible_test.cpp b/src/boost/libs/type_traits/test/is_copy_constructible_test.cpp new file mode 100644 index 000000000..a176adb8c --- /dev/null +++ b/src/boost/libs/type_traits/test/is_copy_constructible_test.cpp @@ -0,0 +1,306 @@ +// (C) Copyright John Maddock 2000. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_copy_constructible.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#include <boost/move/core.hpp> + +struct has { + has(){} + has(const has&){} +}; + +// MSVC can not generate neither default constructor, nor assignment operator, +// nor copy constructor for `has2` type. Suppressing those warnings is essential, +// because we treat warnings as errors in those tests +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 4512 4610) +#endif +struct has2 { + const int& i; + explicit has2(const int& val) : i(val) {} +}; +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + +struct has3 { + has3(has3&){} +}; + + +struct has4 { // Copy constructor must be generated by compiler + has4(has4*){} +}; + +struct has_not: public boost::noncopyable { + typedef boost::noncopyable base_t; + has_not() : base_t() {} +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct has_not2 { + has_not2() {} + has_not2(has_not2&) = delete; +}; + +struct has_not3 { + has_not3() {} + has_not3(const has_not3&) = delete; +}; + +#endif // BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct has_not4: private boost::noncopyable { + typedef boost::noncopyable base_t; + has_not4() : base_t() {} +private: + has_not4(const has_not4&); +}; + +struct has_not5 { +private: + BOOST_MOVABLE_BUT_NOT_COPYABLE(has_not5) +}; + + +TT_TEST_BEGIN(is_copy_constructible) + +// Main part of the test +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has2>::value, true); +// Only constructible from has3& not from const-reference, this only works if we have decltype: +#if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has3>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has4>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has_not>::value, false); +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has_not2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has_not3>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has_not4>::value, false); + +// Requires some basic support from Boost.Move in C++03 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<has_not5>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<bool const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<bool const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<signed char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<signed char const volatile>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<char const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<short const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<short const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long const volatile>::value, true); +#endif + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::long_long_type const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible< ::boost::long_long_type const volatile>::value, true); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int8 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int8 const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int16 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int16 const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int32 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int32 const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int64 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<__int64 const volatile>::value, true); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<float const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<float const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<double const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<long double const volatile>::value, true); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int&>::value, true); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +// This is debatable, we used to insist this was true, but copy-constructibility +// implies copying a constant-object, and that isn't the case here: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<const int&>::value, true); + + +// Following three tests may give different results because of compiler and C++03/C++11. +// On C++11 compiler following code: +// int c[2][4][5][6][3]; +// int b[2][4][5][6][3] = std::move(c); +// does not compile, so we expect `false` to be the result of those three tests. +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int[2]>::value, false, true); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int[3][2]>::value, false, true); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_copy_constructible<int[2][4][5][6][3]>::value, false, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<void>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<empty_POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<empty_POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<nothrow_copy_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<nothrow_assign_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<nothrow_construct_UDT>::value, true); + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_NOEXCEPT) +// Copy constructor of nothrow_move_UDT is implicitly deleted because of user declared move constructor. +// Hovewer not all compilers implement that feature correctly. +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_copy_constructible<nothrow_move_UDT>::value, false, true); +#endif + +//TODO: What do we need to do in this situation? +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_copy_constructible<test_abc1>::value, true); + + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/is_default_constr_test.cpp b/src/boost/libs/type_traits/test/is_default_constr_test.cpp new file mode 100644 index 000000000..ba54e329f --- /dev/null +++ b/src/boost/libs/type_traits/test/is_default_constr_test.cpp @@ -0,0 +1,208 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_default_constructible.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +class bug11324_base +{ +public: + bug11324_base & operator=(const bug11324_base&){ throw int(); } + virtual ~bug11324_base() {} +}; + +class bug11324_derived : public bug11324_base +{ +public: + char data; + explicit bug11324_derived(char arg) : data(arg) {} +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct deleted_default_construct +{ + deleted_default_construct() = delete; + deleted_default_construct(char val) : member(val) {} + char member; +}; + +#endif + +struct private_default_construct +{ +private: + private_default_construct(); +public: + private_default_construct(char val) : member(val) {} + char member; +}; + +TT_TEST_BEGIN(is_default_constructible) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_default_constructible<UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_default_constructible<empty_UDT>::value, true, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<void>::value, false); +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_default_constructible<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_default_constructible<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_default_constructible<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_default_constructible<empty_POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_default_constructible<nothrow_construct_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<bug11324_derived>::value, false); +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<deleted_default_construct>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_default_constructible<std::pair<deleted_default_construct, int> >::value), false); +#endif +#if !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible<private_default_construct>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_default_constructible<std::pair<private_default_construct, int> >::value), false); +#endif + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_destructible_test.cpp b/src/boost/libs/type_traits/test/is_destructible_test.cpp new file mode 100644 index 000000000..290f1ae78 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_destructible_test.cpp @@ -0,0 +1,192 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_destructible.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) + +struct deleted_destruct +{ + deleted_destruct(); + ~deleted_destruct() = delete; +}; + +#endif + + +TT_TEST_BEGIN(is_destructible) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT const&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT const volatile&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT volatile&>::value, true); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT const&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT const volatile&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<enum_UDT volatile&&>::value, true); +#endif + +// +// These are commented out for now because it's not clear what the semantics should be: +// on the one hand references always have trivial destructors (in the sense that there is +// nothing to destruct), on the other hand the thing referenced may not have a trivial +// destructor, it really depends upon the users code as to what should happen here: +// +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int&>::value, false); +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<empty_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<void>::value, false); + +#if !(defined(BOOST_MSVC) && defined(CI_SUPPRESS_KNOWN_ISSUES) && (BOOST_MSVC < 1900)) +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_destructible<deleted_destruct>::value, false); +#endif +#endif + +TT_TEST_END + + + diff --git a/src/boost/libs/type_traits/test/is_detected_convertible.cpp b/src/boost/libs/type_traits/test/is_detected_convertible.cpp new file mode 100644 index 000000000..2a5ef2c1f --- /dev/null +++ b/src/boost/libs/type_traits/test/is_detected_convertible.cpp @@ -0,0 +1,49 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#include <boost/config.hpp> +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/is_detected_convertible.hpp> +#endif +#include "check_integral_constant.hpp" +#include "check_type.hpp" + +#define CHECK_FALSE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, false) +#define CHECK_TRUE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, true) + +template<class T> +using type_t = typename T::type; + +struct has_type { + using type = char; +}; + +struct no_type { }; + +TT_TEST_BEGIN(is_detected_convertible) + +CHECK_FALSE((::tt::is_detected_convertible<long, type_t, int>::value)); +CHECK_TRUE((::tt::is_detected_convertible<long, type_t, has_type>::value)); +CHECK_FALSE((::tt::is_detected_convertible<long, type_t, no_type>::value)); +#ifndef BOOST_NO_CXX14_VARIABLE_TEMPLATES +CHECK_FALSE((::tt::is_detected_convertible_v<long, type_t, int>)); +CHECK_TRUE((::tt::is_detected_convertible_v<long, type_t, has_type>)); +CHECK_FALSE((::tt::is_detected_convertible_v<long, type_t, no_type>)); +#endif + +TT_TEST_END +#else +int main() +{ + return 0; +} +#endif diff --git a/src/boost/libs/type_traits/test/is_detected_exact_test.cpp b/src/boost/libs/type_traits/test/is_detected_exact_test.cpp new file mode 100644 index 000000000..87a9ec192 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_detected_exact_test.cpp @@ -0,0 +1,49 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#include <boost/config.hpp> +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/is_detected_exact.hpp> +#endif +#include "check_integral_constant.hpp" +#include "check_type.hpp" + +#define CHECK_FALSE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, false) +#define CHECK_TRUE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, true) + +template<class T> +using type_t = typename T::type; + +struct has_type { + using type = char; +}; + +struct no_type { }; + +TT_TEST_BEGIN(is_detected_exact) + +CHECK_FALSE((::tt::is_detected_exact<char, type_t, int>::value)); +CHECK_TRUE((::tt::is_detected_exact<char, type_t, has_type>::value)); +CHECK_FALSE((::tt::is_detected_exact<char, type_t, no_type>::value)); +#ifndef BOOST_NO_CXX14_VARIABLE_TEMPLATES +CHECK_FALSE((::tt::is_detected_exact_v<char, type_t, int>)); +CHECK_TRUE((::tt::is_detected_exact_v<char, type_t, has_type>)); +CHECK_FALSE((::tt::is_detected_exact_v<char, type_t, no_type>)); +#endif + +TT_TEST_END +#else +int main() +{ + return 0; +} +#endif diff --git a/src/boost/libs/type_traits/test/is_detected_test.cpp b/src/boost/libs/type_traits/test/is_detected_test.cpp new file mode 100644 index 000000000..5a75b9eb1 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_detected_test.cpp @@ -0,0 +1,49 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#include <boost/config.hpp> +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/is_detected.hpp> +#endif +#include "check_integral_constant.hpp" +#include "check_type.hpp" + +#define CHECK_FALSE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, false) +#define CHECK_TRUE(e) BOOST_CHECK_INTEGRAL_CONSTANT(e, true) + +template<class T> +using type_t = typename T::type; + +struct has_type { + using type = char; +}; + +struct no_type { }; + +TT_TEST_BEGIN(is_detected) + +CHECK_FALSE((::tt::is_detected<type_t, int>::value)); +CHECK_TRUE((::tt::is_detected<type_t, has_type>::value)); +CHECK_FALSE((::tt::is_detected<type_t, no_type>::value)); +#ifndef BOOST_NO_CXX14_VARIABLE_TEMPLATES +CHECK_FALSE((::tt::is_detected_v<type_t, int>)); +CHECK_TRUE((::tt::is_detected_v<type_t, has_type>)); +CHECK_FALSE((::tt::is_detected_v<type_t, no_type>)); +#endif + +TT_TEST_END +#else +int main() +{ + return 0; +} +#endif diff --git a/src/boost/libs/type_traits/test/is_empty_test.cpp b/src/boost/libs/type_traits/test/is_empty_test.cpp new file mode 100644 index 000000000..1e95ea479 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_empty_test.cpp @@ -0,0 +1,54 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_empty.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +struct non_default_constructable_UDT +{ + non_default_constructable_UDT(const non_default_constructable_UDT&){} +private: + non_default_constructable_UDT(){} +}; + +TT_TEST_BEGIN(is_empty) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<mf1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<UDT>::value, false); + +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_empty<empty_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_empty<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_empty<non_default_constructable_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_empty<boost::noncopyable>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<enum_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<non_empty>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<const non_empty&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<foo4_t>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_enum_test.cpp b/src/boost/libs/type_traits/test/is_enum_test.cpp new file mode 100644 index 000000000..89e59e00c --- /dev/null +++ b/src/boost/libs/type_traits/test/is_enum_test.cpp @@ -0,0 +1,48 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_enum.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + +enum class test_enum +{ + a, b +}; + +#endif + +TT_TEST_BEGIN(is_enum) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<enum_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int_convertible>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<boost::noncopyable>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<test_abc1>::value, false); +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<test_enum>::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_final_test.cpp b/src/boost/libs/type_traits/test/is_final_test.cpp new file mode 100644 index 000000000..09ca160ac --- /dev/null +++ b/src/boost/libs/type_traits/test/is_final_test.cpp @@ -0,0 +1,96 @@ + +// Copyright (c) 2014 Agustin Berge +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_final.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <iostream> + +#if !defined(BOOST_NO_CXX11_FINAL) +template <class T> +struct final_template final +{}; +#endif +template <class T> +struct non_final_template +{}; + +TT_TEST_BEGIN(is_final) + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<const int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<volatile int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<int*>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<int* const>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<int[2]>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<int&&>::value, false); +#endif + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<mf4>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<f1>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<enum_UDT>::value, false); + +#if !defined(BOOST_NO_CXX11_FINAL) + // + // These are "soft" checks: since we cannot implement this trait + // ourselves and instead rely on the compiler. + // +# ifndef BOOST_IS_FINAL + BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_final<final_UDT>::value, true, false); + BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_final<final_UDT const>::value, true, false); + BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_final<final_template<int> >::value, true, false); + BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_final<final_template<int> const>::value, true, false); +# else + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<final_UDT>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<final_UDT const>::value, true); +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1800) + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<final_template<int> >::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<final_template<int> const>::value, true); +# endif +# endif +#else + std::cout << + "\n<note>\n" + "This compiler version does not provide support for is_final on\n" + "final types.n" + "</note>\n"; +#endif + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<UDT>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<UDT const>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<UDT volatile>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<empty_UDT>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<std::iostream>::value, false); + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<UDT*>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<UDT[2]>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<UDT&>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<void>::value, false); + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<test_abc1>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<foo0_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<foo1_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<foo2_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<foo3_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<foo4_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_final<non_final_template<int> >::value, false); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_float_test.cpp b/src/boost/libs/type_traits/test/is_float_test.cpp new file mode 100644 index 000000000..9100a282c --- /dev/null +++ b/src/boost/libs/type_traits/test/is_float_test.cpp @@ -0,0 +1,67 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_float.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_float) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<long double const volatile>::value, true); + +// +// cases that should not be true: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<const float&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<float[2]>::value, false); + +// +// tricky cases: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float<incomplete_type>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_floating_point_test.cpp b/src/boost/libs/type_traits/test/is_floating_point_test.cpp new file mode 100644 index 000000000..c9b15b03e --- /dev/null +++ b/src/boost/libs/type_traits/test/is_floating_point_test.cpp @@ -0,0 +1,74 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_floating_point.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_floating_point) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<long double const volatile>::value, true); + +#ifdef BOOST_HAS_FLOAT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<__float128>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<const __float128>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<volatile __float128>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<const volatile __float128>::value, true); +#endif + +// +// cases that should not be true: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<const float&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<float[2]>::value, false); + +// +// tricky cases: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<incomplete_type>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_function_test.cpp b/src/boost/libs/type_traits/test/is_function_test.cpp new file mode 100644 index 000000000..521de5939 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_function_test.cpp @@ -0,0 +1,163 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_function.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#if defined(BOOST_GCC) && (BOOST_GCC >= 70000) +#pragma GCC diagnostic ignored "-Wnoexcept-type" +#endif + +#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION + +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() && {} +}; + +template< class C, class F > void test_cv_qual(F C::*) +{ + BOOST_CHECK_INTEGRAL_CONSTANT(boost::is_function< F >::value, true); +} + +#endif + +TT_TEST_BEGIN(is_function) + +typedef void foo0_t(); +typedef void foo1_t(int); +typedef void foo2_t(int&, double); +typedef void foo3_t(int&, bool, int, int); +typedef void foo4_t(int, bool, int*, int[], int, int, int, int, int); +#if __cpp_noexcept_function_type +typedef int foo5_t(void)noexcept; +typedef int foo6_t(double)noexcept(false); +typedef int foo7_t(int, double)noexcept(true); +#endif +typedef double foo8_t(double...); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo0_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo1_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo2_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo3_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo4_t>::value, true); +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo5_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo6_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo7_t>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo8_t>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int>::value, false); +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int&&>::value, false); +#endif +#else +std::cout << +"<note>is_function will fail with some types (references for example)" +"if the compiler doesn't support partial specialisation of class templates." +"These are *not* tested here</note>" << std::endl; +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int[]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int (*)(int)>::value, false); + +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +typedef void __stdcall sfoo0_t(); +typedef void __stdcall sfoo1_t(int); +typedef void __stdcall sfoo2_t(int&, double); +typedef void __stdcall sfoo3_t(int&, bool, int, int); +typedef void __stdcall sfoo4_t(int, bool, int*, int[], int, int, int, int, int); + +typedef void __cdecl cfoo0_t(); +typedef void __cdecl cfoo1_t(int); +typedef void __cdecl cfoo2_t(int&, double); +typedef void __cdecl cfoo3_t(int&, bool, int, int); +typedef void __cdecl cfoo4_t(int, bool, int*, int[], int, int, int, int, int); + +#ifndef __CLR_VER +typedef void __fastcall ffoo0_t(); +typedef void __fastcall ffoo1_t(int); +typedef void __fastcall ffoo2_t(int&, double); +typedef void __fastcall ffoo3_t(int&, bool, int, int); +typedef void __fastcall ffoo4_t(int, bool, int*, int[], int, int, int, int, int); +#endif +#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +typedef void __vectorcall vfoo0_t(); +typedef void __vectorcall vfoo1_t(int); +typedef void __vectorcall vfoo2_t(int&, double); +typedef void __vectorcall vfoo3_t(int&, bool, int, int); +typedef void __vectorcall vfoo4_t(int, bool, int*, int[], int, int, int, int, int); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<sfoo0_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<sfoo1_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<sfoo2_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<sfoo3_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<sfoo4_t>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<cfoo0_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<cfoo1_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<cfoo2_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<cfoo3_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<cfoo4_t>::value, true); + +#ifndef __CLR_VER +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<ffoo0_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<ffoo1_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<ffoo2_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<ffoo3_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<ffoo4_t>::value, true); +#endif + +#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<vfoo0_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<vfoo1_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<vfoo2_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<vfoo3_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<vfoo4_t>::value, true); +#endif + +#endif + +#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION + +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 +test_cv_qual(&X::noexcept_f); +#endif +test_cv_qual(&X::ref_f); +test_cv_qual(&X::rvalue_f); + +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_fundamental_test.cpp b/src/boost/libs/type_traits/test/is_fundamental_test.cpp new file mode 100644 index 000000000..342859f41 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_fundamental_test.cpp @@ -0,0 +1,175 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_fundamental.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_fundamental) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<void>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<void const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<void volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<void const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<long double const volatile>::value, true); + +// +// cases that should not be true: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<const float&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<float[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<foo0_t>::value, false); + +#ifndef BOOST_NO_CXX11_CHAR16_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char16_t>::value, true); +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char32_t>::value, true); +#endif + +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<boost::int128_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<boost::uint128_type>::value, true); +#endif + +#ifdef BOOST_HAS_FLOAT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<boost::float128_type>::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_integral_test.cpp b/src/boost/libs/type_traits/test/is_integral_test.cpp new file mode 100644 index 000000000..8cbc403b5 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_integral_test.cpp @@ -0,0 +1,158 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_integral.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_integral) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<__int64 const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_INT128 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::uint128_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::int128_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::uint128_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::int128_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::uint128_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::int128_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::uint128_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<boost::int128_type const volatile>::value, true); + +#endif +// +// cases that should not be true: +// +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<float>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<incomplete_type>::value, false); + +#ifndef BOOST_NO_CXX11_CHAR16_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char16_t>::value, true); +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char32_t>::value, true); +#endif + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_list_constructible_test.cpp b/src/boost/libs/type_traits/test/is_list_constructible_test.cpp new file mode 100644 index 000000000..55414060a --- /dev/null +++ b/src/boost/libs/type_traits/test/is_list_constructible_test.cpp @@ -0,0 +1,121 @@ + +// Copyright 2017 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#if defined( __GNUC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 407) +#pragma GCC diagnostic ignored "-Wnarrowing" +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_list_constructible.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)\ + || BOOST_WORKAROUND(BOOST_GCC, < 40700) + +int main() {} + +#else + +#include <vector> + +struct X +{ + int a; + int b; +}; + +struct Y +{ + Y( int = 0, int = 0 ); +}; + +struct Z +{ + explicit Z( int = 0, int = 0 ); +}; + +struct V +{ + V( int&, int& ); +}; + +TT_TEST_BEGIN(is_list_constructible) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<int, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<int, int const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<int, int, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<int, char>::value), true); + +#if defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 4) +// g++ 4.x doesn't seem to disallow narrowing +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<int, float>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X, int const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X, int, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X, int const, int const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X, int, int, int>::value), false); + +#if defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 4) +// g++ 4.x doesn't seem to disallow narrowing +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X, float>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<X, int, float>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y, int const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y, int, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y, int const, int const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y, int, int, int>::value), false); + +#if defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 4) +// 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 +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y, float>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Y, int, float>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z, int const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z, int, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z, int const, int const>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z, int, int, int>::value), false); + +#if defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 4) +// 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 +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z, float>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<Z, int, float>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<V>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<V, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<V, int, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<V, int, int, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<V, int&, int&>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible<V, int const&, int const&>::value), false); + +TT_TEST_END + +#endif diff --git a/src/boost/libs/type_traits/test/is_lvalue_reference_test.cpp b/src/boost/libs/type_traits/test/is_lvalue_reference_test.cpp new file mode 100644 index 000000000..a1d21e2cf --- /dev/null +++ b/src/boost/libs/type_traits/test/is_lvalue_reference_test.cpp @@ -0,0 +1,56 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_lvalue_reference.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_lvalue_reference) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<int&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const int&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<volatile int &>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const volatile int &>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<r_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<cr_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<volatile UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const volatile UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<int (&)(int)>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<int (&)[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<volatile int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const volatile int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<bool>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<incomplete_type>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<int&&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<UDT&&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const UDT&&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<volatile UDT&&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<const volatile UDT&&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<int (&&)(int)>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference<int (&&)[2]>::value, false); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_member_func_test.cpp b/src/boost/libs/type_traits/test/is_member_func_test.cpp new file mode 100644 index 000000000..c26870b6f --- /dev/null +++ b/src/boost/libs/type_traits/test/is_member_func_test.cpp @@ -0,0 +1,98 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_member_function_pointer.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#if defined(BOOST_GCC) && (BOOST_GCC >= 70000) +#pragma GCC diagnostic ignored "-Wnoexcept-type" +#endif + +#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION +struct tricky_members +{ + void noexcept_proc()noexcept + {} + void const_ref_proc()const & + {} + void rvalue_proc()&& + {} +}; + +template <class T> +void test_tricky(T) +{ + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<T>::value, true); +} +#endif + +TT_TEST_BEGIN(is_member_function_pointer) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<f2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<f3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<void*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf4>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mp>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const int[2] >::value, false); + +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf5>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf6>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf7>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<mf8>::value, true); + +#ifndef __IBMCPP__ +// this test may not be strictly legal: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const int[] >::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<void>::value, false); + +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS + +typedef void (__stdcall test_abc1::*scall_proc)(); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<scall_proc>::value, true); +#ifndef __CLR_VER +typedef void (__fastcall test_abc1::*fcall_proc)(int); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<fcall_proc>::value, true); +#endif +typedef void (__cdecl test_abc1::*ccall_proc)(int, long, double); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<ccall_proc>::value, true); +#if (_MSC_VER >= 1800) && !defined(__CLR_VER) && (defined(_M_IX86_FP) && (_M_IX86_FP >= 2) || defined(_M_X64)) +typedef void(__vectorcall test_abc1::*vcall_proc)(int, long, double, double, double, double); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<vcall_proc>::value, true); +#endif +typedef void(__thiscall test_abc1::*tcall_proc)(int, long, double, double, double, double); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<tcall_proc>::value, true); + +#endif + +#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION +test_tricky(&tricky_members::const_ref_proc); +#ifndef BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +test_tricky(&tricky_members::noexcept_proc); +#endif +test_tricky(&tricky_members::rvalue_proc); +#endif + +TT_TEST_END + + diff --git a/src/boost/libs/type_traits/test/is_member_obj_test.cpp b/src/boost/libs/type_traits/test/is_member_obj_test.cpp new file mode 100644 index 000000000..f8b74fad0 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_member_obj_test.cpp @@ -0,0 +1,42 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_member_object_pointer.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +typedef const double (UDT::*mp2) ; + +TT_TEST_BEGIN(is_member_object_pointer) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<f2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<f3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<void*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<mf1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<mf2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<mf3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<mf4>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<cmf>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<mp2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<foo0_t>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_member_pointer_test.cpp b/src/boost/libs/type_traits/test/is_member_pointer_test.cpp new file mode 100644 index 000000000..e83934e32 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_member_pointer_test.cpp @@ -0,0 +1,50 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_member_pointer.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_member_pointer) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<void*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf4>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<foo0_t>::value, false); + +#ifdef BOOST_TT_TEST_MS_FUNC_SIGS +typedef void (__stdcall test_abc1::*scall_proc)(); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<scall_proc>::value, true); +#ifndef __CLR_VER +typedef void (__fastcall test_abc1::*fcall_proc)(int); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<fcall_proc>::value, true); +#endif +typedef void (__cdecl test_abc1::*ccall_proc)(int, long, double); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<ccall_proc>::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_noncopyable_test.cpp b/src/boost/libs/type_traits/test/is_noncopyable_test.cpp new file mode 100644 index 000000000..57d41d594 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_noncopyable_test.cpp @@ -0,0 +1,46 @@ + +// (C) Copyright John Maddock 2000. +// (C) Copyright Peter Dimov 2018. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_noncopyable.hpp> +#endif +#include <boost/core/noncopyable.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" + +struct X +{ +}; + +class Y: private boost::noncopyable +{ +}; + +class Z: private Y +{ +}; + +TT_TEST_BEGIN(is_noncopyable) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<const void>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<const int>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<X>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<const X>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<Y>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<const Y>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<Z>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_noncopyable<const Z>::value, true); + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/is_nothrow_move_assignable_test.cpp b/src/boost/libs/type_traits/test/is_nothrow_move_assignable_test.cpp new file mode 100644 index 000000000..6c5492151 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_nothrow_move_assignable_test.cpp @@ -0,0 +1,265 @@ + +// (C) Copyright John Maddock 2000. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/config.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" + +#if !((defined(BOOST_MSVC) || BOOST_WORKAROUND(BOOST_GCC, < 40700)) && defined(BOOST_TT_DISABLE_INTRINSICS) && defined(CI_SUPPRESS_KNOWN_ISSUES)) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_nothrow_move_assignable.hpp> +#endif + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct non_assignable +{ + non_assignable(); + non_assignable& operator=(const non_assignable&) = delete; +}; + +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +struct noexcept_assignable +{ + noexcept_assignable(); + noexcept_assignable& operator=(const non_assignable&)noexcept; +}; + +struct noexcept_move_assignable +{ + noexcept_move_assignable(); + noexcept_move_assignable& operator=(const noexcept_move_assignable&); + noexcept_move_assignable& operator=(noexcept_move_assignable&&)noexcept; +}; + +#endif + +TT_TEST_BEGIN(is_nothrow_move_assignable) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<short const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long const volatile>::value, false); +#endif + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int8 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int16 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int32 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<float const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<void*>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int*const>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<const int&>::value, false); +#if !(defined(BOOST_MSVC) && defined(CI_SUPPRESS_KNOWN_ISSUES) && (BOOST_MSVC < 1910)) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<int[2][4][5][6][3]>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<void>::value, false); +#if (!defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)) || defined(BOOST_IS_NOTHROW_MOVE_ASSIGN) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_assign_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_move_UDT>::value, true); +#else +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<empty_POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_assign_UDT>::value, true, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_copy_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<nothrow_construct_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<non_assignable>::value, false); +#endif +#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC, < 40700) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<noexcept_assignable>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable<noexcept_move_assignable>::value, true); +#endif + +TT_TEST_END + +#else + +int main() { return 0; } + +#endif + diff --git a/src/boost/libs/type_traits/test/is_nothrow_move_constructible_test.cpp b/src/boost/libs/type_traits/test/is_nothrow_move_constructible_test.cpp new file mode 100644 index 000000000..5f5d5b841 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_nothrow_move_constructible_test.cpp @@ -0,0 +1,278 @@ + +// (C) Copyright John Maddock 2000. +// (C) Copyright Antony Polukhin 2013. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include "test.hpp" +#include <boost/config.hpp> + +#if !(defined(BOOST_MSVC) && defined(BOOST_TT_DISABLE_INTRINSICS) && defined(CI_SUPPRESS_KNOWN_ISSUES)) + +#include "check_integral_constant.hpp" +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_nothrow_move_constructible.hpp> +#endif + +struct non_copy +{ + non_copy(); +private: + non_copy(const non_copy&); +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct delete_copy +{ + delete_copy(); + delete_copy(const delete_copy&) = delete; +}; + +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +struct noexcept_copy +{ + noexcept_copy(); + noexcept_copy(const noexcept_copy&)noexcept; +}; + +struct noexcept_move +{ + noexcept_move(); + noexcept_move(const noexcept_move&); + noexcept_move(noexcept_move&&)noexcept; +}; + +#endif + +TT_TEST_BEGIN(is_nothrow_move_constructible) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<bool const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<signed char const volatile>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<char const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<short const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long const volatile>::value, false); +#endif + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible< ::boost::long_long_type const volatile>::value, false); +#endif +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int8 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int16 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int32 const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64 const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<__int64 const volatile>::value, false); +#endif +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<float const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double const>::value, true); +#ifndef TEST_STD +// unspecified behaviour: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<long double const volatile>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int&>::value, true); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int&&>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<const int&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<void>::value, false); +#if (!defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR)) || defined(BOOST_IS_NOTHROW_MOVE_CONSTRUCT) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_union_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_union_UDT>::value, true); +#if !defined(BOOST_GCC) || (BOOST_GCC >= 40800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_copy_UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_move_UDT>::value, true); +#endif +#else +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<empty_POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_copy_UDT>::value, true, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_assign_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<nothrow_construct_UDT>::value, false); +#if !defined(BOOST_GCC) || (BOOST_GCC >= 40700) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<test_abc1>::value, false); +#endif + +#if !defined(BOOST_GCC) || (BOOST_GCC >= 40800) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<non_copy>::value, false); +#endif + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<delete_copy>::value, false); +#endif + +#if !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<noexcept_copy>::value, true); +#if !defined(BOOST_GCC) || (BOOST_GCC >= 40800) +// Test fails on gcc 4.7.x: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible<noexcept_move>::value, true); +#endif +#endif + +TT_TEST_END + +#else + +int main() { return 0; } + +#endif + diff --git a/src/boost/libs/type_traits/test/is_nothrow_swappable_test.cpp b/src/boost/libs/type_traits/test/is_nothrow_swappable_test.cpp new file mode 100644 index 000000000..a23089697 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_nothrow_swappable_test.cpp @@ -0,0 +1,162 @@ + +// Copyright 2017 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_nothrow_swappable.hpp> +#endif + +#include <boost/config.hpp> + +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <utility> + +struct X +{ +}; + +struct Y +{ + Y( Y const& ) {} +}; + +struct Z +{ + Z& operator=( Z const& ) { return *this; } +}; + +struct V +{ + V( V const& ) {} + V& operator=( V const& ) { return *this; } +}; + +void swap( V&, V& ) BOOST_NOEXCEPT {} + +struct U +{ +}; + +void swap(U&, U&) {} + +TT_TEST_BEGIN(is_nothrow_swappable) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const volatile>::value, false); + +#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \ + || BOOST_WORKAROUND(BOOST_GCC, < 40700)\ + || (defined(__GLIBCXX__) && __GLIBCXX__ <= 20120301) // built-in clang++ -std=c++11 on Travis, w/ libstdc++ 4.6 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int volatile[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const volatile[2]>::value, false); +#else +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int volatile[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<int const volatile[2]>::value, false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<void const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<void volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<void const volatile>::value, false); + +#if defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_NO_CXX11_NOEXCEPT) || defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \ + || BOOST_WORKAROUND(BOOST_GCC, < 40700)\ + || (defined(__GLIBCXX__) && __GLIBCXX__ <= 20120301) // built-in clang++ -std=c++11 on Travis, w/ libstdc++ 4.6 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X volatile[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const volatile[2]>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U const volatile>::value, false); + +#else + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X volatile[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<X const volatile[2]>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y const[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y volatile[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Y const volatile[2]>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z const[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z volatile[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<Z const volatile[2]>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V const[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V volatile[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<V const volatile[2]>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_swappable<U const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<X, int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<X, int> const>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<X, int> volatile>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<X, int> const volatile>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<Y, int> >::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<Y, int> const>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<Y, int> volatile>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<Y, int> const volatile>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<V, int> >::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<V, int> const>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<V, int> volatile>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_nothrow_swappable<std::pair<V, int> const volatile>::value), false); + +#endif + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/is_object_test.cpp b/src/boost/libs/type_traits/test/is_object_test.cpp new file mode 100644 index 000000000..027a04b9b --- /dev/null +++ b/src/boost/libs/type_traits/test/is_object_test.cpp @@ -0,0 +1,38 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_object.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_object) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<test_abc1>::value, true); +// this one is only partly correct: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object<incomplete_type>::value, true); + + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_pod_test.cpp b/src/boost/libs/type_traits/test/is_pod_test.cpp new file mode 100644 index 000000000..54f0d511d --- /dev/null +++ b/src/boost/libs/type_traits/test/is_pod_test.cpp @@ -0,0 +1,197 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_pod.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_pod) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int[3][2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int[2][4][5][6][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<void>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<test_abc1>::value, false); + +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_pod<empty_POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_pod<POD_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_pod<POD_union_UDT>::value, true, false); +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_pod<empty_POD_union_UDT>::value, true, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<trivial_except_copy>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<trivial_except_destroy>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<trivial_except_assign>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<trivial_except_construct>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<wrap<trivial_except_copy> >::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<wrap<trivial_except_assign> >::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<wrap<trivial_except_destroy> >::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<wrap<trivial_except_construct> >::value, false); + +#ifndef BOOST_NO_CXX11_CHAR16_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char16_t>::value, true); +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char32_t>::value, true); +#endif + +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<boost::int128_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<boost::uint128_type>::value, true); +#endif + +#ifdef BOOST_HAS_FLOAT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<boost::float128_type>::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_pointer_test.cpp b/src/boost/libs/type_traits/test/is_pointer_test.cpp new file mode 100644 index 000000000..d38e12802 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_pointer_test.cpp @@ -0,0 +1,65 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_pointer.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_pointer) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<const int*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<volatile int*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<non_pointer*>::value, true); + // these were false in previous versions (JM 20 Dec 2000): +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int*volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int*const volatile>::value, true); + // JM 02 Oct 2000: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<non_pointer>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int*&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int(&)[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<char[sizeof(void*)]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<void>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<f3>::value, true); + // Steve: was 'true', should be 'false', via 3.9.2p3 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<mf1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<mf2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<mf3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<mf4>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<test_abc1>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int(*const)()>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<test_abc1>::value, false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_polymorphic_test.cpp b/src/boost/libs/type_traits/test/is_polymorphic_test.cpp new file mode 100644 index 000000000..a606af89b --- /dev/null +++ b/src/boost/libs/type_traits/test/is_polymorphic_test.cpp @@ -0,0 +1,100 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_polymorphic.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#include <exception> +#include <new> +#include <stdexcept> + +#if defined(BOOST_WINDOWS) && !defined(BOOST_DISABLE_WIN32) +#include <windows.h> // more things to test +#endif + +#if defined(BOOST_MSVC) && (_MSC_VER >= 1700) +#pragma warning(disable:4250) +#endif + +// this test was added to check for bug reported on 21 May 2003: +struct poly_bug { virtual int foo() = 0; }; + +TT_TEST_BEGIN(is_polymorphic) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<volatile int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<int* const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<mf4>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<enum_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<empty_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<UDT*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<UDT[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<UDT&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<void>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<VB>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<VD>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<test_abc1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<test_abc2>::value, true); +#ifndef BOOST_NO_STD_LOCALE +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::iostream>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::basic_streambuf<char> >::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::basic_ios<char> >::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::basic_istream<char> >::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::basic_streambuf<char> >::value, true); +// some libraries don't make this one a polymorphic class, since this is a library +// rather than a type traits issue we won't test this for now... +//BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::ios_base>::value, true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::exception>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::bad_alloc>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::runtime_error>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::out_of_range>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<std::range_error>::value, true); + +#if defined(BOOST_WINDOWS) && !defined(BOOST_DISABLE_WIN32) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<IUnknown>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<ITypeInfo>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<ITypeComp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<IDispatch>::value, true); +#endif + +// +// this test was added to check for bug reported on 21 May 2003: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<poly_bug>::value, true); + +#ifndef BOOST_NO_CXX11_FINAL +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic < final_UDT >::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<polymorphic_derived_final>::value, true); +#endif + +TT_TEST_END + + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_reference_test.cpp b/src/boost/libs/type_traits/test/is_reference_test.cpp new file mode 100644 index 000000000..39468ba74 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_reference_test.cpp @@ -0,0 +1,55 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_reference.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_reference) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const int&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<volatile int &>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const volatile int &>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<r_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<cr_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<volatile UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const volatile UDT&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int (&)(int)>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int (&)[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<volatile int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const volatile int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<bool>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<incomplete_type>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<volatile UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<const volatile UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int (&&)[2]>::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_rvalue_reference_test.cpp b/src/boost/libs/type_traits/test/is_rvalue_reference_test.cpp new file mode 100644 index 000000000..c4e95be40 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_rvalue_reference_test.cpp @@ -0,0 +1,54 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_rvalue_reference.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_rvalue_reference) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<volatile int &>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const volatile int &>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<r_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<cr_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<UDT&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const UDT&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<volatile UDT&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const volatile UDT&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&)[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<volatile int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const volatile int [2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<bool>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<incomplete_type>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<volatile UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<const volatile UDT&&>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&&)[2]>::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_same_test.cpp b/src/boost/libs/type_traits/test/is_same_test.cpp new file mode 100644 index 000000000..396f6c305 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_same_test.cpp @@ -0,0 +1,43 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_same.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_same) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int&, int&>::value), true); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int&&, int&&>::value), true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, const int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int&>::value), false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int&&>::value), false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<const int, int&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, const int&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int*, const int*>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int*, int*const>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int, int[2]>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int*, int[2]>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<int[4], int[2]>::value), false); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_scalar_test.cpp b/src/boost/libs/type_traits/test/is_scalar_test.cpp new file mode 100644 index 000000000..c4c4d1dbf --- /dev/null +++ b/src/boost/libs/type_traits/test/is_scalar_test.cpp @@ -0,0 +1,177 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_scalar.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_scalar) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<bool>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<bool const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<bool volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<bool const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<signed char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<signed char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<signed char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned char const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<short const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<short volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned short const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<short const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned int const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned long const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long const volatile>::value, true); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::ulong_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::long_long_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::ulong_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::long_long_type const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::ulong_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::long_long_type volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::ulong_long_type const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar< ::boost::long_long_type const volatile>::value, true); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int8>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int8 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int8 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int8 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int8 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int16>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int16 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int16 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int16 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int16 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int32>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int32 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int32 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int32 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int32 const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int64>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int64 const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int64 volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<unsigned __int64 const volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<__int64 const volatile>::value, true); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<float>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<float const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<float volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<float const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<double const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long double>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long double const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long double volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<long double const volatile>::value, true); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<void*>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int*const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<f2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<f3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<mf1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<mf2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<cmf>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<enum_UDT>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<test_abc1>::value, false); + +#ifndef BOOST_NO_CXX11_CHAR16_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char16_t>::value, true); +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char32_t>::value, true); +#endif + +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<boost::int128_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<boost::uint128_type>::value, true); +#endif + +#ifdef BOOST_HAS_FLOAT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<boost::float128_type>::value, true); +#endif + + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_signed_test.cpp b/src/boost/libs/type_traits/test/is_signed_test.cpp new file mode 100644 index 000000000..7ee762f53 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_signed_test.cpp @@ -0,0 +1,66 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_signed.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#include <climits> + +TT_TEST_BEGIN(is_signed) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<signed char>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<unsigned int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<unsigned long>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<unsigned short>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<unsigned char>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<int[2]>::value, false); + +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<boost::int128_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<boost::uint128_type>::value, false); +#endif + +#if defined(CHAR_MIN) +#if CHAR_MIN != 0 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<char>::value, true); +#else +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<char>::value, false); +#endif +#endif + + +#if defined(WCHAR_MIN) +#if WCHAR_MIN != 0 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<wchar_t>::value, true); +#else +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<wchar_t>::value, false); +#endif +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_stateless_test.cpp b/src/boost/libs/type_traits/test/is_stateless_test.cpp new file mode 100644 index 000000000..805c921df --- /dev/null +++ b/src/boost/libs/type_traits/test/is_stateless_test.cpp @@ -0,0 +1,168 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_stateless.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_stateless) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<bool>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<bool const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<bool volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<bool const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<signed char>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<signed char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<signed char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<signed char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned char>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<char>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<char const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<char volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned char const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<char const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned short>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<short>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<short const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<short volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned short const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<short const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned int const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned long>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned long const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long const volatile>::value, false); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::ulong_long_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::long_long_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::long_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless< ::boost::long_long_type const volatile>::value, false); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int8>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int8>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int8 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int8 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int16>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int16>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int16 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int16 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int32>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int32>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int32 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int32 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int64>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int64>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<unsigned __int64 const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<__int64 const volatile>::value, false); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<float>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<float const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<float volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<float const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<double>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<double const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long double>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long double const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long double volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<long double const volatile>::value, false); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<void*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int*const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<f2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<f3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<mf1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<mf2>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<mf3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<mp>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<cmf>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<enum_UDT>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int[3][2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int[2][4][5][6][3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<void>::value, false); + +// cases we would like to succeed but can't implement in the language: +BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::is_stateless<empty_POD_UDT>::value, true, false); + + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_unbounded_array_test.cpp b/src/boost/libs/type_traits/test/is_unbounded_array_test.cpp new file mode 100644 index 000000000..262a6bb83 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_unbounded_array_test.cpp @@ -0,0 +1,35 @@ +/* +Copyright 2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/is_unbounded_array.hpp> +#endif +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_unbounded_array) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<const int[3]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<const volatile int[4]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int[5][6]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<const int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<const volatile int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int[][7]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int(&)[8]>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unbounded_array<int(&&)[9]>::value, false); +#endif + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/is_union_test.cpp b/src/boost/libs/type_traits/test/is_union_test.cpp new file mode 100644 index 000000000..ee960f85a --- /dev/null +++ b/src/boost/libs/type_traits/test/is_union_test.cpp @@ -0,0 +1,79 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_union.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <iostream> + +TT_TEST_BEGIN(is_union) + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<const int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<volatile int>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<int*>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<int* const>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<int[2]>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<int&&>::value, false); +#endif + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<mf4>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<f1>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<enum_UDT>::value, false); + +#if defined(BOOST_HAS_TYPE_TRAITS_INTRINSICS) && !defined(__sgi) + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<union_UDT>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<POD_union_UDT>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<empty_union_UDT>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<empty_POD_union_UDT>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<union_UDT const>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<POD_union_UDT volatile>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<empty_union_UDT const volatile>::value, true); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<empty_POD_union_UDT const>::value, true); +#else + std::cout << + "\n<note>\n" + "This compiler version does not provide support for is_union on\n" + "union types. Such support is not currently required by the\n" + "C++ Standard. It will be required to support the upcoming\n" + "Standard Library Technical Report.\n" + "</note>\n"; +#endif + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<UDT>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<UDT const>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<UDT volatile>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<empty_UDT>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<std::iostream>::value, false); + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<UDT*>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<UDT[2]>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<UDT&>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<void>::value, false); + + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<test_abc1>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<foo0_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<foo1_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<foo2_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<foo3_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<foo4_t>::value, false); + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<incomplete_type>::value, false); + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_unsigned_test.cpp b/src/boost/libs/type_traits/test/is_unsigned_test.cpp new file mode 100644 index 000000000..2ea8024c6 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_unsigned_test.cpp @@ -0,0 +1,66 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_unsigned.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#include <climits> + +TT_TEST_BEGIN(is_signed) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<long>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<short>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<signed char>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned long>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned short>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned char>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned&&>::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned[2]>::value, false); + +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<boost::int128_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<boost::uint128_type>::value, true); +#endif + +#if defined(CHAR_MIN) +#if CHAR_MIN != 0 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<char>::value, false); +#else +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<char>::value, true); +#endif +#endif + + +#if defined(WCHAR_MIN) +#if WCHAR_MIN != 0 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<wchar_t>::value, false); +#else +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<wchar_t>::value, true); +#endif +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/is_virtual_base_of_test.cpp b/src/boost/libs/type_traits/test/is_virtual_base_of_test.cpp new file mode 100644 index 000000000..4b77b458b --- /dev/null +++ b/src/boost/libs/type_traits/test/is_virtual_base_of_test.cpp @@ -0,0 +1,147 @@ + +// (C) Copyright John Maddock 2009. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + +#include <boost/type_traits/is_virtual_base_of.hpp> +#include "test.hpp" +#include "check_integral_constant.hpp" + +// for bug report 3317: https://svn.boost.org/trac/boost/ticket/3317 +class B +{ +public: + B(); + virtual ~B()throw(); +}; + +class D : public B +{ +public: + D(); + virtual ~D()throw(); +}; + +// for bug report 4453: https://svn.boost.org/trac/boost/ticket/4453 +class non_virtual_base +{ +public: + non_virtual_base(); +}; +class non_virtual_derived : public non_virtual_base +{ +public: + non_virtual_derived(); + virtual int Y(); + virtual int X(); +}; + +// +// These are from https://svn.boost.org/trac/boost/ticket/11309 +// +struct bug11309_A { int a; }; +struct bug11309_B : public virtual bug11309_A {}; +struct bug11309_C : public bug11309_A { virtual ~bug11309_C() {} }; + +struct bug11323_A { virtual void foo() {} }; +struct bug11323_B : public virtual bug11323_A { virtual void foo() {} }; +struct bug11323_C : public bug11323_B {}; + +#ifndef BOOST_NO_CXX11_FINAL + +struct bug11323_2A { virtual void foo() = 0; }; +struct bug11323_2B : public virtual bug11323_2A { void foo() override {} }; +struct bug11323_2C : public bug11323_2B {}; + + +class final_non_virtual_derived final : public non_virtual_base +{ +public: + final_non_virtual_derived(); + virtual int Y(); + virtual int X(); +}; + +class final_virtual_derived final : public virtual non_virtual_base +{ +public: + final_virtual_derived(); + virtual int Y(); + virtual int X(); +}; + +#endif + +class protected_virtual_derived : protected virtual non_virtual_base +{ +public: + protected_virtual_derived(); + virtual int Y(); + virtual int X(); +}; + +class private_virtual_derived : private virtual non_virtual_base +{ +public: + private_virtual_derived(); + virtual int Y(); + virtual int X(); +}; + +TT_TEST_BEGIN(is_virtual_base_of) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Derived,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Derived,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,MultiBase>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Derived,MultiBase>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Derived2,MultiBase>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,PrivateBase>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<NonDerived,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,const void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<void,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<const void,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<int, int>::value), false); // really it is!!!!! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<const int, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<VB,VD>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<VD,VB>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<test_abc1,test_abc3>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<test_abc3,test_abc1>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,virtual_inherit1>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit1,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,virtual_inherit2>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit2,Base>::value), false); +#ifndef BOOST_BROKEN_IS_BASE_AND_DERIVED +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,virtual_inherit3>::value), true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit3,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<boost::noncopyable,virtual_inherit4>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit4,boost::noncopyable>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<int_convertible,virtual_inherit5>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit5,int_convertible>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,virtual_inherit6>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit6,Base>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<B,D>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<non_virtual_base,non_virtual_derived>::value), false); +// +// Bug cases: +// +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<bug11309_A, bug11309_C>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<bug11309_A, bug11309_B>::value), true); +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_CXX11_NULLPTR) && !BOOST_WORKAROUND(BOOST_GCC, < 40800) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<bug11323_B, bug11323_C>::value), false); +#ifndef BOOST_NO_CXX11_FINAL +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<bug11323_2B, bug11323_2C>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<non_virtual_base, final_non_virtual_derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<non_virtual_base, final_virtual_derived>::value), true); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<non_virtual_base, protected_virtual_derived>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<non_virtual_base, private_virtual_derived>::value), true); +#endif + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_void_test.cpp b/src/boost/libs/type_traits/test/is_void_test.cpp new file mode 100644 index 000000000..d9421d5d6 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_void_test.cpp @@ -0,0 +1,37 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_void.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_void) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<void>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<void const>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<void volatile>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<void const volatile>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<void*>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<int&&>::value, false); +#endif + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/is_volatile_test.cpp b/src/boost/libs/type_traits/test/is_volatile_test.cpp new file mode 100644 index 000000000..f27453463 --- /dev/null +++ b/src/boost/libs/type_traits/test/is_volatile_test.cpp @@ -0,0 +1,50 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_volatile.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(is_volatile) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<void>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile void>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<test_abc1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile test_abc1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<int>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile int>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile const UDT>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<const int[2]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<const volatile int[2]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<const volatile int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<const int[]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<int[]>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile int&>::value, false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<int&&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile<volatile int&&>::value, false); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/make_signed_test.cpp b/src/boost/libs/type_traits/test/make_signed_test.cpp new file mode 100644 index 000000000..84900461a --- /dev/null +++ b/src/boost/libs/type_traits/test/make_signed_test.cpp @@ -0,0 +1,111 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/make_signed.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(make_signed) +// signed types: +BOOST_CHECK_TYPE(::tt::make_signed<signed char>::type, signed char); +BOOST_CHECK_TYPE(::tt::make_signed<short>::type, short); +BOOST_CHECK_TYPE(::tt::make_signed<int>::type, int); +BOOST_CHECK_TYPE(::tt::make_signed<long>::type, long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<boost::long_long_type>::type, boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<__int64>::type, __int64); +#endif +// const signed types: +BOOST_CHECK_TYPE(::tt::make_signed<const signed char>::type, const signed char); +BOOST_CHECK_TYPE(::tt::make_signed<const short>::type, const short); +BOOST_CHECK_TYPE(::tt::make_signed<const int>::type, const int); +BOOST_CHECK_TYPE(::tt::make_signed<const long>::type, const long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<const boost::long_long_type>::type, const boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<const __int64>::type, const __int64); +#endif +// volatile signed types: +BOOST_CHECK_TYPE(::tt::make_signed<volatile signed char>::type, volatile signed char); +BOOST_CHECK_TYPE(::tt::make_signed<volatile short>::type, volatile short); +BOOST_CHECK_TYPE(::tt::make_signed<volatile int>::type, volatile int); +BOOST_CHECK_TYPE(::tt::make_signed<volatile long>::type, volatile long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<volatile boost::long_long_type>::type, volatile boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<volatile __int64>::type, volatile __int64); +#endif +// const volatile signed types: +BOOST_CHECK_TYPE(::tt::make_signed<const volatile signed char>::type, const volatile signed char); +BOOST_CHECK_TYPE(::tt::make_signed<const volatile short>::type, const volatile short); +BOOST_CHECK_TYPE(::tt::make_signed<const volatile int>::type, const volatile int); +BOOST_CHECK_TYPE(::tt::make_signed<const volatile long>::type, const volatile long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<const volatile boost::long_long_type>::type, const volatile boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<const volatile __int64>::type, const volatile __int64); +#endif + +// unsigned types: +BOOST_CHECK_TYPE(::tt::make_signed<unsigned char>::type, signed char); +BOOST_CHECK_TYPE(::tt::make_signed<unsigned short>::type, short); +BOOST_CHECK_TYPE(::tt::make_signed<unsigned int>::type, int); +BOOST_CHECK_TYPE(::tt::make_signed<unsigned long>::type, long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<boost::ulong_long_type>::type, boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<unsigned __int64>::type, __int64); +#endif +// const unsigned types: +BOOST_CHECK_TYPE(::tt::make_signed<const unsigned char>::type, const signed char); +BOOST_CHECK_TYPE(::tt::make_signed<const unsigned short>::type, const short); +BOOST_CHECK_TYPE(::tt::make_signed<const unsigned int>::type, const int); +BOOST_CHECK_TYPE(::tt::make_signed<const unsigned long>::type, const long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<const boost::ulong_long_type>::type, const boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<const unsigned __int64>::type, const __int64); +#endif +// volatile unsigned types: +BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned char>::type, volatile signed char); +BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned short>::type, volatile short); +BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned int>::type, volatile int); +BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned long>::type, volatile long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<volatile boost::ulong_long_type>::type, volatile boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned __int64>::type, volatile __int64); +#endif +// const volatile unsigned types: +BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned char>::type, const volatile signed char); +BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned short>::type, const volatile short); +BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned int>::type, const volatile int); +BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned long>::type, const volatile long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_signed<const volatile boost::ulong_long_type>::type, const volatile boost::long_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned __int64>::type, const volatile __int64); +#endif +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_TYPE(::tt::make_signed<boost::int128_type>::type, boost::int128_type); +BOOST_CHECK_TYPE(::tt::make_signed<boost::uint128_type>::type, boost::int128_type); +#endif + +// character types: +BOOST_CHECK_TYPE(::tt::make_signed<char>::type, signed char); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_signed<wchar_t>::type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed< ::tt::make_signed<wchar_t>::type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_signed<enum_UDT>::type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed< ::tt::make_signed<enum_UDT>::type>::value, true); +TT_TEST_END + + diff --git a/src/boost/libs/type_traits/test/make_unsigned_test.cpp b/src/boost/libs/type_traits/test/make_unsigned_test.cpp new file mode 100644 index 000000000..836512df2 --- /dev/null +++ b/src/boost/libs/type_traits/test/make_unsigned_test.cpp @@ -0,0 +1,111 @@ + +// (C) Copyright John Maddock 2007. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/make_unsigned.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(make_unsigned) +// signed types: +BOOST_CHECK_TYPE(::tt::make_unsigned<signed char>::type, unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<short>::type, unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<int>::type, unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<long>::type, unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<boost::long_long_type>::type, boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<__int64>::type, unsigned __int64); +#endif +// const signed types: +BOOST_CHECK_TYPE(::tt::make_unsigned<const signed char>::type, const unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<const short>::type, const unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<const int>::type, const unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<const long>::type, const unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<const boost::long_long_type>::type, const boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<const __int64>::type, const unsigned __int64); +#endif +// volatile signed types: +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile signed char>::type, volatile unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile short>::type, volatile unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile int>::type, volatile unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile long>::type, volatile unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile boost::long_long_type>::type, volatile boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile __int64>::type, volatile unsigned __int64); +#endif +// const volatile signed types: +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile signed char>::type, const volatile unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile short>::type, const volatile unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile int>::type, const volatile unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile long>::type, const volatile unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile boost::long_long_type>::type, const volatile boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile __int64>::type, const volatile unsigned __int64); +#endif + +// unsigned types: +BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned char>::type, unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned short>::type, unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned int>::type, unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned long>::type, unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<boost::ulong_long_type>::type, boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned __int64>::type, unsigned __int64); +#endif +// const unsigned types: +BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned char>::type, const unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned short>::type, const unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned int>::type, const unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned long>::type, const unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<const boost::ulong_long_type>::type, const boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned __int64>::type, const unsigned __int64); +#endif +// volatile unsigned types: +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned char>::type, volatile unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned short>::type, volatile unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned int>::type, volatile unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned long>::type, volatile unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile boost::ulong_long_type>::type, volatile boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned __int64>::type, volatile unsigned __int64); +#endif +// const volatile unsigned types: +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned char>::type, const volatile unsigned char); +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned short>::type, const volatile unsigned short); +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned int>::type, const volatile unsigned int); +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned long>::type, const volatile unsigned long); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile boost::ulong_long_type>::type, const volatile boost::ulong_long_type); +#elif defined(BOOST_HAS_MS_INT64) +BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned __int64>::type, const volatile unsigned __int64); +#endif +#ifdef BOOST_HAS_INT128 +BOOST_CHECK_TYPE(::tt::make_unsigned<boost::int128_type>::type, boost::uint128_type); +BOOST_CHECK_TYPE(::tt::make_unsigned<boost::uint128_type>::type, boost::uint128_type); +#endif + +// character types: +BOOST_CHECK_TYPE(::tt::make_unsigned<char>::type, unsigned char); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_unsigned<wchar_t>::type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned< ::tt::make_unsigned<wchar_t>::type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_unsigned<enum_UDT>::type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned< ::tt::make_unsigned<enum_UDT>::type>::value, true); +TT_TEST_END + + diff --git a/src/boost/libs/type_traits/test/make_void_test.cpp b/src/boost/libs/type_traits/test/make_void_test.cpp new file mode 100644 index 000000000..41c48996b --- /dev/null +++ b/src/boost/libs/type_traits/test/make_void_test.cpp @@ -0,0 +1,44 @@ +/* +Copyright 2017 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifdef TEST_STD +#include <type_traits> +#else +#include <boost/type_traits/make_void.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +TT_TEST_BEGIN(make_void) + +BOOST_CHECK_TYPE(::tt::make_void<int>::type, void); +BOOST_CHECK_TYPE(::tt::make_void<const volatile int>::type, void); +BOOST_CHECK_TYPE(::tt::make_void<int&>::type, void); +BOOST_CHECK_TYPE(::tt::make_void<void>::type, void); +BOOST_CHECK_TYPE(::tt::make_void<int(*)(int)>::type, void); +BOOST_CHECK_TYPE(::tt::make_void<int[]>::type, void); +BOOST_CHECK_TYPE(::tt::make_void<int[1]>::type, void); + +BOOST_CHECK_TYPE(::tt::make_void<>::type, void); +BOOST_CHECK_TYPE3(::tt::make_void<int, int>::type, void); + +#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES +BOOST_CHECK_TYPE(::tt::void_t<int>, void); +BOOST_CHECK_TYPE(::tt::void_t<const volatile int>, void); +BOOST_CHECK_TYPE(::tt::void_t<int&>, void); +BOOST_CHECK_TYPE(::tt::void_t<void>, void); +BOOST_CHECK_TYPE(::tt::void_t<int(*)(int)>, void); +BOOST_CHECK_TYPE(::tt::void_t<int[]>, void); +BOOST_CHECK_TYPE(::tt::void_t<int[1]>, void); + +BOOST_CHECK_TYPE(::tt::void_t<>, void); +BOOST_CHECK_TYPE3(::tt::void_t<int, int>, void); +#endif + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/mpl_interop_test1.cpp b/src/boost/libs/type_traits/test/mpl_interop_test1.cpp new file mode 100644 index 000000000..3b90418e9 --- /dev/null +++ b/src/boost/libs/type_traits/test/mpl_interop_test1.cpp @@ -0,0 +1,30 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/is_void.hpp> + +template <class T> +int dispatch_test_imp(const boost::mpl::bool_<true>&) +{ + return 0; +} +template <class T> +int dispatch_test_imp(const boost::mpl::bool_<false>&) +{ + return 1; +} + +template <class T> +int dispatch_test() +{ + return dispatch_test_imp<T>(boost::is_void<T>()); +} + + +int main() +{ + return (dispatch_test<int>() == 1) && (dispatch_test<void>() == 0) ? 0 : 1; +} diff --git a/src/boost/libs/type_traits/test/mpl_interop_test2.cpp b/src/boost/libs/type_traits/test/mpl_interop_test2.cpp new file mode 100644 index 000000000..85805c89f --- /dev/null +++ b/src/boost/libs/type_traits/test/mpl_interop_test2.cpp @@ -0,0 +1,25 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/is_void.hpp> +#include <boost/mpl/if.hpp> +#include <boost/static_assert.hpp> + +template <class T> +struct if_test +{ + typedef typename boost::mpl::if_< + boost::is_void<T>, + int, T>::type type; +}; + +if_test<void>::type t1 = 0; +if_test<double>::type t2 = 0; + +int main() +{ + return (int)(t1 + t2); +} diff --git a/src/boost/libs/type_traits/test/mpl_interop_test3.cpp b/src/boost/libs/type_traits/test/mpl_interop_test3.cpp new file mode 100644 index 000000000..e89d50e5a --- /dev/null +++ b/src/boost/libs/type_traits/test/mpl_interop_test3.cpp @@ -0,0 +1,30 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits/is_void.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/remove_if.hpp> +#include <boost/mpl/transform.hpp> +#include <boost/static_assert.hpp> + +template <class List> +struct lambda_test +{ + typedef typename boost::mpl::remove_if<List, boost::is_void<boost::mpl::_> >::type reduced_list; + typedef typename boost::mpl::transform<reduced_list, boost::add_const<boost::mpl::_> >::type const_list; + typedef typename boost::mpl::front<const_list>::type type; +}; + + +int main() +{ + typedef boost::mpl::list<const void, int, float, void, double> list_type; + + lambda_test<list_type>::type i = 0; + return i; +} diff --git a/src/boost/libs/type_traits/test/promote_basic_test.cpp b/src/boost/libs/type_traits/test/promote_basic_test.cpp new file mode 100644 index 000000000..f84a75ceb --- /dev/null +++ b/src/boost/libs/type_traits/test/promote_basic_test.cpp @@ -0,0 +1,153 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <climits> + +#if !defined(BOOST_NO_CWCHAR) +#include <cwchar> +#endif + +#include "promote_util.hpp" + +struct Struct {}; + +int main() +{ + // char types + +#if CHAR_MAX <= INT_MAX + test_cv< char, int >(); +#else + // TODO: dead branch? + test_cv< char, unsigned int >(); +#endif + + test_cv< signed char, int >(); + +#if UCHAR_MAX <= INT_MAX + test_cv< unsigned char, int >(); +#else + test_cv< unsigned char, unsigned int >(); +#endif + + + // short types + + test_cv< short int, int >(); + +#if USHRT_MAX <= INT_MAX + test_cv< unsigned short, int >(); +#else + test_cv< unsigned short, unsigned int >(); +#endif + + + // int and long + + test_cv< int, int >(); + test_cv< unsigned int, unsigned int >(); + test_cv< long, long >(); + test_cv< unsigned long, unsigned long >(); + + // wchar_t + +#if !defined(BOOST_NO_CWCHAR) && defined(WCHAR_MAX) && defined(WCHAR_MIN) + +// Version prior to VC8 didn't allow WCHAR_MAX in #if expressions +#if defined(BOOST_MSVC) && BOOST_MSVC < 1400 +# define BOOST_TT_AUX_WCHAR_MAX USHORT_MAX // force test_cv< wchar_t, int > +#elif defined(WCHAR_MAX) && !defined(__APPLE__) +# define BOOST_TT_AUX_WCHAR_MAX WCHAR_MAX +#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) + // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: +# define BOOST_TT_AUX_WCHAR_MAX USHORT_MAX // force test_cv< wchar_t, int > +#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\ + || (defined __APPLE__)\ + || (defined(__OpenBSD__) && defined(__GNUC__))\ + || (defined(__NetBSD__) && defined(__GNUC__))\ + || (defined(__FreeBSD__) && defined(__GNUC__))\ + || (defined(__DragonFly__) && defined(__GNUC__))\ + || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT)) + // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int. + // - SGI MIPSpro with native library + // - gcc 3.x on HP-UX + // - Mac OS X with native library + // - gcc on FreeBSD, OpenBSD and NetBSD +# define BOOST_TT_AUX_WCHAR_MAX INT_MAX // force test_cv< wchar_t, int > +#elif defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 2) && !defined(__SGI_STL_PORT) + // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as unsigned int. + // - gcc 2.95.x on HP-UX + // (also, std::numeric_limits<wchar_t> appears to return the wrong values). +# define BOOST_TT_AUX_WCHAR_MAX UINT_MAX // force test_cv< wchar_t, int > +#endif + +// For this PP-logic to work we need a valid WCHAR_MAX etc: +#if defined(BOOST_TT_AUX_WCHAR_MAX) \ + && !defined(__DECCXX) \ + && !defined(__hpux) \ + && !defined(_WIN32_WCE) + +#if BOOST_TT_AUX_WCHAR_MAX <= INT_MAX + test_cv< wchar_t, int >(); +#elif WCHAR_MIN == 0 && BOOST_TT_AUX_WCHAR_MAX <= UINT_MAX + test_cv< wchar_t, unsigned int >(); +#elif BOOST_TT_AUX_WCHAR_MAX <= LONG_MAX + test_cv< wchar_t, long >(); +#else + test_cv< wchar_t, unsigned long >(); +#endif + +#endif + +#undef BOOST_TT_AUX_WCHAR_MAX + +#endif + + + // floating point promotion + + test_cv< float , double >(); + test_cv< double, double >(); + + + // Other types + + test_cv< Struct, Struct >(); + test_cv< void , void >(); + test_cv< void* , void* >(); + + // Array types + + typedef int arr[3]; + typedef int (&arr_ref)[3]; + typedef int (*arr_ptr)[3]; + + test_cv< arr , arr >(); + test_cv< arr_ptr, arr_ptr >(); + + test_no_cv<arr_ref,arr_ref>(); + + + // Function types + + typedef int (fun)(); + typedef int (&fun_ref)(); + typedef int (*fun_ptr)(); + + test_no_cv< fun , fun >(); + test_no_cv< fun_ref, fun_ref >(); + test_no_cv< fun_ptr, fun_ptr >(); + + // Member pointer types + + typedef int (Struct::*mem_fun_ptr)(); + typedef int Struct::*mem_ptr; + + test_no_cv< mem_ptr, mem_ptr >(); + test_no_cv< mem_fun_ptr, mem_fun_ptr >(); + + return 0; +} + diff --git a/src/boost/libs/type_traits/test/promote_enum_msvc_bug_test.cpp b/src/boost/libs/type_traits/test/promote_enum_msvc_bug_test.cpp new file mode 100644 index 000000000..8893818ee --- /dev/null +++ b/src/boost/libs/type_traits/test/promote_enum_msvc_bug_test.cpp @@ -0,0 +1,47 @@ +// Copyright 2009 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Test bug 99776 'enum UIntEnum { value = UINT_MAX } is promoted to int' +// http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=22b0a6b7-120f-4ca0-9136-fa1b25b26efe +// +// Intel 9.0.028 for Windows has a similar problem: +// https://premier.intel.com/IssueDetail.aspx?IssueID=365073 + +#include <boost/type_traits/promote.hpp> + +#include <climits> +#include <boost/static_assert.hpp> +#include <boost/type_traits/is_same.hpp> + +#include "promote_util.hpp" + +#ifdef BOOST_INTEL +// remark #1418: external function definition with no prior declaration +#pragma warning(disable:1418) +#endif + +#if !(defined(BOOST_MSVC) && defined(CI_SUPPRESS_KNOWN_ISSUES)) + +enum UIntEnum { UIntEnum_max = UINT_MAX }; + +template<class T> +void assert_is_uint(T) +{ + BOOST_STATIC_ASSERT((boost::is_same<T, unsigned int>::value)); +} + +void test_promote_to_uint() +{ + assert_is_uint(+UIntEnum_max); + test_cv< UIntEnum, unsigned int >(); +} + +#endif + +int main() +{ + return 0; +} + diff --git a/src/boost/libs/type_traits/test/promote_enum_test.cpp b/src/boost/libs/type_traits/test/promote_enum_test.cpp new file mode 100644 index 000000000..f94df5e24 --- /dev/null +++ b/src/boost/libs/type_traits/test/promote_enum_test.cpp @@ -0,0 +1,157 @@ +// Copyright 2005-2006 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Status of some compilers: +// +// Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 +// /Za (disable extentions) is totally broken. +// /Ze (enable extentions) promotes UIntEnum incorrectly to int. +// See http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=22b0a6b7-120f-4ca0-9136-fa1b25b26efe +// +// Intel 9.0.028 for Windows has a similar problem: +// https://premier.intel.com/IssueDetail.aspx?IssueID=365073 +// +// gcc 3.4.4 with -fshort-enums option on x86 +// Dummy value is required, otherwise gcc promotes Enum1 +// to unsigned int although USHRT_MAX <= INT_MAX. +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24063 +// +// CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-20 2004/03/19 +// on SPARC V9 64-bit processor (-xarch=v9 flag) +// Dummy values are required for LongEnum3 and LongEnum4. +// +// CC: Sun C++ 5.7 Patch 117830-03 2005/07/21 +// ICE in boost/type_traits/is_enum.hpp at line 67. + + +#include <climits> + +#include "promote_util.hpp" +#include <boost/detail/workaround.hpp> + +#ifdef BOOST_INTEL +// remark #1418: external function definition with no prior declaration +#pragma warning(disable:1418) +#endif + +enum IntEnum1 { IntEnum1_min = -5 , IntEnum1_max = 5 }; +enum IntEnum2 { IntEnum2_min = SHRT_MIN, IntEnum2_max = SHRT_MAX }; +enum IntEnum3 { IntEnum3_min = INT_MIN , IntEnum3_max = INT_MAX }; +enum IntEnum4 { IntEnum4_value = INT_MAX }; +enum IntEnum5 { IntEnum5_value = INT_MIN }; + +void test_promote_to_int() +{ + test_cv<IntEnum1,int>(); + test_cv<IntEnum2,int>(); + test_cv<IntEnum3,int>(); + test_cv<IntEnum4,int>(); + test_cv<IntEnum5,int>(); +} + + +#if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 4 && USHRT_MAX <= INT_MAX) + +enum Enum1 { Enum1_value = USHRT_MAX }; + +#else + +// workaround for bug #24063 in gcc 3.4 +// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24063 +namespace gcc_short_enums_workaround { + +enum short_enum { value = 1 }; + +template<bool ShortEnumsIsOn> +struct select +{ + // Adding negative dummy value doesn't change + // promoted type because USHRT_MAX <= INT_MAX. + enum type { dummy = -1, value = USHRT_MAX }; +}; + +template<> +struct select<false> +{ + // No dummy value + enum type { value = USHRT_MAX }; +}; + +} // namespace gcc_short_enums_workaround + +typedef gcc_short_enums_workaround::select< + sizeof(gcc_short_enums_workaround::short_enum) != sizeof(int) + >::type Enum1; + +#endif + +void test_promote_to_int_or_uint() +{ +#if USHRT_MAX <= INT_MAX + test_cv<Enum1, int>(); +#else + test_cv<Enum1, unsigned int>(); +#endif +} + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) ) || \ + BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1000)) +// Don't test UIntEnum on VC++ 8.0 and Intel for Windows 9.0, +// they are broken. More info is on top of this file. +#else + +enum UIntEnum { UIntEnum_max = UINT_MAX }; + +void test_promote_to_uint() +{ + test_cv< UIntEnum, unsigned int >(); +} + +#endif + +// Enums can't be promoted to [unsigned] long if sizeof(int) == sizeof(long). +#if INT_MAX < LONG_MAX + +enum LongEnum1 { LongEnum1_min = -1 , LongEnum1_max = UINT_MAX }; +enum LongEnum2 { LongEnum2_min = LONG_MIN, LongEnum2_max = LONG_MAX }; + +enum LongEnum3 +{ + LongEnum3_value = LONG_MAX +#if defined(__SUNPRO_CC) && __SUNPRO_CC <= 0x530 + , LongEnum3_dummy = -1 +#endif +}; + +enum LongEnum4 +{ + LongEnum4_value = LONG_MIN +#if defined(__SUNPRO_CC) && __SUNPRO_CC <= 0x530 + , LongEnum4_dummy = 1 +#endif +}; + +void test_promote_to_long() +{ + test_cv< LongEnum1, long >(); + test_cv< LongEnum2, long >(); + test_cv< LongEnum3, long >(); + test_cv< LongEnum4, long >(); +} + +enum ULongEnum { ULongEnum_value = ULONG_MAX }; + +void test_promote_to_ulong() +{ + test_cv< ULongEnum, unsigned long >(); +} + +#endif // #if INT_MAX < LONG_MAX + +int main() +{ + return 0; +} + diff --git a/src/boost/libs/type_traits/test/promote_mpl_test.cpp b/src/boost/libs/type_traits/test/promote_mpl_test.cpp new file mode 100644 index 000000000..79dc1d217 --- /dev/null +++ b/src/boost/libs/type_traits/test/promote_mpl_test.cpp @@ -0,0 +1,47 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/mpl/at.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/placeholders.hpp> +#include <boost/mpl/transform.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/static_assert.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/promote.hpp> + +namespace mpl = boost::mpl; + +int main() +{ + using namespace mpl::placeholders; + + typedef mpl::vector< char + , signed char // 1 + , unsigned char + , short int const // 3 + , unsigned short int + , int volatile // 5 + , unsigned int // 6 + , long // 7 + , unsigned long // 8 + , float const // 9 + > types; + + typedef mpl::transform< types + , mpl::lambda< boost::promote<_> >::type + >::type promoted; + + BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c<promoted,1>::type, int >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c<promoted,3>::type, int const >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c<promoted,5>::type, int volatile >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c<promoted,6>::type, unsigned int >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c<promoted,7>::type, long >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c<promoted,8>::type, unsigned long >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< mpl::at_c<promoted,9>::type, double const >::value )); + + return 0; +} + diff --git a/src/boost/libs/type_traits/test/promote_util.hpp b/src/boost/libs/type_traits/test/promote_util.hpp new file mode 100644 index 000000000..9d16de6f4 --- /dev/null +++ b/src/boost/libs/type_traits/test/promote_util.hpp @@ -0,0 +1,37 @@ +// Copyright 2005 Alexander Nasonov. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef FILE_boost_libs_type_traits_test_promote_util_hpp_INCLUDED +#define FILE_boost_libs_type_traits_test_promote_util_hpp_INCLUDED + +#include <boost/type_traits/promote.hpp> + +#include <boost/config.hpp> +#include <boost/static_assert.hpp> +#include <boost/type_traits/is_same.hpp> + +template<class T, class Promoted> +inline void test_no_cv() +{ + typedef BOOST_DEDUCED_TYPENAME boost::promote<T>::type promoted; + BOOST_STATIC_ASSERT(( boost::is_same<promoted,Promoted>::value )); +} + +template<class T, class Promoted> +inline void test_cv() +{ + typedef BOOST_DEDUCED_TYPENAME boost::promote<T >::type promoted; + typedef BOOST_DEDUCED_TYPENAME boost::promote<T const >::type promoted_c; + typedef BOOST_DEDUCED_TYPENAME boost::promote<T volatile>::type promoted_v; + typedef BOOST_DEDUCED_TYPENAME boost::promote<T const volatile>::type promoted_cv; + + BOOST_STATIC_ASSERT(( ::boost::is_same< promoted , Promoted >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< promoted_c , Promoted const >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< promoted_v , Promoted volatile >::value )); + BOOST_STATIC_ASSERT(( ::boost::is_same< promoted_cv, Promoted const volatile >::value )); +} + +#endif // #ifndef FILE_boost_libs_type_traits_test_promote_util_hpp_INCLUDED + diff --git a/src/boost/libs/type_traits/test/rank_test.cpp b/src/boost/libs/type_traits/test/rank_test.cpp new file mode 100644 index 000000000..4ae95118c --- /dev/null +++ b/src/boost/libs/type_traits/test/rank_test.cpp @@ -0,0 +1,36 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/rank.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(rank) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[]>::value, 1); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[][10]>::value, 2); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[5][10]>::value, 2); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int[5][10][40]>::value, 3); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int (&)[5][10]>::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int (*)[5][10]>::value, 0); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int (&&)[5][10]>::value, 0); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_all_extents_test.cpp b/src/boost/libs/type_traits/test/remove_all_extents_test.cpp new file mode 100644 index 000000000..06666d14b --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_all_extents_test.cpp @@ -0,0 +1,67 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_all_extents.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_1, ::tt::remove_all_extents, const, const) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_2, ::tt::remove_all_extents, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_all_extents_test_3, ::tt::remove_all_extents, [2]) +BOOST_DECL_TRANSFORM_TEST0(remove_all_extents_test_4, ::tt::remove_all_extents) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_5, ::tt::remove_all_extents, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_6, ::tt::remove_all_extents, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_7, ::tt::remove_all_extents, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_8, ::tt::remove_all_extents, const [2], const) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_9, ::tt::remove_all_extents, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_10, ::tt::remove_all_extents, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_11, ::tt::remove_all_extents, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_12, ::tt::remove_all_extents, const[2][3], const) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_13, ::tt::remove_all_extents, (&)[2], (&)[2]) +BOOST_DECL_TRANSFORM_TEST3(remove_all_extents_test_14, ::tt::remove_all_extents, []) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_15, ::tt::remove_all_extents, const [], const) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_16, ::tt::remove_all_extents, const[][3], const) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_5a, ::tt::remove_all_extents, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_13a, ::tt::remove_all_extents, (&&)[2], (&&)[2]) +#endif + +TT_TEST_BEGIN(remove_all_extents) + + remove_all_extents_test_1(); + remove_all_extents_test_2(); + remove_all_extents_test_3(); + remove_all_extents_test_4(); + remove_all_extents_test_5(); + remove_all_extents_test_6(); + remove_all_extents_test_7(); + remove_all_extents_test_8(); + remove_all_extents_test_9(); + remove_all_extents_test_10(); + remove_all_extents_test_11(); + remove_all_extents_test_12(); + remove_all_extents_test_13(); + remove_all_extents_test_14(); + remove_all_extents_test_15(); + remove_all_extents_test_16(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_all_extents_test_5a(); + remove_all_extents_test_13a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_bounds_test.cpp b/src/boost/libs/type_traits/test/remove_bounds_test.cpp new file mode 100644 index 000000000..965937d46 --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_bounds_test.cpp @@ -0,0 +1,67 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_bounds.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_1, ::tt::remove_bounds, const, const) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_2, ::tt::remove_bounds, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_bounds_test_3, ::tt::remove_bounds, [2]) +BOOST_DECL_TRANSFORM_TEST0(remove_bounds_test_4, ::tt::remove_bounds) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_5, ::tt::remove_bounds, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_6, ::tt::remove_bounds, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_7, ::tt::remove_bounds, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_8, ::tt::remove_bounds, const [2], const) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_9, ::tt::remove_bounds, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_10, ::tt::remove_bounds, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_11, ::tt::remove_bounds, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_12, ::tt::remove_bounds, const[2][3], const[3]) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_13, ::tt::remove_bounds, (&)[2], (&)[2]) +BOOST_DECL_TRANSFORM_TEST3(remove_bounds_test_14, ::tt::remove_bounds, []) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_15, ::tt::remove_bounds, const [], const) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_16, ::tt::remove_bounds, const[][3], const[3]) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_5a, ::tt::remove_bounds, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_13a, ::tt::remove_bounds, (&&)[2], (&&)[2]) +#endif + +TT_TEST_BEGIN(remove_bounds) + + remove_bounds_test_1(); + remove_bounds_test_2(); + remove_bounds_test_3(); + remove_bounds_test_4(); + remove_bounds_test_5(); + remove_bounds_test_6(); + remove_bounds_test_7(); + remove_bounds_test_8(); + remove_bounds_test_9(); + remove_bounds_test_10(); + remove_bounds_test_11(); + remove_bounds_test_12(); + remove_bounds_test_13(); + remove_bounds_test_14(); + remove_bounds_test_15(); + remove_bounds_test_16(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_bounds_test_5a(); + remove_bounds_test_13a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_const_test.cpp b/src/boost/libs/type_traits/test/remove_const_test.cpp new file mode 100644 index 000000000..03c65253e --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_const_test.cpp @@ -0,0 +1,78 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_const.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST3(remove_const_test_1, ::tt::remove_const, const) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_2, ::tt::remove_const, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_3, ::tt::remove_const, const volatile, volatile) +BOOST_DECL_TRANSFORM_TEST0(remove_const_test_4, ::tt::remove_const) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_6, ::tt::remove_const, *const, *) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_7, ::tt::remove_const, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_8, ::tt::remove_const, *const volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_9, ::tt::remove_const, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_11, ::tt::remove_const, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_12, ::tt::remove_const, const[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_13, ::tt::remove_const, volatile[2], volatile[2]) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_14, ::tt::remove_const, const volatile[2], volatile[2]) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_15, ::tt::remove_const, [2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_16, ::tt::remove_const, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_17, ::tt::remove_const, const*const, const*) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_18, ::tt::remove_const, (*), (*)) +BOOST_DECL_TRANSFORM_TEST(remove_const_test_19, ::tt::remove_const, (*const), (*)) + +struct S +{ + template<typename T> + typename ::tt::remove_const<T>::type *operator=(T const &) const { return 0; } +}; + +void bar() {} + +void bug_case_7317() +{ + S s; + s = bar; + (void)s; +} + +TT_TEST_BEGIN(remove_const) + + BOOST_CHECK_TYPE(int, int); + + remove_const_test_1(); + remove_const_test_2(); + remove_const_test_3(); + remove_const_test_4(); + remove_const_test_6(); + remove_const_test_7(); + remove_const_test_8(); + remove_const_test_9(); + remove_const_test_11(); + remove_const_test_12(); + remove_const_test_13(); + remove_const_test_14(); + remove_const_test_15(); + remove_const_test_16(); + remove_const_test_17(); + remove_const_test_18(); + remove_const_test_19(); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_cv_ref_test.cpp b/src/boost/libs/type_traits/test/remove_cv_ref_test.cpp new file mode 100644 index 000000000..8e9e7be81 --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_cv_ref_test.cpp @@ -0,0 +1,144 @@ + +// (C) Copyright John Maddock 2000. +// (C) Copyright Peter Dimov 2017. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_cv_ref.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_1, ::tt::remove_cv_ref, const) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_2, ::tt::remove_cv_ref, volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_3, ::tt::remove_cv_ref, const volatile) +BOOST_DECL_TRANSFORM_TEST0(remove_cv_ref_test_4, ::tt::remove_cv_ref) + +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_5, ::tt::remove_cv_ref, const &) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_6, ::tt::remove_cv_ref, volatile &) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_7, ::tt::remove_cv_ref, const volatile &) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_8, ::tt::remove_cv_ref, &) + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_9, ::tt::remove_cv_ref, const &&) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_10, ::tt::remove_cv_ref, volatile &&) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_11, ::tt::remove_cv_ref, const volatile &&) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_ref_test_12, ::tt::remove_cv_ref, &&) +#endif + +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_13, ::tt::remove_cv_ref, *const, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_14, ::tt::remove_cv_ref, *volatile, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_15, ::tt::remove_cv_ref, *const volatile, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_16, ::tt::remove_cv_ref, *, *) + +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_17, ::tt::remove_cv_ref, *const &, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_18, ::tt::remove_cv_ref, *volatile &, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_19, ::tt::remove_cv_ref, *const volatile &, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_20, ::tt::remove_cv_ref, * &, *) + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_21, ::tt::remove_cv_ref, *const &&, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_22, ::tt::remove_cv_ref, *volatile &&, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_23, ::tt::remove_cv_ref, *const volatile &&, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_24, ::tt::remove_cv_ref, * &&, *) +#endif + +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_25, ::tt::remove_cv_ref, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_26, ::tt::remove_cv_ref, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_27, ::tt::remove_cv_ref, const*const, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_28, ::tt::remove_cv_ref, const*volatile, const*) + +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_29, ::tt::remove_cv_ref, const* &, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_30, ::tt::remove_cv_ref, volatile* &, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_31, ::tt::remove_cv_ref, const*const &, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_32, ::tt::remove_cv_ref, const*volatile &, const*) + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_33, ::tt::remove_cv_ref, const* &&, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_34, ::tt::remove_cv_ref, volatile* &&, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_35, ::tt::remove_cv_ref, const*const &&, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_36, ::tt::remove_cv_ref, const*volatile &&, const*) +#endif + +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_37, ::tt::remove_cv_ref, const[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_38, ::tt::remove_cv_ref, volatile[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_39, ::tt::remove_cv_ref, const volatile[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_40, ::tt::remove_cv_ref, [2], [2]) + +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_41, ::tt::remove_cv_ref, const(&)[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_42, ::tt::remove_cv_ref, volatile(&)[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_43, ::tt::remove_cv_ref, const volatile(&)[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_44, ::tt::remove_cv_ref, (&)[2], [2]) + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_45, ::tt::remove_cv_ref, const(&&)[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_46, ::tt::remove_cv_ref, volatile(&&)[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_47, ::tt::remove_cv_ref, const volatile(&&)[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_ref_test_48, ::tt::remove_cv_ref, (&&)[2], [2]) +#endif + +TT_TEST_BEGIN(remove_cv_ref) + + remove_cv_ref_test_1(); + remove_cv_ref_test_2(); + remove_cv_ref_test_3(); + remove_cv_ref_test_4(); + remove_cv_ref_test_5(); + remove_cv_ref_test_6(); + remove_cv_ref_test_7(); + remove_cv_ref_test_8(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_cv_ref_test_9(); + remove_cv_ref_test_10(); + remove_cv_ref_test_11(); + remove_cv_ref_test_12(); +#endif + remove_cv_ref_test_13(); + remove_cv_ref_test_14(); + remove_cv_ref_test_15(); + remove_cv_ref_test_16(); + remove_cv_ref_test_17(); + remove_cv_ref_test_18(); + remove_cv_ref_test_19(); + remove_cv_ref_test_20(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_cv_ref_test_21(); + remove_cv_ref_test_22(); + remove_cv_ref_test_23(); + remove_cv_ref_test_24(); +#endif + remove_cv_ref_test_25(); + remove_cv_ref_test_26(); + remove_cv_ref_test_27(); + remove_cv_ref_test_28(); + remove_cv_ref_test_29(); + remove_cv_ref_test_30(); + remove_cv_ref_test_31(); + remove_cv_ref_test_32(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_cv_ref_test_33(); + remove_cv_ref_test_34(); + remove_cv_ref_test_35(); + remove_cv_ref_test_36(); +#endif + remove_cv_ref_test_37(); + remove_cv_ref_test_38(); + remove_cv_ref_test_39(); + remove_cv_ref_test_40(); + remove_cv_ref_test_41(); + remove_cv_ref_test_42(); + remove_cv_ref_test_43(); + remove_cv_ref_test_44(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_cv_ref_test_45(); + remove_cv_ref_test_46(); + remove_cv_ref_test_47(); + remove_cv_ref_test_48(); +#endif + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/test/remove_cv_test.cpp b/src/boost/libs/type_traits/test/remove_cv_test.cpp new file mode 100644 index 000000000..805676b51 --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_cv_test.cpp @@ -0,0 +1,67 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_cv.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST3(remove_cv_test_1, ::tt::remove_cv, const) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_test_2, ::tt::remove_cv, volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_cv_test_3, ::tt::remove_cv, const volatile) +BOOST_DECL_TRANSFORM_TEST0(remove_cv_test_4, ::tt::remove_cv) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_5, ::tt::remove_cv, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_6, ::tt::remove_cv, *const, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_7, ::tt::remove_cv, *volatile, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_8, ::tt::remove_cv, *const volatile, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_9, ::tt::remove_cv, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_10, ::tt::remove_cv, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_11, ::tt::remove_cv, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_12, ::tt::remove_cv, const[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_13, ::tt::remove_cv, volatile[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_14, ::tt::remove_cv, const volatile[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_15, ::tt::remove_cv, [2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_16, ::tt::remove_cv, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_17, ::tt::remove_cv, const*volatile, const*) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_5a, ::tt::remove_cv, const &&, const&&) +#endif + +TT_TEST_BEGIN(remove_cv) + + remove_cv_test_1(); + remove_cv_test_2(); + remove_cv_test_3(); + remove_cv_test_4(); + remove_cv_test_5(); + remove_cv_test_6(); + remove_cv_test_7(); + remove_cv_test_8(); + remove_cv_test_9(); + remove_cv_test_10(); + remove_cv_test_11(); + remove_cv_test_12(); + remove_cv_test_13(); + remove_cv_test_14(); + remove_cv_test_15(); + remove_cv_test_16(); + remove_cv_test_17(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_cv_test_5a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_extent_test.cpp b/src/boost/libs/type_traits/test/remove_extent_test.cpp new file mode 100644 index 000000000..85012935a --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_extent_test.cpp @@ -0,0 +1,67 @@ + +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_extent.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_1, ::tt::remove_extent, const, const) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_2, ::tt::remove_extent, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_extent_test_3, ::tt::remove_extent, [2]) +BOOST_DECL_TRANSFORM_TEST0(remove_extent_test_4, ::tt::remove_extent) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_5, ::tt::remove_extent, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_6, ::tt::remove_extent, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_7, ::tt::remove_extent, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_8, ::tt::remove_extent, const [2], const) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_9, ::tt::remove_extent, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_10, ::tt::remove_extent, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_11, ::tt::remove_extent, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_12, ::tt::remove_extent, const[2][3], const[3]) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_13, ::tt::remove_extent, (&)[2], (&)[2]) +BOOST_DECL_TRANSFORM_TEST3(remove_extent_test_14, ::tt::remove_extent, []) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_15, ::tt::remove_extent, const [], const) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_16, ::tt::remove_extent, const[][3], const[3]) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_9a, ::tt::remove_extent, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(remove_extent_test_13a, ::tt::remove_extent, (&&)[2], (&&)[2]) +#endif + +TT_TEST_BEGIN(remove_extent) + + remove_extent_test_1(); + remove_extent_test_2(); + remove_extent_test_3(); + remove_extent_test_4(); + remove_extent_test_5(); + remove_extent_test_6(); + remove_extent_test_7(); + remove_extent_test_8(); + remove_extent_test_9(); + remove_extent_test_10(); + remove_extent_test_11(); + remove_extent_test_12(); + remove_extent_test_13(); + remove_extent_test_14(); + remove_extent_test_15(); + remove_extent_test_16(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_extent_test_9a(); + remove_extent_test_13a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_pointer_test.cpp b/src/boost/libs/type_traits/test/remove_pointer_test.cpp new file mode 100644 index 000000000..30d30aa10 --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_pointer_test.cpp @@ -0,0 +1,68 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_pointer.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_1, ::tt::remove_pointer, const, const) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_2, ::tt::remove_pointer, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_pointer_test_3, ::tt::remove_pointer, *) +BOOST_DECL_TRANSFORM_TEST3(remove_pointer_test_3b, ::tt::remove_pointer, *const) +BOOST_DECL_TRANSFORM_TEST0(remove_pointer_test_4, ::tt::remove_pointer) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_5, ::tt::remove_pointer, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_6, ::tt::remove_pointer, &, &) +BOOST_DECL_TRANSFORM_TEST3(remove_pointer_test_7, ::tt::remove_pointer, *volatile) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_8, ::tt::remove_pointer, const [2], const[2]) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_9, ::tt::remove_pointer, const &, const&) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_10, ::tt::remove_pointer, const*, const) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_11, ::tt::remove_pointer, volatile*, volatile) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_12, ::tt::remove_pointer, const[2][3], const[2][3]) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_13, ::tt::remove_pointer, (&)[2], (&)[2]) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_5a, ::tt::remove_pointer, const &&, const&&) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_6a, ::tt::remove_pointer, &&, &&) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_13a, ::tt::remove_pointer, (&&)[2], (&&)[2]) +#endif +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_14, ::tt::remove_pointer, (*)(long), (long)) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_14b, ::tt::remove_pointer, (*const)(long), (long)) + +TT_TEST_BEGIN(remove_pointer) + + remove_pointer_test_1(); + remove_pointer_test_2(); + remove_pointer_test_3(); + remove_pointer_test_3b(); + remove_pointer_test_4(); + remove_pointer_test_5(); + remove_pointer_test_6(); + remove_pointer_test_7(); + remove_pointer_test_8(); + remove_pointer_test_9(); + remove_pointer_test_10(); + remove_pointer_test_11(); + remove_pointer_test_12(); + remove_pointer_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_pointer_test_5a(); + remove_pointer_test_6a(); + remove_pointer_test_13a(); +#endif + remove_pointer_test_14(); + remove_pointer_test_14b(); +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_reference_test.cpp b/src/boost/libs/type_traits/test/remove_reference_test.cpp new file mode 100644 index 000000000..808c0869f --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_reference_test.cpp @@ -0,0 +1,67 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_reference.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_1, ::tt::remove_reference, const, const) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_2, ::tt::remove_reference, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_reference_test_3, ::tt::remove_reference, &) +BOOST_DECL_TRANSFORM_TEST0(remove_reference_test_4, ::tt::remove_reference) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_5, ::tt::remove_reference, const &, const) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_6, ::tt::remove_reference, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_7, ::tt::remove_reference, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST3(remove_reference_test_8, ::tt::remove_reference, &) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_9, ::tt::remove_reference, const &, const) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_10, ::tt::remove_reference, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_11, ::tt::remove_reference, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_12, ::tt::remove_reference, const[2], const[2]) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_13, ::tt::remove_reference, (&)[2], [2]) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST3(remove_reference_test_3a, ::tt::remove_reference, &&) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_5a, ::tt::remove_reference, const &&, const) +BOOST_DECL_TRANSFORM_TEST3(remove_reference_test_8a, ::tt::remove_reference, &&) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_9a, ::tt::remove_reference, const &&, const) +BOOST_DECL_TRANSFORM_TEST(remove_reference_test_13a, ::tt::remove_reference, (&&)[2], [2]) +#endif + +TT_TEST_BEGIN(remove_reference) + + remove_reference_test_1(); + remove_reference_test_2(); + remove_reference_test_3(); + remove_reference_test_4(); + remove_reference_test_5(); + remove_reference_test_6(); + remove_reference_test_7(); + remove_reference_test_8(); + remove_reference_test_9(); + remove_reference_test_10(); + remove_reference_test_11(); + remove_reference_test_12(); + remove_reference_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + remove_reference_test_3a(); + remove_reference_test_5a(); + remove_reference_test_8a(); + remove_reference_test_9a(); + remove_reference_test_13a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/remove_volatile_test.cpp b/src/boost/libs/type_traits/test/remove_volatile_test.cpp new file mode 100644 index 000000000..6730b1718 --- /dev/null +++ b/src/boost/libs/type_traits/test/remove_volatile_test.cpp @@ -0,0 +1,61 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/remove_volatile.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_1, ::tt::remove_volatile, const, const) +BOOST_DECL_TRANSFORM_TEST3(remove_volatile_test_2, ::tt::remove_volatile, volatile) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_3, ::tt::remove_volatile, const volatile, const) +BOOST_DECL_TRANSFORM_TEST0(remove_volatile_test_4, ::tt::remove_volatile) +BOOST_DECL_TRANSFORM_TEST0(remove_volatile_test_5, ::tt::remove_volatile) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_6, ::tt::remove_volatile, *const, *const) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_7, ::tt::remove_volatile, *volatile, *) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_8, ::tt::remove_volatile, *const volatile, *const) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_9, ::tt::remove_volatile, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_10, ::tt::remove_volatile, *, *) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_11, ::tt::remove_volatile, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_12, ::tt::remove_volatile, const[2], const[2]) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_13, ::tt::remove_volatile, volatile[2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_14, ::tt::remove_volatile, const volatile[2], const[2]) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_15, ::tt::remove_volatile, [2], [2]) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_16, ::tt::remove_volatile, const*, const*) +BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_17, ::tt::remove_volatile, const*volatile, const*) + +TT_TEST_BEGIN(remove_volatile) + + remove_volatile_test_1(); + remove_volatile_test_2(); + remove_volatile_test_3(); + remove_volatile_test_4(); + remove_volatile_test_5(); + remove_volatile_test_6(); + remove_volatile_test_7(); + remove_volatile_test_8(); + remove_volatile_test_9(); + remove_volatile_test_10(); + remove_volatile_test_11(); + remove_volatile_test_12(); + remove_volatile_test_13(); + remove_volatile_test_14(); + remove_volatile_test_15(); + remove_volatile_test_16(); + remove_volatile_test_17(); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/test.hpp b/src/boost/libs/type_traits/test/test.hpp new file mode 100644 index 000000000..864c69502 --- /dev/null +++ b/src/boost/libs/type_traits/test/test.hpp @@ -0,0 +1,478 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef TT_TEST_HPP +#define TT_TEST_HPP + +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> + +#if defined(_WIN32_WCE) && defined(BOOST_MSVC) +#pragma warning(disable:4201) +#endif + +#include <boost/noncopyable.hpp> +#include <iostream> +#include <typeinfo> + +#ifdef __BORLANDC__ +// we have to turn off these warnings otherwise we get swamped by the things: +#pragma option -w-8008 -w-8066 +#endif + +#ifdef _MSC_VER +// We have to turn off warnings that occur within the test suite: +#pragma warning(disable:4127) +#endif +#ifdef BOOST_INTEL +// remark #1418: external function definition with no prior declaration +// remark #981: operands are evaluated in unspecified order +#pragma warning(disable:1418 981) +#endif + +#ifdef BOOST_INTEL +// turn off warnings from this header: +#pragma warning(push) +#pragma warning(disable:444) +#endif + +// +// basic configuration: +// +#ifdef TEST_STD + +#define tt std::tr1 + +//#define TYPE_TRAITS(x) <type_traits> +//#define TYPE_COMPARE(x) <type_compare> +//#define TYPE_TRANSFORM(x) <type_transform> + +#else + +#define tt boost + +//#define TYPE_TRAITS(x) BOOST_STRINGIZE(boost/type_traits/x.hpp) +//#define TYPE_COMPARE(x) BOOST_STRINGIZE(boost/type_traits/x.hpp) +//#define TYPE_TRANSFORM(x) BOOST_STRINGIZE(boost/type_traits/x.hpp) + +#endif + +// +// replacements for Unit test macros: +// +int error_count = 0; + +#define BOOST_CHECK_MESSAGE(pred, message)\ + do{\ + if(!(pred))\ + {\ + std::cerr << __FILE__ << ":" << __LINE__ << ": " << message << std::endl;\ + ++error_count;\ + }\ + }while(0) + +#define BOOST_WARN_MESSAGE(pred, message)\ + do{\ + if(!(pred))\ + {\ + std::cerr << __FILE__ << ":" << __LINE__ << ": " << message << std::endl;\ + }\ + }while(0) + +#define BOOST_TEST_MESSAGE(message)\ + do{ std::cout << __FILE__ << ":" << __LINE__ << ": " << message << std::endl; }while(0) + +#define BOOST_CHECK(pred)\ + do{ \ + if(!(pred)){\ + std::cout << __FILE__ << ":" << __LINE__ << ": Error in " << BOOST_STRINGIZE(pred) << std::endl;\ + ++error_count;\ + } \ + }while(0) + +#define TT_TEST_BEGIN(trait_name)\ + int main(){ +#define TT_TEST_END return error_count; } + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !BOOST_WORKAROUND(BOOST_GCC, < 40704) + +#define TRANSFORM_CHECK_ALIASES(name, from_suffix, to_suffix)\ + BOOST_CHECK_TYPE(bool to_suffix, name##_t<bool from_suffix>);\ + BOOST_CHECK_TYPE(char to_suffix, name##_t<char from_suffix>);\ + BOOST_CHECK_TYPE(wchar_t to_suffix, name##_t<wchar_t from_suffix>);\ + BOOST_CHECK_TYPE(signed char to_suffix, name##_t<signed char from_suffix>);\ + BOOST_CHECK_TYPE(unsigned char to_suffix, name##_t<unsigned char from_suffix>);\ + BOOST_CHECK_TYPE(short to_suffix, name##_t<short from_suffix>);\ + BOOST_CHECK_TYPE(unsigned short to_suffix, name##_t<unsigned short from_suffix>);\ + BOOST_CHECK_TYPE(int to_suffix, name##_t<int from_suffix>);\ + BOOST_CHECK_TYPE(unsigned int to_suffix, name##_t<unsigned int from_suffix>);\ + BOOST_CHECK_TYPE(long to_suffix, name##_t<long from_suffix>);\ + BOOST_CHECK_TYPE(unsigned long to_suffix, name##_t<unsigned long from_suffix>);\ + BOOST_CHECK_TYPE(float to_suffix, name##_t<float from_suffix>);\ + BOOST_CHECK_TYPE(long double to_suffix, name##_t<long double from_suffix>);\ + BOOST_CHECK_TYPE(double to_suffix, name##_t<double from_suffix>);\ + BOOST_CHECK_TYPE(UDT to_suffix, name##_t<UDT from_suffix>);\ + BOOST_CHECK_TYPE(enum1 to_suffix, name##_t<enum1 from_suffix>); + +#else + +#define TRANSFORM_CHECK_ALIASES(name, from_suffix, to_suffix) /**/ + +#endif + +#define TRANSFORM_CHECK(name, from_suffix, to_suffix)\ + TRANSFORM_CHECK_ALIASES(name, from_suffix, to_suffix)\ + BOOST_CHECK_TYPE(bool to_suffix, name<bool from_suffix>::type);\ + BOOST_CHECK_TYPE(char to_suffix, name<char from_suffix>::type);\ + BOOST_CHECK_TYPE(wchar_t to_suffix, name<wchar_t from_suffix>::type);\ + BOOST_CHECK_TYPE(signed char to_suffix, name<signed char from_suffix>::type);\ + BOOST_CHECK_TYPE(unsigned char to_suffix, name<unsigned char from_suffix>::type);\ + BOOST_CHECK_TYPE(short to_suffix, name<short from_suffix>::type);\ + BOOST_CHECK_TYPE(unsigned short to_suffix, name<unsigned short from_suffix>::type);\ + BOOST_CHECK_TYPE(int to_suffix, name<int from_suffix>::type);\ + BOOST_CHECK_TYPE(unsigned int to_suffix, name<unsigned int from_suffix>::type);\ + BOOST_CHECK_TYPE(long to_suffix, name<long from_suffix>::type);\ + BOOST_CHECK_TYPE(unsigned long to_suffix, name<unsigned long from_suffix>::type);\ + BOOST_CHECK_TYPE(float to_suffix, name<float from_suffix>::type);\ + BOOST_CHECK_TYPE(long double to_suffix, name<long double from_suffix>::type);\ + BOOST_CHECK_TYPE(double to_suffix, name<double from_suffix>::type);\ + BOOST_CHECK_TYPE(UDT to_suffix, name<UDT from_suffix>::type);\ + BOOST_CHECK_TYPE(enum1 to_suffix, name<enum1 from_suffix>::type); + +#define BOOST_DUMMY_MACRO_PARAM /**/ + +#define BOOST_DECL_TRANSFORM_TEST(name, type, from, to)\ +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) } +#define BOOST_DECL_TRANSFORM_TEST2(name, type, to)\ +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) } + + + +// +// VC++ emits an awful lot of warnings unless we define these: +#ifdef BOOST_MSVC +# pragma warning(disable:4800) +#endif + +// +// define some test types: +// +enum enum_UDT{ one, two, three }; +struct UDT +{ + UDT(); + ~UDT(); + UDT(const UDT&); + UDT& operator=(const UDT&); + int i; + + void f1(); + int f2(); + int f3(int); + int f4(int, float); +#if __cpp_noexcept_function_type + void f5()noexcept; + int f6(int)noexcept(true); + double f7()noexcept(false); +#endif +}; + +typedef void(*f1)(); +typedef int(*f2)(int); +typedef int(*f3)(int, bool); +typedef void (UDT::*mf1)(); +typedef int (UDT::*mf2)(); +typedef int (UDT::*mf3)(int); +typedef int (UDT::*mf4)(int, float); +typedef int (UDT::*mp); +typedef int (UDT::*cmf)(int) const; +#if __cpp_noexcept_function_type +typedef void (UDT::*mf5)()noexcept; +typedef int (UDT::*mf6)(int)noexcept; +typedef double (UDT::*mf7)()noexcept; +#endif +typedef int (UDT::*mf8)(...); + +// cv-qualifiers applied to reference types should have no effect +// declare these here for later use with is_reference and remove_reference: +# ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4181) +# elif defined(BOOST_INTEL) +# pragma warning(push) +# pragma warning(disable: 21) +# elif defined(BOOST_CLANG) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wignored-qualifiers" +# endif +// +// This is intentional: +// r_type and cr_type should be the same type +// but some compilers wrongly apply cv-qualifiers +// to reference types (this may generate a warning +// on some compilers): +// +typedef int& r_type; +#ifndef BOOST_INTEL +typedef const r_type cr_type; +#else +// recent Intel compilers generate a hard error on the above: +typedef r_type cr_type; +#endif +# ifdef BOOST_MSVC +# pragma warning(pop) +# elif defined(BOOST_INTEL) +# pragma warning(pop) +# pragma warning(disable: 985) // identifier truncated in debug information +# elif defined(BOOST_CLANG) +# pragma clang diagnostic pop +# endif + +struct POD_UDT { int x; }; +struct empty_UDT +{ + empty_UDT(); + empty_UDT(const empty_UDT&); + ~empty_UDT(); + empty_UDT& operator=(const empty_UDT&); + bool operator==(const empty_UDT&)const; +}; +struct empty_POD_UDT +{ + bool operator==(const empty_POD_UDT&)const + { return true; } +}; +union union_UDT +{ + int x; + double y; + ~union_UDT(){} +}; +union POD_union_UDT +{ + int x; + double y; +}; +union empty_union_UDT +{ + ~empty_union_UDT(){} +}; +union empty_POD_union_UDT{}; + +struct nothrow_copy_UDT +{ + nothrow_copy_UDT(); + nothrow_copy_UDT(const nothrow_copy_UDT&)throw(); + ~nothrow_copy_UDT(){} + nothrow_copy_UDT& operator=(const nothrow_copy_UDT&); + bool operator==(const nothrow_copy_UDT&)const + { return true; } +}; + +struct nothrow_assign_UDT +{ + nothrow_assign_UDT(); + nothrow_assign_UDT(const nothrow_assign_UDT&); + ~nothrow_assign_UDT(){}; + nothrow_assign_UDT& operator=(const nothrow_assign_UDT&)throw(){ return *this; } + bool operator==(const nothrow_assign_UDT&)const + { return true; } +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +struct nothrow_move_UDT +{ + nothrow_move_UDT(); + nothrow_move_UDT(nothrow_move_UDT&&) throw(); + nothrow_move_UDT& operator=(nothrow_move_UDT&&) throw(); + bool operator==(const nothrow_move_UDT&)const + { return true; } +}; +#endif + + +struct nothrow_construct_UDT +{ + nothrow_construct_UDT()throw(); + nothrow_construct_UDT(const nothrow_construct_UDT&); + ~nothrow_construct_UDT(){}; + nothrow_construct_UDT& operator=(const nothrow_construct_UDT&){ return *this; } + bool operator==(const nothrow_construct_UDT&)const + { return true; } +}; + +class Base { }; + +class Derived : public Base { }; +class Derived2 : public Base { }; +class MultiBase : public Derived, public Derived2 {}; +class PrivateBase : private Base {}; + +class NonDerived { }; + +enum enum1 +{ + one_,two_ +}; + +enum enum2 +{ + three_,four_ +}; + +#ifndef BOOST_NO_CXX11_SCOPED_ENUMS + +enum class scoped_enum { one, two, three }; + +#endif + +struct VB +{ + virtual ~VB(){}; +}; + +struct VD : public VB +{ + ~VD(){}; +}; +// +// struct non_pointer: +// used to verify that is_pointer does not return +// true for class types that implement operator void*() +// +struct non_pointer +{ + operator void*(){return this;} +}; +struct non_int_pointer +{ + int i; + operator int*(){return &i;} +}; +struct int_constructible +{ + int_constructible(int); +}; +struct int_convertible +{ + operator int(); +}; +// +// struct non_empty: +// used to verify that is_empty does not emit +// spurious warnings or errors. +// +struct non_empty : private boost::noncopyable +{ + int i; +}; +// +// abstract base classes: +struct test_abc1 +{ + test_abc1(); + virtual ~test_abc1(); + test_abc1(const test_abc1&); + test_abc1& operator=(const test_abc1&); + virtual void foo() = 0; + virtual void foo2() = 0; +}; + +struct test_abc2 +{ + virtual ~test_abc2(); + virtual void foo() = 0; + virtual void foo2() = 0; +}; + +struct test_abc3 : public test_abc1 +{ + virtual void foo3() = 0; +}; + +struct incomplete_type; + +struct polymorphic_base +{ + virtual ~polymorphic_base(); + virtual void method(); +}; + +struct polymorphic_derived1 : public polymorphic_base +{ +}; + +struct polymorphic_derived2 : public polymorphic_base +{ + virtual void method(); +}; + +#ifndef BOOST_NO_CXX11_FINAL +struct final_UDT final +{}; +struct polymorphic_derived_final final : public polymorphic_derived2 +{}; +#endif + + +struct virtual_inherit1 : public virtual Base { }; +struct virtual_inherit2 : public virtual_inherit1 { }; +struct virtual_inherit3 : private virtual Base {}; +struct virtual_inherit4 : public virtual boost::noncopyable {}; +struct virtual_inherit5 : public virtual int_convertible {}; +struct virtual_inherit6 : public virtual Base { virtual ~virtual_inherit6()throw(); }; + +typedef void foo0_t(); +typedef void foo1_t(int); +typedef void foo2_t(int&, double); +typedef void foo3_t(int&, bool, int, int); +typedef void foo4_t(int, bool, int*, int[], int, int, int, int, int); + +struct trivial_except_construct +{ + trivial_except_construct(); + int i; +}; + +struct trivial_except_destroy +{ + ~trivial_except_destroy(); + int i; +}; + +struct trivial_except_copy +{ + trivial_except_copy(trivial_except_copy const&); + int i; +}; + +struct trivial_except_assign +{ + trivial_except_assign& operator=(trivial_except_assign const&); + int i; +}; + +template <class T> +struct wrap +{ + T t; + int j; +protected: + wrap(); + wrap(const wrap&); + wrap& operator=(const wrap&); +}; + +#ifdef BOOST_INTEL +#pragma warning(pop) +#endif + +#endif + diff --git a/src/boost/libs/type_traits/test/tricky_abstract_type_test.cpp b/src/boost/libs/type_traits/test/tricky_abstract_type_test.cpp new file mode 100644 index 000000000..f779d277f --- /dev/null +++ b/src/boost/libs/type_traits/test/tricky_abstract_type_test.cpp @@ -0,0 +1,31 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_empty.hpp> +# include <boost/type_traits/is_stateless.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(tricky_abstract_type_test) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty<test_abc1>::value, false); +#ifndef TEST_STD +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<test_abc1>::value, false); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/tricky_add_pointer_test.cpp b/src/boost/libs/type_traits/test/tricky_add_pointer_test.cpp new file mode 100644 index 000000000..a6edb1ed0 --- /dev/null +++ b/src/boost/libs/type_traits/test/tricky_add_pointer_test.cpp @@ -0,0 +1,51 @@ + +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/add_pointer.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_5, ::tt::add_pointer, const &, const*) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_6, ::tt::add_pointer, &, *) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_8, ::tt::add_pointer, const [2], const (*)[2]) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_9, ::tt::add_pointer, const &, const*) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_12, ::tt::add_pointer, const[2][3], const (*)[2][3]) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_13, ::tt::add_pointer, (&)[2], (*)[2]) +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_5a, ::tt::add_pointer, const &&, const*) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_6a, ::tt::add_pointer, &&, *) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_9a, ::tt::add_pointer, const &&, const*) +BOOST_DECL_TRANSFORM_TEST(add_pointer_test_13a, ::tt::add_pointer, (&&)[2], (*)[2]) +#endif + +TT_TEST_BEGIN(tricky_add_pointer_test) + + add_pointer_test_5(); + add_pointer_test_6(); + add_pointer_test_8(); + add_pointer_test_9(); + add_pointer_test_12(); + add_pointer_test_13(); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + add_pointer_test_5a(); + add_pointer_test_6a(); + add_pointer_test_9a(); + add_pointer_test_13a(); +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/tricky_function_type_test.cpp b/src/boost/libs/type_traits/test/tricky_function_type_test.cpp new file mode 100644 index 000000000..8077c56f4 --- /dev/null +++ b/src/boost/libs/type_traits/test/tricky_function_type_test.cpp @@ -0,0 +1,115 @@ + +// (C) Copyright John Maddock 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_function.hpp> +# include <boost/type_traits/is_float.hpp> +# include <boost/type_traits/is_enum.hpp> +# include <boost/type_traits/is_class.hpp> +# include <boost/type_traits/is_scalar.hpp> +# include <boost/type_traits/is_pod.hpp> +# include <boost/type_traits/has_trivial_constructor.hpp> +# include <boost/type_traits/has_trivial_copy.hpp> +# include <boost/type_traits/has_trivial_assign.hpp> +# include <boost/type_traits/has_trivial_destructor.hpp> +# include <boost/type_traits/is_compound.hpp> +# include <boost/type_traits/is_base_of.hpp> +# include <boost/type_traits/is_convertible.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(tricky_function_type_test) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<const int&>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int (&)(int)>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<foo0_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<foo0_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<foo0_t>::value, false); +#if defined(TEST_STD) && (TEST_STD < 2006) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<foo0_t, foo0_t>::value), true); // TR1 required behaviour (new to 1.34) +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<foo0_t, foo0_t>::value), false); // C++0x required behaviour (new to 1.40) +#endif +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<foo0_t, int>::value), false); + + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<foo1_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<foo1_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<foo1_t>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<foo2_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<foo2_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<foo2_t>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<foo3_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<foo3_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<foo3_t>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<foo4_t>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<foo4_t>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor<foo4_t>::value, false); + +typedef void foo5_t(int, bool, int*, int[], int, int, int, int, int ...); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo5_t>::value, true); + +typedef void (test_abc1::*vproc1)(...); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<vproc1>::value, true); +typedef void (test_abc1::*vproc2)(int, char, long, ...); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<vproc2>::value, true); +typedef void (test_abc1::*vproc3)(int, char, long, long, ...)const; +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<vproc3>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int()>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(*)()>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(* const)()>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(* volatile)()>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(* const volatile)()>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(&)()>::value), true); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/tricky_incomplete_type_test.cpp b/src/boost/libs/type_traits/test/tricky_incomplete_type_test.cpp new file mode 100644 index 000000000..95a0c2e9c --- /dev/null +++ b/src/boost/libs/type_traits/test/tricky_incomplete_type_test.cpp @@ -0,0 +1,37 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +TT_TEST_BEGIN(tricky_incomplete_type_test) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<incomplete_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_compound<incomplete_type>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<int[][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const int[][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<volatile int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<volatile int[][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const volatile int[]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array<const volatile int[][3]>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<incomplete_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<incomplete_type>::value, false); + +TT_TEST_END + + diff --git a/src/boost/libs/type_traits/test/tricky_is_enum_test.cpp b/src/boost/libs/type_traits/test/tricky_is_enum_test.cpp new file mode 100644 index 000000000..3dcb7befc --- /dev/null +++ b/src/boost/libs/type_traits/test/tricky_is_enum_test.cpp @@ -0,0 +1,27 @@ + +// (C) Copyright Dave Abrahams 2003. Use, modification and distribution is +// subject to the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_enum.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +struct convertible_to_anything +{ + template<typename T> operator T() { return 0; } +}; + + +TT_TEST_BEGIN(is_enum) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<convertible_to_anything>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int[] >::value, false); + +TT_TEST_END + + diff --git a/src/boost/libs/type_traits/test/tricky_partial_spec_test.cpp b/src/boost/libs/type_traits/test/tricky_partial_spec_test.cpp new file mode 100644 index 000000000..e6becc098 --- /dev/null +++ b/src/boost/libs/type_traits/test/tricky_partial_spec_test.cpp @@ -0,0 +1,128 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +#include <boost/type_traits/alignment_of.hpp> +#include <boost/type_traits/has_nothrow_assign.hpp> +#include <boost/type_traits/has_nothrow_constructor.hpp> +#include <boost/type_traits/has_nothrow_copy.hpp> +#include <boost/type_traits/is_base_and_derived.hpp> +#include <boost/type_traits/is_base_of.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_convertible.hpp> +#include <boost/type_traits/is_polymorphic.hpp> +#include <boost/type_traits/is_member_pointer.hpp> +#include <boost/type_traits/is_member_object_pointer.hpp> +#include <boost/type_traits/is_member_function_pointer.hpp> +#include <boost/type_traits/is_pointer.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <stdexcept> +#include <new> +#include <exception> + +// +// VC++ emits an awful lot of warnings unless we define these: +#ifdef BOOST_MSVC +# pragma warning(disable:4244) +#endif + + +template <class T> +struct align_calc +{ + char padding; + T instance; + static std::ptrdiff_t get() + { + static align_calc<T> a; + return reinterpret_cast<const char*>(&(a.instance)) - reinterpret_cast<const char*>(&(a.padding)); + } +}; + +#define ALIGNOF(x) align_calc<x>::get() + + +TT_TEST_BEGIN(tricky_partial_specialization_test) +// +// corner cases which don't compile without partial specialization +// support: +// + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char&>::value, ALIGNOF(void*)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char (&)(int)>::value, ALIGNOF(void*)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<char(&)[4]>::value, ALIGNOF(void*)); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base&,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base&,Derived&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,Derived&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,void>::value), false); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base&&,Derived>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base&&,Derived&&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of<Base,Derived&&>::value), false); +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<void, int>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<void, void>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<void, const void>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<test_abc1, test_abc1>::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same<test_abc1, const test_abc1>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<void,float>::value), false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<volatile empty_UDT>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const VB>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const volatile VD>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const test_abc1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<volatile test_abc2>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const std::exception>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const std::bad_alloc>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const std::runtime_error>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const std::out_of_range>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<const std::range_error>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<const f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<volatile f1>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<const volatile f1>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<const f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<const mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<volatile mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<const volatile mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<const mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<volatile mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<const volatile mf3>::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<const f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<const mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<volatile mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<const volatile mp>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<const mf3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<volatile mf3>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_object_pointer<const volatile mf3>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const f1>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const mp>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<volatile mp>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const volatile mp>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<volatile mf3>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_function_pointer<const volatile mf3>::value, true); + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/tricky_rvalue_test.cpp b/src/boost/libs/type_traits/test/tricky_rvalue_test.cpp new file mode 100644 index 000000000..cbb03bbac --- /dev/null +++ b/src/boost/libs/type_traits/test/tricky_rvalue_test.cpp @@ -0,0 +1,43 @@ + +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_convertible.hpp> +# include <boost/type_traits/is_lvalue_reference.hpp> +# include <boost/type_traits/is_rvalue_reference.hpp> +# include <boost/type_traits/is_reference.hpp> +# include <boost/type_traits/is_function.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" +#include <boost/detail/workaround.hpp> + +TT_TEST_BEGIN(rvalue_reference_test) + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference<int (&&)(int)>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&)(int)>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int (&&)(int)>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<int(&&)(int, ...)>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<void(&&)(void)>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference<void(&&)(int, double const&)>::value, true); +#if !(defined(CI_SUPPRESS_KNOWN_ISSUES) && (BOOST_WORKAROUND(BOOST_GCC, < 40700)) || BOOST_WORKAROUND(BOOST_MSVC, <= 1700)) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int&&, int&>::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<int(), int(&&)()>::value), true); +#endif +#endif + +TT_TEST_END + + + + + + + + diff --git a/src/boost/libs/type_traits/test/type_identity_test.cpp b/src/boost/libs/type_traits/test/type_identity_test.cpp new file mode 100644 index 000000000..36c175297 --- /dev/null +++ b/src/boost/libs/type_traits/test/type_identity_test.cpp @@ -0,0 +1,60 @@ + +// (C) Copyright John Maddock 2000. +// (C) Copyright Peter Dimov 2015. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/type_identity.hpp> +#endif +#include "test.hpp" +#include "check_type.hpp" + +BOOST_DECL_TRANSFORM_TEST(type_identity_test_1, ::tt::type_identity, const, const) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_2, ::tt::type_identity, volatile, volatile) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_3, ::tt::type_identity, const volatile, const volatile) +BOOST_DECL_TRANSFORM_TEST0(type_identity_test_4, ::tt::type_identity) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_5, ::tt::type_identity, [], []) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_6, ::tt::type_identity, *const, *const) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_7, ::tt::type_identity, *volatile, *volatile) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_8, ::tt::type_identity, *const volatile, *const volatile) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_9, ::tt::type_identity, *, *) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_10, ::tt::type_identity, *, *) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_11, ::tt::type_identity, volatile*, volatile*) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_12, ::tt::type_identity, const[2], const[2]) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_13, ::tt::type_identity, volatile[2], volatile[2]) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_14, ::tt::type_identity, const volatile[2], const volatile[2]) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_15, ::tt::type_identity, [2], [2]) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_16, ::tt::type_identity, const*, const*) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_17, ::tt::type_identity, const*volatile, const*volatile) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_18, ::tt::type_identity, (), ()) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_19, ::tt::type_identity, (int), (int)) +BOOST_DECL_TRANSFORM_TEST(type_identity_test_20, ::tt::type_identity, (*const)(), (*const)()) + +TT_TEST_BEGIN(type_identity) + + type_identity_test_1(); + type_identity_test_2(); + type_identity_test_3(); + type_identity_test_4(); + type_identity_test_5(); + type_identity_test_6(); + type_identity_test_7(); + type_identity_test_8(); + type_identity_test_9(); + type_identity_test_10(); + type_identity_test_11(); + type_identity_test_12(); + type_identity_test_13(); + type_identity_test_14(); + type_identity_test_15(); + type_identity_test_16(); + type_identity_test_17(); + type_identity_test_18(); + type_identity_test_19(); + type_identity_test_20(); + +TT_TEST_END diff --git a/src/boost/libs/type_traits/test/type_traits_test.cpp b/src/boost/libs/type_traits/test/type_traits_test.cpp new file mode 100644 index 000000000..c0fc21d49 --- /dev/null +++ b/src/boost/libs/type_traits/test/type_traits_test.cpp @@ -0,0 +1,103 @@ + +// (C) Copyright John Maddock 2010. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/type_traits.hpp> + +// +// Just check that each trait actually exists, not +// that it gives the correct answer, we do that elsewhere: +// + +typedef boost::add_const<int>::type t1; +typedef boost::add_cv<int>::type t2; +typedef boost::add_lvalue_reference<int>::type t3; +typedef boost::add_pointer<int>::type t4; +typedef boost::add_reference<int>::type t5; +typedef boost::add_rvalue_reference<int>::type t6; +typedef boost::add_volatile<int>::type t7; + +typedef boost::aligned_storage<2>::type t8; +typedef boost::alignment_of<int>::type t9; +typedef boost::conditional<true, int, long>::type t10; +typedef boost::common_type<int, long>::type t11; +typedef boost::decay<int[2] >::type t12; +typedef boost::extent<int[3] >::type t13; +typedef boost::floating_point_promotion<int>::type t14; +typedef boost::function_traits<int (int) > t15; + +typedef boost::has_new_operator<int> t16; +typedef boost::has_nothrow_assign<int> t17; +typedef boost::has_nothrow_constructor<int> t18; +typedef boost::has_nothrow_copy<int> t19; +typedef boost::has_nothrow_copy_constructor<int> t20; +typedef boost::has_nothrow_default_constructor<int> t21; +typedef boost::has_trivial_assign<int> t22; +typedef boost::has_trivial_constructor<int> t23; +typedef boost::has_trivial_copy<int> t24; +typedef boost::has_trivial_copy_constructor<int> t25; +typedef boost::has_trivial_default_constructor<int> t26; +typedef boost::has_trivial_destructor<int> t27; +typedef boost::has_virtual_destructor<int> t28; + +typedef boost::integral_constant<int, 2> t29; +typedef boost::integral_promotion<short>::type t30; + +typedef boost::is_abstract<int>::type t31; +typedef boost::is_arithmetic<int>::type t32; +typedef boost::is_array<int>::type t33; +typedef boost::is_base_of<int, long>::type t34; +typedef boost::is_class<int>::type t35; +typedef boost::is_complex<int>::type t36; +typedef boost::is_compound<int>::type t37; +typedef boost::is_const<int>::type t38; +typedef boost::is_convertible<int, long>::type t39; +typedef boost::is_empty<int>::type t40; +typedef boost::is_enum<int>::type t41; +typedef boost::is_floating_point<int>::type t42; +typedef boost::is_function<int>::type t43; +typedef boost::is_fundamental<int>::type t44; +typedef boost::is_integral<int>::type t45; +typedef boost::is_lvalue_reference<int>::type t46; +typedef boost::is_member_function_pointer<int>::type t47; +typedef boost::is_member_object_pointer<int>::type t48; +typedef boost::is_member_pointer<int>::type t49; +typedef boost::is_object<int>::type t50; +typedef boost::is_pod<int>::type t51; +typedef boost::is_pointer<int>::type t52; +typedef boost::is_polymorphic<int>::type t53; +typedef boost::is_reference<int>::type t54; +typedef boost::is_rvalue_reference<int>::type t55; +typedef boost::is_same<int, int>::type t56; +typedef boost::is_scalar<int>::type t57; +typedef boost::is_signed<int>::type t58; +typedef boost::is_stateless<int>::type t59; +typedef boost::is_union<int>::type t60; +typedef boost::is_unsigned<int>::type t61; +typedef boost::is_virtual_base_of<int, int>::type t62; +typedef boost::is_void<int>::type t63; +typedef boost::is_volatile<int>::type t64; +typedef boost::make_signed<int>::type t65; +typedef boost::make_unsigned<int>::type t66; +typedef boost::promote<int>::type t67; +typedef boost::rank<int>::type t68; + +typedef boost::remove_all_extents<int>::type t69; +typedef boost::remove_const<int>::type t70; +typedef boost::remove_cv<int>::type t71; +typedef boost::remove_extent<int>::type t72; +typedef boost::remove_pointer<int>::type t73; +typedef boost::remove_reference<int>::type t74; +typedef boost::remove_volatile<int>::type t75; +typedef boost::type_with_alignment<4>::type t76; + +int main() +{ + return 0; +} + + + + diff --git a/src/boost/libs/type_traits/test/type_with_alignment_test.cpp b/src/boost/libs/type_traits/test/type_with_alignment_test.cpp new file mode 100644 index 000000000..8888af442 --- /dev/null +++ b/src/boost/libs/type_traits/test/type_with_alignment_test.cpp @@ -0,0 +1,116 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/alignment_of.hpp> +# include <boost/type_traits/type_with_alignment.hpp> +# include <boost/type_traits/is_pod.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +#if (_MSC_VER >= 1400) && defined(_M_IX86) +#include <xmmintrin.h> +#endif +struct __declspec(align(8)) a8 { char m[8]; }; +struct __declspec(align(16)) a16 { char m[16]; }; +struct __declspec(align(32)) a32 { char m[32]; }; +struct __declspec(align(64)) a64 { char m[64]; }; +struct __declspec(align(128)) a128 { char m[128]; }; +#endif + +#ifdef __CLR_VER +#pragma warning(disable:4793) // vaarg function +#endif + +void check_call2(...){} + +template <class T> +void check_call(const T& v) +{ + check_call2(v); +} + +#define TYPE_WITH_ALIGNMENT_TEST(T)\ +{\ +std::cout << "\ntesting type " << typeid(T).name() << std::endl;\ +std::cout << "Alignment of T is " << ::tt::alignment_of< T >::value << std::endl;\ +std::cout << "Aligned type is " << typeid(::tt::type_with_alignment< ::tt::alignment_of< T >::value>::type).name() << std::endl;\ +std::cout << "Alignment of aligned type is " << ::tt::alignment_of<\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value\ + >::type\ +>::value << std::endl;\ +BOOST_CHECK(::tt::alignment_of<\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value\ + >::type\ + >::value == ::boost::alignment_of< T >::value);\ +BOOST_CHECK(::tt::is_pod<\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value>::type\ + >::value);\ +} +#define TYPE_WITH_ALIGNMENT_TEST_EX(T)\ + TYPE_WITH_ALIGNMENT_TEST(T)\ +{\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value\ + >::type val;\ + check_call(val);\ +} + + +TT_TEST_BEGIN(type_with_alignment) + +TYPE_WITH_ALIGNMENT_TEST_EX(char) +TYPE_WITH_ALIGNMENT_TEST_EX(short) +TYPE_WITH_ALIGNMENT_TEST_EX(int) +TYPE_WITH_ALIGNMENT_TEST_EX(long) +TYPE_WITH_ALIGNMENT_TEST_EX(float) +TYPE_WITH_ALIGNMENT_TEST_EX(double) +TYPE_WITH_ALIGNMENT_TEST_EX(long double) + +#ifdef BOOST_HAS_LONG_LONG +TYPE_WITH_ALIGNMENT_TEST_EX(::boost::long_long_type) +#endif +#ifdef BOOST_HAS_MS_INT64 +TYPE_WITH_ALIGNMENT_TEST_EX(__int64) +#endif +TYPE_WITH_ALIGNMENT_TEST_EX(int[4]) +TYPE_WITH_ALIGNMENT_TEST_EX(int(*)(int)) +TYPE_WITH_ALIGNMENT_TEST_EX(int*) +TYPE_WITH_ALIGNMENT_TEST_EX(VB) +TYPE_WITH_ALIGNMENT_TEST_EX(VD) +TYPE_WITH_ALIGNMENT_TEST_EX(enum_UDT) +TYPE_WITH_ALIGNMENT_TEST_EX(mf2) +TYPE_WITH_ALIGNMENT_TEST_EX(POD_UDT) +TYPE_WITH_ALIGNMENT_TEST_EX(empty_UDT) +TYPE_WITH_ALIGNMENT_TEST_EX(union_UDT) + +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +#if (_MSC_VER >= 1400) && defined(_M_IX86) +TYPE_WITH_ALIGNMENT_TEST(__m128) +TYPE_WITH_ALIGNMENT_TEST(__m64) +#endif +TYPE_WITH_ALIGNMENT_TEST(a8) +TYPE_WITH_ALIGNMENT_TEST(a16) +TYPE_WITH_ALIGNMENT_TEST(a32) +#endif + +TT_TEST_END + + + + + + + + + diff --git a/src/boost/libs/type_traits/test/udt_specialisations.cpp b/src/boost/libs/type_traits/test/udt_specialisations.cpp new file mode 100644 index 000000000..a6fe2dcbd --- /dev/null +++ b/src/boost/libs/type_traits/test/udt_specialisations.cpp @@ -0,0 +1,48 @@ + +// (C) Copyright John Maddock 2004. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifdef TEST_STD +# include <type_traits> +#else +# include <boost/type_traits/is_pod.hpp> +# include <boost/type_traits/is_class.hpp> +# include <boost/type_traits/is_union.hpp> +#endif +#include "test.hpp" +#include "check_integral_constant.hpp" + +struct my_pod{}; +struct my_union +{ + char c; + int i; +}; + +namespace tt +{ +template<> +struct is_pod<my_pod> + : public mpl::true_{}; +template<> +struct is_pod<my_union> + : public mpl::true_{}; +template<> +struct is_union<my_union> + : public mpl::true_{}; +template<> +struct is_class<my_union> + : public mpl::false_{}; +} + +TT_TEST_BEGIN(is_pod) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<my_pod>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<my_union>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union<my_union>::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class<my_union>::value, false); + +TT_TEST_END + diff --git a/src/boost/libs/type_traits/tools/specialisations.cpp b/src/boost/libs/type_traits/tools/specialisations.cpp new file mode 100644 index 000000000..f276bef5a --- /dev/null +++ b/src/boost/libs/type_traits/tools/specialisations.cpp @@ -0,0 +1,122 @@ + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// +// Simple program to output some template specialisations for the type_traits library. +// + +#include <fstream> + +using namespace std; + +unsigned specializations = 30; + +int main() +{ + unsigned i, j; + ofstream os("specialisations"); + + // + // generate is_function tester prototypes: + for(i = 0; i <= specializations; ++i) + { + os << "template <class R"; + for(j = 0; j < i; ++j) + { + os << ", class A" << j; + } + os << ">\n::boost::type_traits::yes_type is_function_tester(R (*)("; + if(i == 0) + os << "void"; + else + { + for(j = 0; j < i; ++j) + { + if(j) os << ", "; + os << "A" << j; + } + } + os << "));" << endl; + } + os << endl << endl; + // + // generate is_function_helper partial specialisations: + // + for(i = 0; i < specializations; ++i) + { + os << "template <class R"; + for(j = 0; j < i; ++j) + { + os << ", class A" << j; + } + os << ">\nstruct is_function_helper_base<R (*)("; + if(i == 0) + os << "void"; + else + { + for(j = 0; j < i; ++j) + { + if(j) os << ", "; + os << "A" << j; + } + } + os << ")>{ BOOST_STATIC_CONSTANT(bool, value = true); };" << endl; + } + os << endl << endl; + + + // + // generate is_member_pointer_helper tester prototypes: + for(i = 0; i <= specializations; ++i) + { + os << "template <class R, class T"; + for(j = 0; j < i; ++j) + { + os << ", class A" << j; + } + os << ">\n::boost::type_traits::yes_type is_member_pointer_helper(R (T::*)("; + if(i == 0) + os << "void"; + else + { + for(j = 0; j < i; ++j) + { + if(j) os << ", "; + os << "A" << j; + } + } + os << "));" << endl; + } + os << endl << endl; + // + // generate is_member_pointer partial specialisations: + // + for(i = 0; i < specializations; ++i) + { + os << "template <class R, class T"; + for(j = 0; j < i; ++j) + { + os << ", class A" << j; + } + os << ">\nstruct is_member_pointer<R (T::*)("; + if(i == 0) + os << "void"; + else + { + for(j = 0; j < i; ++j) + { + if(j) os << ", "; + os << "A" << j; + } + } + os << ")>{ BOOST_STATIC_CONSTANT(bool, value = true); };" << endl; + } + os << endl << endl; + + + return 0; +} + |