|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63486 - in trunk: boost/type_traits libs/regex/test libs/type_traits/test
From: john_at_[hidden]
Date: 2010-07-02 14:54:00
Author: johnmaddock
Date: 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
New Revision: 63486
URL: http://svn.boost.org/trac/boost/changeset/63486
Log:
Update the type_traits library to handle rvalue references.
Add is_lvalue_reference and is_rvalue_reference traits.
Added:
trunk/boost/type_traits/is_lvalue_reference.hpp (contents, props changed)
trunk/boost/type_traits/is_rvalue_reference.hpp (contents, props changed)
trunk/libs/type_traits/test/is_lvalue_reference_test.cpp (contents, props changed)
trunk/libs/type_traits/test/is_rvalue_reference_test.cpp (contents, props changed)
trunk/libs/type_traits/test/tricky_rvalue_test.cpp (contents, props changed)
Text files modified:
trunk/boost/type_traits/add_reference.hpp | 20 ++++++++
trunk/boost/type_traits/is_const.hpp | 25 +++++++++-
trunk/boost/type_traits/is_function.hpp | 3 +
trunk/boost/type_traits/is_reference.hpp | 89 +++------------------------------------
trunk/boost/type_traits/is_volatile.hpp | 29 ++++++++++--
trunk/boost/type_traits/remove_const.hpp | 12 +++++
trunk/boost/type_traits/remove_cv.hpp | 24 ++++++++++
trunk/boost/type_traits/remove_reference.hpp | 22 +++++++++
trunk/boost/type_traits/remove_volatile.hpp | 11 ++++
trunk/libs/regex/test/Jamfile.v2 | 34 ++++++++++++++
trunk/libs/type_traits/test/add_const_test.cpp | 8 +++
trunk/libs/type_traits/test/add_cv_test.cpp | 8 +++
trunk/libs/type_traits/test/add_reference_test.cpp | 10 ++++
trunk/libs/type_traits/test/add_volatile_test.cpp | 6 ++
trunk/libs/type_traits/test/extent_test.cpp | 6 ++
trunk/libs/type_traits/test/has_nothrow_assign_test.cpp | 3 +
trunk/libs/type_traits/test/has_nothrow_constr_test.cpp | 3 +
trunk/libs/type_traits/test/has_nothrow_copy_test.cpp | 3 +
trunk/libs/type_traits/test/has_operator_new_test.cpp | 3 +
trunk/libs/type_traits/test/has_trivial_assign_test.cpp | 3 +
trunk/libs/type_traits/test/has_trivial_constr_test.cpp | 3 +
trunk/libs/type_traits/test/has_trivial_copy_test.cpp | 3 +
trunk/libs/type_traits/test/has_virtual_destructor_test.cpp | 3 +
trunk/libs/type_traits/test/is_abstract_test.cpp | 3 +
trunk/libs/type_traits/test/is_arithmetic_test.cpp | 3 +
trunk/libs/type_traits/test/is_array_test.cpp | 3 +
trunk/libs/type_traits/test/is_class_test.cpp | 3 +
trunk/libs/type_traits/test/is_const_test.cpp | 3 +
trunk/libs/type_traits/test/is_convertible_test.cpp | 3 +
trunk/libs/type_traits/test/is_empty_test.cpp | 3 +
trunk/libs/type_traits/test/is_enum_test.cpp | 3 +
trunk/libs/type_traits/test/is_float_test.cpp | 3 +
trunk/libs/type_traits/test/is_floating_point_test.cpp | 3 +
trunk/libs/type_traits/test/is_function_test.cpp | 3 +
trunk/libs/type_traits/test/is_fundamental_test.cpp | 3 +
trunk/libs/type_traits/test/is_integral_test.cpp | 3 +
trunk/libs/type_traits/test/is_object_test.cpp | 3 +
trunk/libs/type_traits/test/is_pod_test.cpp | 3 +
trunk/libs/type_traits/test/is_pointer_test.cpp | 3 +
trunk/libs/type_traits/test/is_polymorphic_test.cpp | 3 +
trunk/libs/type_traits/test/is_reference_test.cpp | 8 +++
trunk/libs/type_traits/test/is_same_test.cpp | 7 +++
trunk/libs/type_traits/test/is_scalar_test.cpp | 3 +
trunk/libs/type_traits/test/is_signed_test.cpp | 3 +
trunk/libs/type_traits/test/is_stateless_test.cpp | 3 +
trunk/libs/type_traits/test/is_union_test.cpp | 3 +
trunk/libs/type_traits/test/is_unsigned_test.cpp | 9 ++-
trunk/libs/type_traits/test/is_void_test.cpp | 4 +
trunk/libs/type_traits/test/is_volatile_test.cpp | 6 ++
trunk/libs/type_traits/test/rank_test.cpp | 3 +
trunk/libs/type_traits/test/remove_all_extents_test.cpp | 8 +++
trunk/libs/type_traits/test/remove_bounds_test.cpp | 8 +++
trunk/libs/type_traits/test/remove_cv_test.cpp | 6 ++
trunk/libs/type_traits/test/remove_extent_test.cpp | 8 +++
trunk/libs/type_traits/test/remove_pointer_test.cpp | 10 ++++
trunk/libs/type_traits/test/remove_reference_test.cpp | 14 ++++++
trunk/libs/type_traits/test/tricky_add_pointer_test.cpp | 13 +++++
trunk/libs/type_traits/test/tricky_partial_spec_test.cpp | 5 ++
58 files changed, 406 insertions(+), 97 deletions(-)
Modified: trunk/boost/type_traits/add_reference.hpp
==============================================================================
--- trunk/boost/type_traits/add_reference.hpp (original)
+++ trunk/boost/type_traits/add_reference.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -51,13 +51,31 @@
};
#else
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
template <typename T>
-struct add_reference_impl
+struct add_reference_rvalue_layer
{
typedef T& type;
};
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <typename T>
+struct add_reference_rvalue_layer<T&&>
+{
+ typedef T&& type;
+};
+#endif
+
+template <typename T>
+struct add_reference_impl
+{
+ typedef typename add_reference_rvalue_layer<T>::type type;
+};
+
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&)
#endif
Modified: trunk/boost/type_traits/is_const.hpp
==============================================================================
--- trunk/boost/type_traits/is_const.hpp (original)
+++ trunk/boost/type_traits/is_const.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -50,12 +50,31 @@
#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-//* is a type T declared const - is_const<T>
+namespace detail{
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+template <class T>
+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<typename remove_bounds<T>::type*>::is_const)
+ BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_const);
#else
- BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp<T*>::is_const)
+ BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_const);
+#endif
+};
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <class T>
+struct is_const_rvalue_filter<T&&>
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
#endif
+}
+
+//* is a type T declared const - is_const<T>
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_rvalue_filter<T>::value)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false)
#if defined(BOOST_ILLEGAL_CV_REFERENCES)
Modified: trunk/boost/type_traits/is_function.hpp
==============================================================================
--- trunk/boost/type_traits/is_function.hpp (original)
+++ trunk/boost/type_traits/is_function.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -95,6 +95,9 @@
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<T>::value)
+#ifndef BOOST_NO_RVALUE_REFERENCES
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_function,T&&,false)
+#endif
#endif
} // namespace boost
Added: trunk/boost/type_traits/is_lvalue_reference.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/type_traits/is_lvalue_reference.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -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<Programming>:
+// 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 <boost/type_traits/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost/type_traits/detail/yes_no_type.hpp>
+# include <boost/type_traits/detail/wrap.hpp>
+#endif
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+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<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T volatile ,::boost::is_lvalue_reference<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const volatile ,::boost::is_lvalue_reference<T>::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 <class T> T&(* is_lvalue_reference_helper1(wrap<T>) )(wrap<T>);
+char is_lvalue_reference_helper1(...);
+
+template <class T> no_type is_lvalue_reference_helper2(T&(*)(wrap<T>));
+yes_type is_lvalue_reference_helper2(...);
+
+template <typename T>
+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<T>()))) == 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<T>::value)
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
Modified: trunk/boost/type_traits/is_reference.hpp
==============================================================================
--- trunk/boost/type_traits/is_reference.hpp (original)
+++ trunk/boost/type_traits/is_reference.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -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<Programming>:
-// 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 <boost/type_traits/config.hpp>
-
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-# include <boost/type_traits/detail/yes_no_type.hpp>
-# include <boost/type_traits/detail/wrap.hpp>
-#endif
+#include <boost/type_traits/is_lvalue_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/ice.hpp>
// should be the last #include
#include <boost/type_traits/detail/bool_trait_def.hpp>
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<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T volatile ,::boost::is_reference<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T const volatile ,::boost::is_reference<T>::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 <class T> T&(* is_reference_helper1(wrap<T>) )(wrap<T>);
-char is_reference_helper1(...);
-
-template <class T> no_type is_reference_helper2(T&(*)(wrap<T>));
-yes_type is_reference_helper2(...);
-
template <typename T>
struct is_reference_impl
{
- BOOST_STATIC_CONSTANT(
- bool, value = sizeof(
- ::boost::detail::is_reference_helper2(
- ::boost::detail::is_reference_helper1(::boost::type_traits::wrap<T>()))) == 1
- );
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_lvalue_reference<T>::value, ::boost::is_rvalue_reference<T>::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<T>::value)
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
} // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
Added: trunk/boost/type_traits/is_rvalue_reference.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/type_traits/is_rvalue_reference.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -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 <boost/type_traits/config.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+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 <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
Modified: trunk/boost/type_traits/is_volatile.hpp
==============================================================================
--- trunk/boost/type_traits/is_volatile.hpp (original)
+++ trunk/boost/type_traits/is_volatile.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -41,16 +41,35 @@
namespace boost {
+namespace detail{
+template <class T>
+struct is_volatile_rval_filter
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+ BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_volatile);
+#else
+ BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::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 <class T>
+struct is_volatile_rval_filter<T&&>
+{
+ 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<T>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
- BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_volatile)
-#else
- BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp<T*>::is_volatile)
-#endif
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter<T>::value)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false)
#if defined(BOOST_ILLEGAL_CV_REFERENCES)
Modified: trunk/boost/type_traits/remove_const.hpp
==============================================================================
--- trunk/boost/type_traits/remove_const.hpp (original)
+++ trunk/boost/type_traits/remove_const.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -54,6 +54,18 @@
>::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 <typename T>
+struct remove_const_impl<T&&>
+{
+ typedef T&& type;
+};
+#endif
+
} // namespace detail
// * convert a type T to non-const type - remove_const<T>
Modified: trunk/boost/type_traits/remove_cv.hpp
==============================================================================
--- trunk/boost/type_traits/remove_cv.hpp (original)
+++ trunk/boost/type_traits/remove_cv.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -27,10 +27,32 @@
namespace boost {
+namespace detail{
+
+template <class T>
+struct rvalue_ref_filter_rem_cv
+{
+ typedef typename boost::detail::cv_traits_imp<T*>::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 <class T>
+struct rvalue_ref_filter_rem_cv<T&&>
+{
+ typedef T&& type;
+};
+#endif
+
+}
+
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// convert a type T to a non-cv-qualified type - remove_cv<T>
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::cv_traits_imp<T*>::unqualified_type)
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::rvalue_ref_filter_rem_cv<T>::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])
Modified: trunk/boost/type_traits/remove_reference.hpp
==============================================================================
--- trunk/boost/type_traits/remove_reference.hpp (original)
+++ trunk/boost/type_traits/remove_reference.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -24,7 +24,27 @@
#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 <class T>
+struct remove_rvalue_ref
+{
+ typedef T type;
+};
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <class T>
+struct remove_rvalue_ref<T&&>
+{
+ typedef T type;
+};
+#endif
+
+} // namespace detail
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename detail::remove_rvalue_ref<T>::type)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T)
#if defined(BOOST_ILLEGAL_CV_REFERENCES)
Modified: trunk/boost/type_traits/remove_volatile.hpp
==============================================================================
--- trunk/boost/type_traits/remove_volatile.hpp (original)
+++ trunk/boost/type_traits/remove_volatile.hpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -53,6 +53,17 @@
>::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 <typename T>
+struct remove_volatile_impl<T&&>
+{
+ typedef T&& type;
+};
+#endif
} // namespace detail
// * convert a type T to a non-volatile type - remove_volatile<T>
Modified: trunk/libs/regex/test/Jamfile.v2
==============================================================================
--- trunk/libs/regex/test/Jamfile.v2 (original)
+++ trunk/libs/regex/test/Jamfile.v2 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -60,6 +60,30 @@
test_operators.cpp
;
+lib boost_regex_recursive :
+ ../src/c_regex_traits.cpp
+ ../src/cpp_regex_traits.cpp
+ ../src/cregex.cpp
+ ../src/fileiter.cpp
+ ../src/icu.cpp
+ ../src/instances.cpp
+ ../src/posix_api.cpp
+ ../src/regex.cpp
+ ../src/regex_debug.cpp
+ ../src/regex_raw_buffer.cpp
+ ../src/regex_traits_defaults.cpp
+ ../src/static_mutex.cpp
+ ../src/w32_regex_traits.cpp
+ ../src/wc_regex_traits.cpp
+ ../src/wide_posix_api.cpp
+ ../src/winstances.cpp
+ ../src/usinstances.cpp
+ :
+ <define>BOOST_REGEX_RECURSIVE=1
+ <link>shared:<define>BOOST_REGEX_DYN_LINK=1
+ :
+ ;
+
local regress-sources = regress/$(R_SOURCE) ;
test-suite regex
@@ -142,6 +166,14 @@
: # test name
captures_test
]
+
+[ run regress/$(R_SOURCE) .//boost_regex_recursive
+ ../build//icu_options
+ : # command line
+ : # input files
+ : # requirements
+ <define>BOOST_REGEX_RECURSIVE=1
+ : regex_regress_recursive ]
;
-
+
build-project ../example ;
Modified: trunk/libs/type_traits/test/add_const_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/add_const_test.cpp (original)
+++ trunk/libs/type_traits/test/add_const_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -21,6 +21,10 @@
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 @@
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
Modified: trunk/libs/type_traits/test/add_cv_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/add_cv_test.cpp (original)
+++ trunk/libs/type_traits/test/add_cv_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -21,6 +21,10 @@
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 @@
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
Modified: trunk/libs/type_traits/test/add_reference_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/add_reference_test.cpp (original)
+++ trunk/libs/type_traits/test/add_reference_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -25,6 +25,11 @@
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 @@
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
Modified: trunk/libs/type_traits/test/add_volatile_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/add_volatile_test.cpp (original)
+++ trunk/libs/type_traits/test/add_volatile_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -21,6 +21,9 @@
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 @@
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
Modified: trunk/libs/type_traits/test/extent_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/extent_test.cpp (original)
+++ trunk/libs/type_traits/test/extent_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -32,6 +32,12 @@
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_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::extent<int&&>::value, 0);
+#endif
+
TT_TEST_END
Modified: trunk/libs/type_traits/test/has_nothrow_assign_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_nothrow_assign_test.cpp (original)
+++ trunk/libs/type_traits/test/has_nothrow_assign_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -184,6 +184,9 @@
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_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);
Modified: trunk/libs/type_traits/test/has_nothrow_constr_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_nothrow_constr_test.cpp (original)
+++ trunk/libs/type_traits/test/has_nothrow_constr_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -142,6 +142,9 @@
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_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);
Modified: trunk/libs/type_traits/test/has_nothrow_copy_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_nothrow_copy_test.cpp (original)
+++ trunk/libs/type_traits/test/has_nothrow_copy_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -181,6 +181,9 @@
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_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);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy<int[3][2]>::value, true);
Modified: trunk/libs/type_traits/test/has_operator_new_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_operator_new_test.cpp (original)
+++ trunk/libs/type_traits/test/has_operator_new_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -181,6 +181,9 @@
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_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);
Modified: trunk/libs/type_traits/test/has_trivial_assign_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_trivial_assign_test.cpp (original)
+++ trunk/libs/type_traits/test/has_trivial_assign_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -176,6 +176,9 @@
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_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);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign<int[3][2]>::value, true);
Modified: trunk/libs/type_traits/test/has_trivial_constr_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_trivial_constr_test.cpp (original)
+++ trunk/libs/type_traits/test/has_trivial_constr_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -142,6 +142,9 @@
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_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);
Modified: trunk/libs/type_traits/test/has_trivial_copy_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_trivial_copy_test.cpp (original)
+++ trunk/libs/type_traits/test/has_trivial_copy_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -177,6 +177,9 @@
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_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);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int[2]>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy<int[3][2]>::value, true);
Modified: trunk/libs/type_traits/test/has_virtual_destructor_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/has_virtual_destructor_test.cpp (original)
+++ trunk/libs/type_traits/test/has_virtual_destructor_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -41,6 +41,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_abstract_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_abstract_test.cpp (original)
+++ trunk/libs/type_traits/test/is_abstract_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -226,6 +226,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_arithmetic_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_arithmetic_test.cpp (original)
+++ trunk/libs/type_traits/test/is_arithmetic_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -136,6 +136,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_array_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_array_test.cpp (original)
+++ trunk/libs/type_traits/test/is_array_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -32,6 +32,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_class_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_class_test.cpp (original)
+++ trunk/libs/type_traits/test/is_class_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -23,6 +23,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_const_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_const_test.cpp (original)
+++ trunk/libs/type_traits/test/is_const_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -23,6 +23,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_convertible_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_convertible_test.cpp (original)
+++ trunk/libs/type_traits/test/is_convertible_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -67,6 +67,9 @@
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_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<const int&&, int>::value), true);
+#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);
Modified: trunk/libs/type_traits/test/is_empty_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_empty_test.cpp (original)
+++ trunk/libs/type_traits/test/is_empty_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -24,6 +24,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_enum_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_enum_test.cpp (original)
+++ trunk/libs/type_traits/test/is_enum_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -18,6 +18,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_float_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_float_test.cpp (original)
+++ trunk/libs/type_traits/test/is_float_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -39,6 +39,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_floating_point_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_floating_point_test.cpp (original)
+++ trunk/libs/type_traits/test/is_floating_point_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -39,6 +39,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_function_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_function_test.cpp (original)
+++ trunk/libs/type_traits/test/is_function_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -30,6 +30,9 @@
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_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)"
Modified: trunk/libs/type_traits/test/is_fundamental_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_fundamental_test.cpp (original)
+++ trunk/libs/type_traits/test/is_fundamental_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -140,6 +140,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_integral_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_integral_test.cpp (original)
+++ trunk/libs/type_traits/test/is_integral_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -122,6 +122,9 @@
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_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);
Added: trunk/libs/type_traits/test/is_lvalue_reference_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/type_traits/test/is_lvalue_reference_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -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 <type_traits>
+#else
+# include <boost/type_traits/is_lvalue_reference.hpp>
+#endif
+
+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_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
+
+
+
+
+
+
+
+
Modified: trunk/libs/type_traits/test/is_object_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_object_test.cpp (original)
+++ trunk/libs/type_traits/test/is_object_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -17,6 +17,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_pod_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_pod_test.cpp (original)
+++ trunk/libs/type_traits/test/is_pod_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -142,6 +142,9 @@
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<enum_UDT>::value, true);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<int&>::value, false);
+#ifndef BOOST_NO_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);
Modified: trunk/libs/type_traits/test/is_pointer_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_pointer_test.cpp (original)
+++ trunk/libs/type_traits/test/is_pointer_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -16,6 +16,9 @@
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pointer<int&>::value, false);
+#ifndef BOOST_NO_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);
Modified: trunk/libs/type_traits/test/is_polymorphic_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_polymorphic_test.cpp (original)
+++ trunk/libs/type_traits/test/is_polymorphic_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -32,6 +32,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_reference_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_reference_test.cpp (original)
+++ trunk/libs/type_traits/test/is_reference_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -35,6 +35,14 @@
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_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
Added: trunk/libs/type_traits/test/is_rvalue_reference_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/type_traits/test/is_rvalue_reference_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -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 <type_traits>
+#else
+# include <boost/type_traits/is_rvalue_reference.hpp>
+#endif
+
+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_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
+
+
+
+
+
+
+
+
Modified: trunk/libs/type_traits/test/is_same_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_same_test.cpp (original)
+++ trunk/libs/type_traits/test/is_same_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -15,8 +15,15 @@
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_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_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);
Modified: trunk/libs/type_traits/test/is_scalar_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_scalar_test.cpp (original)
+++ trunk/libs/type_traits/test/is_scalar_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -144,6 +144,9 @@
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_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<int&&>::value, false);
+#endif
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<test_abc1>::value, false);
TT_TEST_END
Modified: trunk/libs/type_traits/test/is_signed_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_signed_test.cpp (original)
+++ trunk/libs/type_traits/test/is_signed_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -25,6 +25,9 @@
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed<int&>::value, false);
+#ifndef BOOST_NO_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);
Modified: trunk/libs/type_traits/test/is_stateless_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_stateless_test.cpp (original)
+++ trunk/libs/type_traits/test/is_stateless_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -142,6 +142,9 @@
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<enum_UDT>::value, false);
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_stateless<int&>::value, false);
+#ifndef BOOST_NO_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);
Modified: trunk/libs/type_traits/test/is_union_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_union_test.cpp (original)
+++ trunk/libs/type_traits/test/is_union_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -22,6 +22,9 @@
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_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);
Modified: trunk/libs/type_traits/test/is_unsigned_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_unsigned_test.cpp (original)
+++ trunk/libs/type_traits/test/is_unsigned_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -24,9 +24,12 @@
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<int&>::value, false);
-BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<int*>::value, false);
-BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<int[2]>::value, false);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned<unsigned&>::value, false);
+#ifndef BOOST_NO_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);
TT_TEST_END
Modified: trunk/libs/type_traits/test/is_void_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_void_test.cpp (original)
+++ trunk/libs/type_traits/test/is_void_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -28,6 +28,10 @@
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_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_void<int&&>::value, false);
+#endif
TT_TEST_END
Modified: trunk/libs/type_traits/test/is_volatile_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/is_volatile_test.cpp (original)
+++ trunk/libs/type_traits/test/is_volatile_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -32,6 +32,12 @@
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_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
Modified: trunk/libs/type_traits/test/rank_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/rank_test.cpp (original)
+++ trunk/libs/type_traits/test/rank_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -21,6 +21,9 @@
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_RVALUE_REFERENCES
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::rank<int (&&)[5][10]>::value, 0);
+#endif
TT_TEST_END
Modified: trunk/libs/type_traits/test/remove_all_extents_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/remove_all_extents_test.cpp (original)
+++ trunk/libs/type_traits/test/remove_all_extents_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -28,6 +28,10 @@
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 @@
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
Modified: trunk/libs/type_traits/test/remove_bounds_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/remove_bounds_test.cpp (original)
+++ trunk/libs/type_traits/test/remove_bounds_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -28,6 +28,10 @@
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 @@
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
Modified: trunk/libs/type_traits/test/remove_cv_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/remove_cv_test.cpp (original)
+++ trunk/libs/type_traits/test/remove_cv_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -29,6 +29,9 @@
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 @@
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
Modified: trunk/libs/type_traits/test/remove_extent_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/remove_extent_test.cpp (original)
+++ trunk/libs/type_traits/test/remove_extent_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -28,6 +28,10 @@
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 @@
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
Modified: trunk/libs/type_traits/test/remove_pointer_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/remove_pointer_test.cpp (original)
+++ trunk/libs/type_traits/test/remove_pointer_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -25,6 +25,11 @@
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 @@
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
Modified: trunk/libs/type_traits/test/remove_reference_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/remove_reference_test.cpp (original)
+++ trunk/libs/type_traits/test/remove_reference_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -25,6 +25,13 @@
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 @@
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
Modified: trunk/libs/type_traits/test/tricky_add_pointer_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/tricky_add_pointer_test.cpp (original)
+++ trunk/libs/type_traits/test/tricky_add_pointer_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -18,7 +18,12 @@
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 @@
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
Modified: trunk/libs/type_traits/test/tricky_partial_spec_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/tricky_partial_spec_test.cpp (original)
+++ trunk/libs/type_traits/test/tricky_partial_spec_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -63,6 +63,11 @@
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_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);
Added: trunk/libs/type_traits/test/tricky_rvalue_test.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/type_traits/test/tricky_rvalue_test.cpp 2010-07-01 11:55:48 EDT (Thu, 01 Jul 2010)
@@ -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 <type_traits>
+#else
+# include <boost/type_traits/is_lvalue_reference.hpp>
+# include <boost/type_traits/is_rvalue_reference.hpp>
+# include <boost/type_traits/is_reference.hpp>
+#endif
+
+TT_TEST_BEGIN(rvalue_reference_test)
+
+#ifndef BOOST_NO_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);
+#endif
+
+TT_TEST_END
+
+
+
+
+
+
+
+
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk