diff --git a/include/boost/type_traits/add_reference.hpp b/include/boost/type_traits/add_reference.hpp index 7dfb4be..eb4f9b1 100644 --- a/include/boost/type_traits/add_reference.hpp +++ b/include/boost/type_traits/add_reference.hpp @@ -51,11 +51,29 @@ struct add_reference_impl }; #else +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// + +template +struct add_reference_rvalue_layer +{ + typedef T& type; +}; + +#ifndef BOOST_NO_RVALUE_REFERENCES +template +struct add_reference_rvalue_layer +{ + typedef T&& type; +}; +#endif template struct add_reference_impl { - typedef T& type; + typedef typename add_reference_rvalue_layer::type type; }; #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION diff --git a/include/boost/type_traits/is_const.hpp b/include/boost/type_traits/is_const.hpp index e66d18a..6b848f2 100644 --- a/include/boost/type_traits/is_const.hpp +++ b/include/boost/type_traits/is_const.hpp @@ -50,12 +50,31 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T)) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -//* is a type T declared const - is_const +namespace detail{ +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct is_const_rvalue_filter +{ #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) - BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp::type*>::is_const) + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); #else - BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp::is_const) + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); #endif +}; +#ifndef BOOST_NO_RVALUE_REFERENCES +template +struct is_const_rvalue_filter +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; +#endif +} + +//* is a type T declared const - is_const +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_rvalue_filter::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false) #if defined(BOOST_ILLEGAL_CV_REFERENCES) diff --git a/include/boost/type_traits/is_function.hpp b/include/boost/type_traits/is_function.hpp index 95dba0d..55c05c1 100644 --- a/include/boost/type_traits/is_function.hpp +++ b/include/boost/type_traits/is_function.hpp @@ -95,6 +95,9 @@ struct is_function_impl : public false_type BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,__is_function(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl::value) +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_function,T&&,false) +#endif #endif } // namespace boost diff --git a/include/boost/type_traits/is_lvalue_reference.hpp b/include/boost/type_traits/is_lvalue_reference.hpp new file mode 100644 index 0000000..a6af859 --- /dev/null +++ b/include/boost/type_traits/is_lvalue_reference.hpp @@ -0,0 +1,118 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED + +#include + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# include +# include +#endif + +// should be the last #include +#include + +namespace boost { + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true) + +#if defined(BOOST_ILLEGAL_CV_REFERENCES) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const,true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volatile,true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true) +#endif + +#if defined(__GNUC__) && (__GNUC__ < 3) +// these allow us to work around illegally cv-qualified reference +// types. +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const ,::boost::is_lvalue_reference::value) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T volatile ,::boost::is_lvalue_reference::value) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const volatile ,::boost::is_lvalue_reference::value) +// However, the above specializations confuse gcc 2.96 unless we also +// supply these specializations for array types +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,T[N],false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const T[N],false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,volatile T[N],false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const volatile T[N],false) +#endif + +#else + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable: 4181 4097) +#endif + +namespace detail { + +using ::boost::type_traits::yes_type; +using ::boost::type_traits::no_type; +using ::boost::type_traits::wrap; + +template T&(* is_lvalue_reference_helper1(wrap) )(wrap); +char is_lvalue_reference_helper1(...); + +template no_type is_lvalue_reference_helper2(T&(*)(wrap)); +yes_type is_lvalue_reference_helper2(...); + +template +struct is_lvalue_reference_impl +{ + BOOST_STATIC_CONSTANT( + bool, value = sizeof( + ::boost::detail::is_lvalue_reference_helper2( + ::boost::detail::is_lvalue_reference_helper1(::boost::type_traits::wrap()))) == 1 + ); +}; + +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const volatile,false) +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,::boost::detail::is_lvalue_reference_impl::value) + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/include/boost/type_traits/is_reference.hpp b/include/boost/type_traits/is_reference.hpp index dcf84db..49b5f9f 100644 --- a/include/boost/type_traits/is_reference.hpp +++ b/include/boost/type_traits/is_reference.hpp @@ -1,6 +1,6 @@ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, -// Howard Hinnant and John Maddock 2000. +// Howard Hinnant and John Maddock 2000, 2010. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, @@ -9,107 +9,34 @@ // // See http://www.boost.org/libs/type_traits for most recent version including documentation. -// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, -// is_member_pointer based on the Simulated Partial Specialization work -// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or -// http://groups.yahoo.com/group/boost/message/5441 -// Some workarounds in here use ideas suggested from "Generic: -// Mappings between Types and Values" -// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). - - #ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED #define BOOST_TT_IS_REFERENCE_HPP_INCLUDED #include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include -# include -#endif +#include +#include +#include // should be the last #include #include namespace boost { -#if defined( __CODEGEARC__ ) -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,__is_reference(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T&,true) - -#if defined(BOOST_ILLEGAL_CV_REFERENCES) -// these are illegal specialisations; cv-qualifies applied to -// references have no effect according to [8.3.2p1], -// C++ Builder requires them though as it treats cv-qualified -// references as distinct types... -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const,true) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& volatile,true) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const volatile,true) -#endif - -#if defined(__GNUC__) && (__GNUC__ < 3) -// these allow us to work around illegally cv-qualified reference -// types. -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T const ,::boost::is_reference::value) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T volatile ,::boost::is_reference::value) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T const volatile ,::boost::is_reference::value) -// However, the above specializations confuse gcc 2.96 unless we also -// supply these specializations for array types -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,T[N],false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,const T[N],false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,volatile T[N],false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,const volatile T[N],false) -#endif - -#else - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4181 4097) -#endif - namespace detail { -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; -using ::boost::type_traits::wrap; - -template T&(* is_reference_helper1(wrap) )(wrap); -char is_reference_helper1(...); - -template no_type is_reference_helper2(T&(*)(wrap)); -yes_type is_reference_helper2(...); - template struct is_reference_impl { - BOOST_STATIC_CONSTANT( - bool, value = sizeof( - ::boost::detail::is_reference_helper2( - ::boost::detail::is_reference_helper1(::boost::type_traits::wrap()))) == 1 - ); + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_lvalue_reference::value, ::boost::is_rvalue_reference::value + >::value)); }; -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void const volatile,false) -#endif - } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl::value) -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/include/boost/type_traits/is_rvalue_reference.hpp b/include/boost/type_traits/is_rvalue_reference.hpp new file mode 100644 index 0000000..9055e6b --- /dev/null +++ b/include/boost/type_traits/is_rvalue_reference.hpp @@ -0,0 +1,29 @@ + +// (C) 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED +#define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED + +#include + +// should be the last #include +#include + +namespace boost { + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_rvalue_reference,T,false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED + diff --git a/include/boost/type_traits/is_volatile.hpp b/include/boost/type_traits/is_volatile.hpp index 7ab253a..677502b 100644 --- a/include/boost/type_traits/is_volatile.hpp +++ b/include/boost/type_traits/is_volatile.hpp @@ -41,16 +41,35 @@ namespace boost { +namespace detail{ +template +struct is_volatile_rval_filter +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); +#endif +}; +#ifndef BOOST_NO_RVALUE_REFERENCES +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct is_volatile_rval_filter +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; +#endif +} + #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T)) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) //* is a type T declared volatile - is_volatile -#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) - BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp::type*>::is_volatile) -#else - BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp::is_volatile) -#endif +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false) #if defined(BOOST_ILLEGAL_CV_REFERENCES) diff --git a/include/boost/type_traits/remove_const.hpp b/include/boost/type_traits/remove_const.hpp index 7e18d88..f4d1739 100644 --- a/include/boost/type_traits/remove_const.hpp +++ b/include/boost/type_traits/remove_const.hpp @@ -54,6 +54,18 @@ struct remove_const_impl >::type type; }; +#ifndef BOOST_NO_RVALUE_REFERENCES +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct remove_const_impl +{ + typedef T&& type; +}; +#endif + } // namespace detail // * convert a type T to non-const type - remove_const diff --git a/include/boost/type_traits/remove_cv.hpp b/include/boost/type_traits/remove_cv.hpp index 09f8ff1..29ace77 100644 --- a/include/boost/type_traits/remove_cv.hpp +++ b/include/boost/type_traits/remove_cv.hpp @@ -27,10 +27,32 @@ namespace boost { +namespace detail{ + +template +struct rvalue_ref_filter_rem_cv +{ + typedef typename boost::detail::cv_traits_imp::unqualified_type type; +}; + +#ifndef BOOST_NO_RVALUE_REFERENCES +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct rvalue_ref_filter_rem_cv +{ + typedef T&& type; +}; +#endif + +} + #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // convert a type T to a non-cv-qualified type - remove_cv -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::cv_traits_imp::unqualified_type) +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::rvalue_ref_filter_rem_cv::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N]) diff --git a/include/boost/type_traits/remove_reference.hpp b/include/boost/type_traits/remove_reference.hpp index 8fddc46..110389b 100644 --- a/include/boost/type_traits/remove_reference.hpp +++ b/include/boost/type_traits/remove_reference.hpp @@ -24,7 +24,27 @@ namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T) +namespace detail{ +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#ifndef BOOST_NO_RVALUE_REFERENCES +template +struct remove_rvalue_ref +{ + typedef T type; +}; +#endif + +} // namespace detail + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename detail::remove_rvalue_ref::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T) #if defined(BOOST_ILLEGAL_CV_REFERENCES) diff --git a/include/boost/type_traits/remove_volatile.hpp b/include/boost/type_traits/remove_volatile.hpp index 723ebe3..073a2a3 100644 --- a/include/boost/type_traits/remove_volatile.hpp +++ b/include/boost/type_traits/remove_volatile.hpp @@ -53,6 +53,17 @@ struct remove_volatile_impl >::type type; }; +// +// We can't filter out rvalue_references at the same level as +// references or we get ambiguities from msvc: +// +#ifndef BOOST_NO_RVALUE_REFERENCES +template +struct remove_volatile_impl +{ + typedef T&& type; +}; +#endif } // namespace detail // * convert a type T to a non-volatile type - remove_volatile diff --git a/test/add_const_test.cpp b/test/add_const_test.cpp index 84ef68a..f61aef8 100644 --- a/test/add_const_test.cpp +++ b/test/add_const_test.cpp @@ -21,6 +21,10 @@ BOOST_DECL_TRANSFORM_TEST(add_const_test_10, ::tt::add_const, const*, const*cons 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_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]) @@ -41,6 +45,10 @@ TT_TEST_BEGIN(add_const) add_const_test_9(); add_const_test_12(); add_const_test_13(); +#ifndef BOOST_NO_RVALUE_REFERENCES + add_const_test_5a(); + add_const_test_6a(); +#endif TT_TEST_END diff --git a/test/add_cv_test.cpp b/test/add_cv_test.cpp index 65d6925..45244a7 100644 --- a/test/add_cv_test.cpp +++ b/test/add_cv_test.cpp @@ -21,6 +21,10 @@ BOOST_DECL_TRANSFORM_TEST(add_cv_test_10, ::tt::add_cv, const*, const*const vola 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_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]) @@ -41,6 +45,10 @@ TT_TEST_BEGIN(add_const) add_cv_test_9(); add_cv_test_12(); add_cv_test_13(); +#ifndef BOOST_NO_RVALUE_REFERENCES + add_cv_test_5a(); + add_cv_test_6a(); +#endif TT_TEST_END diff --git a/test/add_reference_test.cpp b/test/add_reference_test.cpp index 7da4d35..5e47dd2 100644 --- a/test/add_reference_test.cpp +++ b/test/add_reference_test.cpp @@ -25,6 +25,11 @@ BOOST_DECL_TRANSFORM_TEST(add_reference_test_10, ::tt::add_reference, const*, co 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_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) @@ -41,6 +46,11 @@ TT_TEST_BEGIN(add_reference) add_reference_test_11(); add_reference_test_12(); add_reference_test_13(); +#ifndef BOOST_NO_RVALUE_REFERENCES + add_reference_test_5a(); + add_reference_test_6a(); + add_reference_test_13a(); +#endif TT_TEST_END diff --git a/test/add_volatile_test.cpp b/test/add_volatile_test.cpp index a13a20d..a9d5161 100644 --- a/test/add_volatile_test.cpp +++ b/test/add_volatile_test.cpp @@ -21,6 +21,9 @@ BOOST_DECL_TRANSFORM_TEST(add_volatile_test_10, ::tt::add_volatile, const*, cons 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_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]) @@ -41,6 +44,9 @@ TT_TEST_BEGIN(add_volatile) add_volatile_test_9(); add_volatile_test_12(); add_volatile_test_13(); +#ifndef BOOST_NO_RVALUE_REFERENCES + add_volatile_test_6a(); +#endif TT_TEST_END diff --git a/test/extent_test.cpp b/test/extent_test.cpp old mode 100755 new mode 100644 index 3a0b68c..6e5b699 --- a/test/extent_test.cpp +++ b/test/extent_test.cpp @@ -32,6 +32,12 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent::value), 40); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::extent::value), 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent::value, 0); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent::value, 0); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent::value, 0); +#endif + TT_TEST_END diff --git a/test/has_nothrow_assign_test.cpp b/test/has_nothrow_assign_test.cpp index bade588..a007396 100644 --- a/test/has_nothrow_assign_test.cpp +++ b/test/has_nothrow_assign_test.cpp @@ -184,6 +184,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true); diff --git a/test/has_nothrow_constr_test.cpp b/test/has_nothrow_constr_test.cpp index bf2cdb8..ad60226 100644 --- a/test/has_nothrow_constr_test.cpp +++ b/test/has_nothrow_constr_test.cpp @@ -142,6 +142,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true); diff --git a/test/has_nothrow_copy_test.cpp b/test/has_nothrow_copy_test.cpp index 4af60ea..216168a 100644 --- a/test/has_nothrow_copy_test.cpp +++ b/test/has_nothrow_copy_test.cpp @@ -181,6 +181,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); diff --git a/test/has_operator_new_test.cpp b/test/has_operator_new_test.cpp index cd7b863..0fefd84 100644 --- a/test/has_operator_new_test.cpp +++ b/test/has_operator_new_test.cpp @@ -181,6 +181,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); diff --git a/test/has_trivial_assign_test.cpp b/test/has_trivial_assign_test.cpp index 61be263..44254c5 100644 --- a/test/has_trivial_assign_test.cpp +++ b/test/has_trivial_assign_test.cpp @@ -176,6 +176,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true); diff --git a/test/has_trivial_constr_test.cpp b/test/has_trivial_constr_test.cpp index a651157..cc2d4c0 100644 --- a/test/has_trivial_constr_test.cpp +++ b/test/has_trivial_constr_test.cpp @@ -142,6 +142,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, true); diff --git a/test/has_trivial_copy_test.cpp b/test/has_trivial_copy_test.cpp index f845240..43e3fad 100644 --- a/test/has_trivial_copy_test.cpp +++ b/test/has_trivial_copy_test.cpp @@ -177,6 +177,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); diff --git a/test/has_virtual_destructor_test.cpp b/test/has_virtual_destructor_test.cpp index ceb86ea..ea5f323 100644 --- a/test/has_virtual_destructor_test.cpp +++ b/test/has_virtual_destructor_test.cpp @@ -41,6 +41,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor::value, fa BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor::value, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor::value, true, false); diff --git a/test/is_abstract_test.cpp b/test/is_abstract_test.cpp index 3f63aee..1e75fa9 100644 --- a/test/is_abstract_test.cpp +++ b/test/is_abstract_test.cpp @@ -226,6 +226,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract::value), BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract::value), false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract::value), false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_abstract::value), false); diff --git a/test/is_arithmetic_test.cpp b/test/is_arithmetic_test.cpp index ef51319..77fdc8b 100644 --- a/test/is_arithmetic_test.cpp +++ b/test/is_arithmetic_test.cpp @@ -136,6 +136,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic::value, false); diff --git a/test/is_array_test.cpp b/test/is_array_test.cpp index 4947ba1..3161906 100644 --- a/test/is_array_test.cpp +++ b/test/is_array_test.cpp @@ -32,6 +32,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, true BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_array::value, false); diff --git a/test/is_class_test.cpp b/test/is_class_test.cpp index d885986..6dd33d7 100644 --- a/test/is_class_test.cpp +++ b/test/is_class_test.cpp @@ -23,6 +23,9 @@ TT_TEST_BEGIN(is_class) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_class::value, false); diff --git a/test/is_const_test.cpp b/test/is_const_test.cpp index a73a894..856da5c 100644 --- a/test/is_const_test.cpp +++ b/test/is_const_test.cpp @@ -23,6 +23,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_const::value, false); diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index ece3079..564cff3 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -67,6 +67,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); diff --git a/test/is_empty_test.cpp b/test/is_empty_test.cpp index 337e072..83da327 100644 --- a/test/is_empty_test.cpp +++ b/test/is_empty_test.cpp @@ -24,6 +24,9 @@ TT_TEST_BEGIN(is_empty) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_empty::value, false); diff --git a/test/is_enum_test.cpp b/test/is_enum_test.cpp index 019eead..386b644 100644 --- a/test/is_enum_test.cpp +++ b/test/is_enum_test.cpp @@ -18,6 +18,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum::value, false); diff --git a/test/is_float_test.cpp b/test/is_float_test.cpp index f416581..4deaa2c 100644 --- a/test/is_float_test.cpp +++ b/test/is_float_test.cpp @@ -39,6 +39,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_float::value, false); diff --git a/test/is_floating_point_test.cpp b/test/is_floating_point_test.cpp old mode 100755 new mode 100644 index 262d51f..8b7bb63 --- a/test/is_floating_point_test.cpp +++ b/test/is_floating_point_test.cpp @@ -39,6 +39,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point::value, false); diff --git a/test/is_function_test.cpp b/test/is_function_test.cpp index f92a97d..902f94a 100644 --- a/test/is_function_test.cpp +++ b/test/is_function_test.cpp @@ -30,6 +30,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, false); #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, false); +#endif #else std::cout << "is_function will fail with some types (references for example)" diff --git a/test/is_fundamental_test.cpp b/test/is_fundamental_test.cpp index bf7fcbb..6eee342 100644 --- a/test/is_fundamental_test.cpp +++ b/test/is_fundamental_test.cpp @@ -140,6 +140,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental::value, false); diff --git a/test/is_integral_test.cpp b/test/is_integral_test.cpp index b589b5e..445e941 100644 --- a/test/is_integral_test.cpp +++ b/test/is_integral_test.cpp @@ -122,6 +122,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral::value, false); diff --git a/test/is_lvalue_reference_test.cpp b/test/is_lvalue_reference_test.cpp new file mode 100644 index 0000000..513df43 --- /dev/null +++ b/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) + +#include "test.hpp" +#include "check_integral_constant.hpp" +#ifdef TEST_STD +# include +#else +# include +#endif + +TT_TEST_BEGIN(is_lvalue_reference) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_lvalue_reference::value, false); +#endif + +TT_TEST_END + + + + + + + + diff --git a/test/is_object_test.cpp b/test/is_object_test.cpp index fb45268..1be06d6 100644 --- a/test/is_object_test.cpp +++ b/test/is_object_test.cpp @@ -17,6 +17,9 @@ TT_TEST_BEGIN(is_object) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_object::value, true); diff --git a/test/is_pod_test.cpp b/test/is_pod_test.cpp index c21a7af..c9d3135 100644 --- a/test/is_pod_test.cpp +++ b/test/is_pod_test.cpp @@ -142,6 +142,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod::value, true); diff --git a/test/is_pointer_test.cpp b/test/is_pointer_test.cpp index b20ccc2..6e4ea07 100644 --- a/test/is_pointer_test.cpp +++ b/test/is_pointer_test.cpp @@ -16,6 +16,9 @@ TT_TEST_BEGIN(is_pointer) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer::value, true); diff --git a/test/is_polymorphic_test.cpp b/test/is_polymorphic_test.cpp index fb82099..b49c606 100644 --- a/test/is_polymorphic_test.cpp +++ b/test/is_polymorphic_test.cpp @@ -32,6 +32,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic::value, false); diff --git a/test/is_reference_test.cpp b/test/is_reference_test.cpp index dd91187..aa5ed7f 100644 --- a/test/is_reference_test.cpp +++ b/test/is_reference_test.cpp @@ -35,6 +35,14 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); +#endif TT_TEST_END diff --git a/test/is_rvalue_reference_test.cpp b/test/is_rvalue_reference_test.cpp new file mode 100644 index 0000000..4c4bd10 --- /dev/null +++ b/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) + +#include "test.hpp" +#include "check_integral_constant.hpp" +#ifdef TEST_STD +# include +#else +# include +#endif + +TT_TEST_BEGIN(is_rvalue_reference) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +#endif + +TT_TEST_END + + + + + + + + diff --git a/test/is_same_test.cpp b/test/is_same_test.cpp index 7eb784b..6f30cf7 100644 --- a/test/is_same_test.cpp +++ b/test/is_same_test.cpp @@ -15,8 +15,15 @@ TT_TEST_BEGIN(is_same) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), true); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), true); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), false); diff --git a/test/is_scalar_test.cpp b/test/is_scalar_test.cpp index 49cdb0f..06c6914 100644 --- a/test/is_scalar_test.cpp +++ b/test/is_scalar_test.cpp @@ -144,6 +144,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar::value, false); TT_TEST_END diff --git a/test/is_signed_test.cpp b/test/is_signed_test.cpp old mode 100755 new mode 100644 index 548ec41..7e1a9a1 --- a/test/is_signed_test.cpp +++ b/test/is_signed_test.cpp @@ -25,6 +25,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed::value, false); diff --git a/test/is_stateless_test.cpp b/test/is_stateless_test.cpp index 8567d29..ab3381c 100644 --- a/test/is_stateless_test.cpp +++ b/test/is_stateless_test.cpp @@ -142,6 +142,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless::value, false); diff --git a/test/is_union_test.cpp b/test/is_union_test.cpp index a95ecc5..b021b29 100644 --- a/test/is_union_test.cpp +++ b/test/is_union_test.cpp @@ -22,6 +22,9 @@ TT_TEST_BEGIN(is_union) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES + BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union::value, false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_union::value, false); diff --git a/test/is_unsigned_test.cpp b/test/is_unsigned_test.cpp old mode 100755 new mode 100644 index 868d576..68c2574 --- a/test/is_unsigned_test.cpp +++ b/test/is_unsigned_test.cpp @@ -24,9 +24,12 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned::value, false); TT_TEST_END diff --git a/test/is_void_test.cpp b/test/is_void_test.cpp index 9bfde67..687fa40 100644 --- a/test/is_void_test.cpp +++ b/test/is_void_test.cpp @@ -28,6 +28,10 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void::value, false); +#endif TT_TEST_END diff --git a/test/is_volatile_test.cpp b/test/is_volatile_test.cpp index 1a91fd9..1ce20f8 100644 --- a/test/is_volatile_test.cpp +++ b/test/is_volatile_test.cpp @@ -32,6 +32,12 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, tr BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_volatile::value, false); +#endif TT_TEST_END diff --git a/test/rank_test.cpp b/test/rank_test.cpp old mode 100755 new mode 100644 index 7e3e094..049c311 --- a/test/rank_test.cpp +++ b/test/rank_test.cpp @@ -21,6 +21,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank::value, 2); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank::value, 3); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank::value, 0); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank::value, 0); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank::value, 0); +#endif TT_TEST_END diff --git a/test/remove_all_extents_test.cpp b/test/remove_all_extents_test.cpp old mode 100755 new mode 100644 index 155c8e3..609d3e5 --- a/test/remove_all_extents_test.cpp +++ b/test/remove_all_extents_test.cpp @@ -28,6 +28,10 @@ BOOST_DECL_TRANSFORM_TEST(remove_all_extents_test_13, ::tt::remove_all_extents, 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_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) @@ -47,6 +51,10 @@ TT_TEST_BEGIN(remove_all_extents) remove_all_extents_test_14(); remove_all_extents_test_15(); remove_all_extents_test_16(); +#ifndef BOOST_NO_RVALUE_REFERENCES + remove_all_extents_test_5a(); + remove_all_extents_test_13a(); +#endif TT_TEST_END diff --git a/test/remove_bounds_test.cpp b/test/remove_bounds_test.cpp index 5117908..9929f14 100644 --- a/test/remove_bounds_test.cpp +++ b/test/remove_bounds_test.cpp @@ -28,6 +28,10 @@ BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_13, ::tt::remove_bounds, (&)[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_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) @@ -47,6 +51,10 @@ TT_TEST_BEGIN(remove_bounds) remove_bounds_test_14(); remove_bounds_test_15(); remove_bounds_test_16(); +#ifndef BOOST_NO_RVALUE_REFERENCES + remove_bounds_test_5a(); + remove_bounds_test_13a(); +#endif TT_TEST_END diff --git a/test/remove_cv_test.cpp b/test/remove_cv_test.cpp index e718c61..869e25a 100644 --- a/test/remove_cv_test.cpp +++ b/test/remove_cv_test.cpp @@ -29,6 +29,9 @@ BOOST_DECL_TRANSFORM_TEST(remove_cv_test_14, ::tt::remove_cv, const volatile[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_RVALUE_REFERENCES +BOOST_DECL_TRANSFORM_TEST(remove_cv_test_5a, ::tt::remove_cv, const &&, const&&) +#endif TT_TEST_BEGIN(remove_cv) @@ -49,6 +52,9 @@ TT_TEST_BEGIN(remove_cv) remove_cv_test_15(); remove_cv_test_16(); remove_cv_test_17(); +#ifndef BOOST_NO_RVALUE_REFERENCES + remove_cv_test_5a(); +#endif TT_TEST_END diff --git a/test/remove_extent_test.cpp b/test/remove_extent_test.cpp old mode 100755 new mode 100644 index e0fa722..66407ef --- a/test/remove_extent_test.cpp +++ b/test/remove_extent_test.cpp @@ -28,6 +28,10 @@ BOOST_DECL_TRANSFORM_TEST(remove_extent_test_13, ::tt::remove_extent, (&)[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_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) @@ -47,6 +51,10 @@ TT_TEST_BEGIN(remove_extent) remove_extent_test_14(); remove_extent_test_15(); remove_extent_test_16(); +#ifndef BOOST_NO_RVALUE_REFERENCES + remove_extent_test_9a(); + remove_extent_test_13a(); +#endif TT_TEST_END diff --git a/test/remove_pointer_test.cpp b/test/remove_pointer_test.cpp index 97a1fdf..a04146e 100644 --- a/test/remove_pointer_test.cpp +++ b/test/remove_pointer_test.cpp @@ -25,6 +25,11 @@ BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_10, ::tt::remove_pointer, 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_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 TT_TEST_BEGIN(remove_pointer) @@ -41,6 +46,11 @@ TT_TEST_BEGIN(remove_pointer) remove_pointer_test_11(); remove_pointer_test_12(); remove_pointer_test_13(); +#ifndef BOOST_NO_RVALUE_REFERENCES + remove_pointer_test_5a(); + remove_pointer_test_6a(); + remove_pointer_test_13a(); +#endif TT_TEST_END diff --git a/test/remove_reference_test.cpp b/test/remove_reference_test.cpp index 6c79f6e..d92f64c 100644 --- a/test/remove_reference_test.cpp +++ b/test/remove_reference_test.cpp @@ -25,6 +25,13 @@ BOOST_DECL_TRANSFORM_TEST(remove_reference_test_10, ::tt::remove_reference, cons 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_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) @@ -41,6 +48,13 @@ TT_TEST_BEGIN(remove_reference) remove_reference_test_11(); remove_reference_test_12(); remove_reference_test_13(); +#ifndef BOOST_NO_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/test/tricky_add_pointer_test.cpp b/test/tricky_add_pointer_test.cpp index ba8e51a..4d13497 100644 --- a/test/tricky_add_pointer_test.cpp +++ b/test/tricky_add_pointer_test.cpp @@ -18,7 +18,12 @@ BOOST_DECL_TRANSFORM_TEST(add_pointer_test_8, ::tt::add_pointer, const [2], cons 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_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) @@ -28,6 +33,12 @@ TT_TEST_BEGIN(tricky_add_pointer_test) add_pointer_test_9(); add_pointer_test_12(); add_pointer_test_13(); +#ifndef BOOST_NO_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/test/tricky_partial_spec_test.cpp b/test/tricky_partial_spec_test.cpp index ce7e005..1f7df70 100644 --- a/test/tricky_partial_spec_test.cpp +++ b/test/tricky_partial_spec_test.cpp @@ -63,6 +63,11 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same::value), true); diff --git a/test/tricky_rvalue_test.cpp b/test/tricky_rvalue_test.cpp new file mode 100644 index 0000000..5c01402 --- /dev/null +++ b/test/tricky_rvalue_test.cpp @@ -0,0 +1,33 @@ + +// (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 "test.hpp" +#include "check_integral_constant.hpp" +#ifdef TEST_STD +# include +#else +# include +# include +# include +#endif + +TT_TEST_BEGIN(rvalue_reference_test) + +#ifndef BOOST_NO_RVALUE_REFERENCES +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_reference::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_rvalue_reference::value, true); +#endif + +TT_TEST_END + + + + + + + +