aboutsummaryrefslogtreecommitdiff
path: root/cutl/details/boost/type_traits
diff options
context:
space:
mode:
Diffstat (limited to 'cutl/details/boost/type_traits')
-rw-r--r--cutl/details/boost/type_traits/add_lvalue_reference.hpp26
-rw-r--r--cutl/details/boost/type_traits/add_reference.hpp2
-rw-r--r--cutl/details/boost/type_traits/add_rvalue_reference.hpp66
-rw-r--r--cutl/details/boost/type_traits/alignment_of.hpp2
-rw-r--r--cutl/details/boost/type_traits/config.hpp2
-rw-r--r--cutl/details/boost/type_traits/detail/bool_trait_def.hpp29
-rw-r--r--cutl/details/boost/type_traits/detail/bool_trait_undef.hpp5
-rw-r--r--cutl/details/boost/type_traits/detail/cv_traits_impl.hpp2
-rw-r--r--cutl/details/boost/type_traits/detail/is_function_ptr_tester.hpp2
-rw-r--r--cutl/details/boost/type_traits/detail/size_t_trait_def.hpp10
-rw-r--r--cutl/details/boost/type_traits/detail/size_t_trait_undef.hpp2
-rw-r--r--cutl/details/boost/type_traits/detail/type_trait_def.hpp10
-rw-r--r--cutl/details/boost/type_traits/detail/type_trait_undef.hpp2
-rw-r--r--cutl/details/boost/type_traits/intrinsics.hpp186
-rw-r--r--cutl/details/boost/type_traits/is_abstract.hpp2
-rw-r--r--cutl/details/boost/type_traits/is_array.hpp2
-rw-r--r--cutl/details/boost/type_traits/is_const.hpp6
-rw-r--r--cutl/details/boost/type_traits/is_convertible.hpp106
-rw-r--r--cutl/details/boost/type_traits/is_enum.hpp2
-rw-r--r--cutl/details/boost/type_traits/is_function.hpp13
-rw-r--r--cutl/details/boost/type_traits/is_integral.hpp7
-rw-r--r--cutl/details/boost/type_traits/is_member_function_pointer.hpp4
-rw-r--r--cutl/details/boost/type_traits/is_member_pointer.hpp4
-rw-r--r--cutl/details/boost/type_traits/is_pod.hpp18
-rw-r--r--cutl/details/boost/type_traits/is_pointer.hpp4
-rw-r--r--cutl/details/boost/type_traits/is_rvalue_reference.hpp2
-rw-r--r--cutl/details/boost/type_traits/is_union.hpp8
-rw-r--r--cutl/details/boost/type_traits/is_volatile.hpp6
-rw-r--r--cutl/details/boost/type_traits/msvc/typeof.hpp4
-rw-r--r--cutl/details/boost/type_traits/remove_const.hpp2
-rw-r--r--cutl/details/boost/type_traits/remove_cv.hpp5
-rw-r--r--cutl/details/boost/type_traits/remove_pointer.hpp53
-rw-r--r--cutl/details/boost/type_traits/remove_reference.hpp2
-rw-r--r--cutl/details/boost/type_traits/type_with_alignment.hpp10
34 files changed, 457 insertions, 149 deletions
diff --git a/cutl/details/boost/type_traits/add_lvalue_reference.hpp b/cutl/details/boost/type_traits/add_lvalue_reference.hpp
new file mode 100644
index 0000000..a258255
--- /dev/null
+++ b/cutl/details/boost/type_traits/add_lvalue_reference.hpp
@@ -0,0 +1,26 @@
+// Copyright 2010 John Maddock
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
+#define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
+
+#include <cutl/details/boost/type_traits/add_reference.hpp>
+
+// should be the last #include
+#include <cutl/details/boost/type_traits/detail/type_trait_def.hpp>
+
+namespace cutl_details_boost{
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_lvalue_reference,T,typename cutl_details_boost::add_reference<T>::type)
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_lvalue_reference,T&&,T&)
+#endif
+
+}
+
+#include <cutl/details/boost/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
diff --git a/cutl/details/boost/type_traits/add_reference.hpp b/cutl/details/boost/type_traits/add_reference.hpp
index 0339cc8..2467326 100644
--- a/cutl/details/boost/type_traits/add_reference.hpp
+++ b/cutl/details/boost/type_traits/add_reference.hpp
@@ -62,7 +62,7 @@ struct add_reference_rvalue_layer
typedef T& type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename T>
struct add_reference_rvalue_layer<T&&>
{
diff --git a/cutl/details/boost/type_traits/add_rvalue_reference.hpp b/cutl/details/boost/type_traits/add_rvalue_reference.hpp
new file mode 100644
index 0000000..2adb737
--- /dev/null
+++ b/cutl/details/boost/type_traits/add_rvalue_reference.hpp
@@ -0,0 +1,66 @@
+// add_rvalue_reference.hpp ---------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
+#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
+
+#include <cutl/details/boost/config.hpp>
+
+//----------------------------------------------------------------------------//
+
+#include <cutl/details/boost/type_traits/is_void.hpp>
+#include <cutl/details/boost/type_traits/is_reference.hpp>
+
+// should be the last #include
+#include <cutl/details/boost/type_traits/detail/type_trait_def.hpp>
+
+//----------------------------------------------------------------------------//
+// //
+// C++03 implementation of //
+// 20.9.7.2 Reference modifications [meta.trans.ref] //
+// Written by Vicente J. Botet Escriba //
+// //
+// If T names an object or function type then the member typedef type
+// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects
+// the semantics of reference collapsing. For example, when a type T names
+// a type T1&, the type add_rvalue_reference<T>::type is not an rvalue
+// reference. -end note ]
+//----------------------------------------------------------------------------//
+
+namespace cutl_details_boost {
+
+namespace type_traits_detail {
+
+ template <typename T, bool b>
+ struct add_rvalue_reference_helper
+ { typedef T type; };
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ template <typename T>
+ struct add_rvalue_reference_helper<T, true>
+ {
+ typedef T&& type;
+ };
+#endif
+
+ template <typename T>
+ struct add_rvalue_reference_imp
+ {
+ typedef typename cutl_details_boost::type_traits_detail::add_rvalue_reference_helper
+ <T, (is_void<T>::value == false && is_reference<T>::value == false) >::type type;
+ };
+
+}
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_rvalue_reference,T,typename cutl_details_boost::type_traits_detail::add_rvalue_reference_imp<T>::type)
+
+} // namespace cutl_details_boost
+
+#include <cutl/details/boost/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
+
diff --git a/cutl/details/boost/type_traits/alignment_of.hpp b/cutl/details/boost/type_traits/alignment_of.hpp
index 4028d9a..70fd3be 100644
--- a/cutl/details/boost/type_traits/alignment_of.hpp
+++ b/cutl/details/boost/type_traits/alignment_of.hpp
@@ -93,7 +93,7 @@ BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::cutl_details_boost::detail::alig
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <typename T>
struct alignment_of<T&>
- : alignment_of<T*>
+ : public alignment_of<T*>
{
};
#endif
diff --git a/cutl/details/boost/type_traits/config.hpp b/cutl/details/boost/type_traits/config.hpp
index 6aa5a71..7a687b2 100644
--- a/cutl/details/boost/type_traits/config.hpp
+++ b/cutl/details/boost/type_traits/config.hpp
@@ -16,7 +16,7 @@
#include <cutl/details/boost/detail/workaround.hpp>
//
-// whenever we have a conversion function with elipses
+// whenever we have a conversion function with ellipses
// it needs to be declared __cdecl to suppress compiler
// warnings from MS and Borland compilers (this *must*
// appear before we include is_same.hpp below):
diff --git a/cutl/details/boost/type_traits/detail/bool_trait_def.hpp b/cutl/details/boost/type_traits/detail/bool_trait_def.hpp
index 82da405..cd2971a 100644
--- a/cutl/details/boost/type_traits/detail/bool_trait_def.hpp
+++ b/cutl/details/boost/type_traits/detail/bool_trait_def.hpp
@@ -8,8 +8,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2006-07-12 07:10:22 -0400 (Wed, 12 Jul 2006) $
-// $Revision: 34511 $
+// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $
+// $Revision: 74865 $
#include <cutl/details/boost/type_traits/detail/template_arity_spec.hpp>
#include <cutl/details/boost/type_traits/integral_constant.hpp>
@@ -60,7 +60,7 @@
#endif
#ifndef BOOST_TT_AUX_BOOL_C_BASE
-# define BOOST_TT_AUX_BOOL_C_BASE(C) : ::cutl_details_boost::integral_constant<bool,C>
+# define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::cutl_details_boost::integral_constant<bool,C>
#endif
@@ -68,6 +68,7 @@
template< typename T > struct trait \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
}; \
@@ -80,6 +81,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
template< typename T1, typename T2 > struct trait \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \
}; \
@@ -87,10 +89,23 @@ template< typename T1, typename T2 > struct trait \
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \
/**/
+#define BOOST_TT_AUX_BOOL_TRAIT_DEF3(trait,T1,T2,T3,C) \
+template< typename T1, typename T2, typename T3 > struct trait \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
+{ \
+public:\
+ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,trait,(T1,T2,T3)) \
+}; \
+\
+BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(3,trait) \
+/**/
+
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \
template<> struct trait< sp > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(sp)) \
}; \
@@ -100,6 +115,7 @@ template<> struct trait< sp > \
template<> struct trait< sp1,sp2 > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \
}; \
@@ -108,6 +124,7 @@ template<> struct trait< sp1,sp2 > \
#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \
template<> struct trait##_impl< sp > \
{ \
+public:\
BOOST_STATIC_CONSTANT(bool, value = (C)); \
}; \
/**/
@@ -115,6 +132,7 @@ template<> struct trait##_impl< sp > \
#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \
template<> struct trait##_impl< sp1,sp2 > \
{ \
+public:\
BOOST_STATIC_CONSTANT(bool, value = (C)); \
}; \
/**/
@@ -123,6 +141,7 @@ template<> struct trait##_impl< sp1,sp2 > \
template< param > struct trait< sp > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
@@ -131,6 +150,7 @@ template< param > struct trait< sp > \
template< param1, param2 > struct trait< sp > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
@@ -139,6 +159,7 @@ template< param1, param2 > struct trait< sp > \
template< param > struct trait< sp1,sp2 > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \
}; \
@@ -148,6 +169,7 @@ template< param > struct trait< sp1,sp2 > \
template< param1, param2 > struct trait< sp1,sp2 > \
BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
@@ -155,6 +177,7 @@ template< param1, param2 > struct trait< sp1,sp2 > \
#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \
template< param > struct trait##_impl< sp1,sp2 > \
{ \
+public:\
BOOST_STATIC_CONSTANT(bool, value = (C)); \
}; \
/**/
diff --git a/cutl/details/boost/type_traits/detail/bool_trait_undef.hpp b/cutl/details/boost/type_traits/detail/bool_trait_undef.hpp
index 2259c64..008febe 100644
--- a/cutl/details/boost/type_traits/detail/bool_trait_undef.hpp
+++ b/cutl/details/boost/type_traits/detail/bool_trait_undef.hpp
@@ -8,13 +8,14 @@
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
-// $Revision: 24874 $
+// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $
+// $Revision: 74865 $
#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
#undef BOOST_TT_AUX_BOOL_C_BASE
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
+#undef BOOST_TT_AUX_BOOL_TRAIT_DEF3
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2
#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
diff --git a/cutl/details/boost/type_traits/detail/cv_traits_impl.hpp b/cutl/details/boost/type_traits/detail/cv_traits_impl.hpp
index e2a1955..d0ea7e3 100644
--- a/cutl/details/boost/type_traits/detail/cv_traits_impl.hpp
+++ b/cutl/details/boost/type_traits/detail/cv_traits_impl.hpp
@@ -77,7 +77,7 @@ namespace detail {
// Use the implementation above for non function pointers
template <typename T, unsigned Select
= (unsigned)sizeof(::cutl_details_boost::type_traits::gcc8503::mini_funcptr_tester((T)0)) >
-struct cv_traits_imp : ::cutl_details_boost::type_traits::gcc8503::cv_traits_imp<T> { };
+struct cv_traits_imp : public ::cutl_details_boost::type_traits::gcc8503::cv_traits_imp<T> { };
// Functions are never cv-qualified
template <typename T> struct cv_traits_imp<T*,1>
diff --git a/cutl/details/boost/type_traits/detail/is_function_ptr_tester.hpp b/cutl/details/boost/type_traits/detail/is_function_ptr_tester.hpp
index babaa89..5e3e336 100644
--- a/cutl/details/boost/type_traits/detail/is_function_ptr_tester.hpp
+++ b/cutl/details/boost/type_traits/detail/is_function_ptr_tester.hpp
@@ -26,7 +26,7 @@
namespace cutl_details_boost {
namespace type_traits {
-// Note it is acceptible to use ellipsis here, since the argument will
+// Note it is acceptable to use ellipsis here, since the argument will
// always be a pointer type of some sort (JM 2005/06/04):
no_type BOOST_TT_DECL is_function_ptr_tester(...);
diff --git a/cutl/details/boost/type_traits/detail/size_t_trait_def.hpp b/cutl/details/boost/type_traits/detail/size_t_trait_def.hpp
index 4cce2ff..c823263 100644
--- a/cutl/details/boost/type_traits/detail/size_t_trait_def.hpp
+++ b/cutl/details/boost/type_traits/detail/size_t_trait_def.hpp
@@ -8,8 +8,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2005-08-25 12:27:28 -0400 (Thu, 25 Aug 2005) $
-// $Revision: 30670 $
+// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $
+// $Revision: 71481 $
#include <cutl/details/boost/type_traits/detail/template_arity_spec.hpp>
#include <cutl/details/boost/type_traits/integral_constant.hpp>
@@ -19,10 +19,10 @@
#include <cstddef>
#if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300
-# define BOOST_TT_AUX_SIZE_T_BASE(C) ::cutl_details_boost::integral_constant<std::size_t,C>
+# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::cutl_details_boost::integral_constant<std::size_t,C>
# define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/
#else
-# define BOOST_TT_AUX_SIZE_T_BASE(C) ::cutl_details_boost::mpl::size_t<C>
+# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::cutl_details_boost::mpl::size_t<C>
# define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
typedef ::cutl_details_boost::mpl::size_t<C> base_; \
using base_::value; \
@@ -34,6 +34,7 @@
template< typename T > struct trait \
: BOOST_TT_AUX_SIZE_T_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
}; \
@@ -45,6 +46,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
template<> struct trait<spec> \
: BOOST_TT_AUX_SIZE_T_BASE(C) \
{ \
+public:\
BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
}; \
diff --git a/cutl/details/boost/type_traits/detail/size_t_trait_undef.hpp b/cutl/details/boost/type_traits/detail/size_t_trait_undef.hpp
index 06a176d..967fd91 100644
--- a/cutl/details/boost/type_traits/detail/size_t_trait_undef.hpp
+++ b/cutl/details/boost/type_traits/detail/size_t_trait_undef.hpp
@@ -8,7 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
+// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $
// $Revision: 24874 $
#undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1
diff --git a/cutl/details/boost/type_traits/detail/type_trait_def.hpp b/cutl/details/boost/type_traits/detail/type_trait_def.hpp
index aac31c3..f3abdfc 100644
--- a/cutl/details/boost/type_traits/detail/type_trait_def.hpp
+++ b/cutl/details/boost/type_traits/detail/type_trait_def.hpp
@@ -8,8 +8,8 @@
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
-// $Revision: 24874 $
+// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $
+// $Revision: 71481 $
#include <cutl/details/boost/type_traits/detail/template_arity_spec.hpp>
#include <cutl/details/boost/mpl/aux_/lambda_support.hpp>
@@ -17,6 +17,7 @@
#define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \
template< typename T > struct trait \
{ \
+public:\
typedef result type; \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
}; \
@@ -27,6 +28,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
#define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \
template<> struct trait<spec> \
{ \
+public:\
typedef result type; \
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
}; \
@@ -35,6 +37,7 @@ template<> struct trait<spec> \
#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \
template<> struct trait##_impl<spec> \
{ \
+public:\
typedef result type; \
}; \
/**/
@@ -42,6 +45,7 @@ template<> struct trait##_impl<spec> \
#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
template< param > struct trait<spec> \
{ \
+public:\
typedef result type; \
}; \
/**/
@@ -49,6 +53,7 @@ template< param > struct trait<spec> \
#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \
template< param1, param2 > struct trait<spec> \
{ \
+public:\
typedef result; \
}; \
/**/
@@ -56,6 +61,7 @@ template< param1, param2 > struct trait<spec> \
#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \
template< param > struct trait##_impl<spec> \
{ \
+public:\
typedef result type; \
}; \
/**/
diff --git a/cutl/details/boost/type_traits/detail/type_trait_undef.hpp b/cutl/details/boost/type_traits/detail/type_trait_undef.hpp
index 9403b9b..c4f14ff 100644
--- a/cutl/details/boost/type_traits/detail/type_trait_undef.hpp
+++ b/cutl/details/boost/type_traits/detail/type_trait_undef.hpp
@@ -8,7 +8,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
+// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $
// $Revision: 24874 $
#undef BOOST_TT_AUX_TYPE_TRAIT_DEF1
diff --git a/cutl/details/boost/type_traits/intrinsics.hpp b/cutl/details/boost/type_traits/intrinsics.hpp
index 950787f..7912320 100644
--- a/cutl/details/boost/type_traits/intrinsics.hpp
+++ b/cutl/details/boost/type_traits/intrinsics.hpp
@@ -1,4 +1,3 @@
-
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & 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
@@ -22,10 +21,12 @@
// (these should largely ignore cv-qualifiers)
// BOOST_IS_UNION(T) should evaluate to true if T is a union type
// BOOST_IS_POD(T) should evaluate to true if T is a POD type
-// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
+// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union)
// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(cutl_details_boost::move(t)) <==> memcpy
// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = cutl_details_boost::move(u) <==> memcpy
// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
// BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
// BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw
@@ -33,12 +34,10 @@
// BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor
//
// The following can also be defined: when detected our implementation is greatly simplified.
-// Note that unlike the macros above these do not have default definitions, so we can use
-// #ifdef MACRONAME to detect when these are available.
//
// BOOST_IS_ABSTRACT(T) true if T is an abstract type
// BOOST_IS_BASE_OF(T,U) true if T is a base class of U
-// BOOST_IS_CLASS(T) true if T is a class type
+// BOOST_IS_CLASS(T) true if T is a class type (and not a union)
// BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U
// BOOST_IS_ENUM(T) true is T is an enum
// BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type
@@ -82,32 +81,38 @@
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
-#if defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215)
+#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\
+ || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500))
# include <cutl/details/boost/type_traits/is_same.hpp>
+# include <cutl/details/boost/type_traits/is_function.hpp>
# define BOOST_IS_UNION(T) __is_union(T)
# define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T))
# define BOOST_IS_EMPTY(T) __is_empty(T)
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-# define BOOST_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
-# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
-# define BOOST_HAS_NOTHROW_COPY(T) __has_nothrow_copy(T)
-# define BOOST_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T)
+# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ( ::cutl_details_boost::is_pod<T>::value && !::cutl_details_boost::is_volatile<T>::value))
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::cutl_details_boost::is_pod<T>::value && ! ::cutl_details_boost::is_const<T>::value && !::cutl_details_boost::is_volatile<T>::value))
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::cutl_details_boost::is_pod<T>::value)
+# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::cutl_details_boost::has_trivial_constructor<T>::value)
+# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::cutl_details_boost::has_trivial_copy<T>::value)
+# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::cutl_details_boost::has_trivial_assign<T>::value)
# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
# define BOOST_IS_ABSTRACT(T) __is_abstract(T)
# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
# define BOOST_IS_CLASS(T) __is_class(T)
-// This one doesn't quite always do the right thing:
-// # define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U)
+# define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same<T,U>::value && !is_function<U>::value)) && !__is_abstract(U))
# define BOOST_IS_ENUM(T) __is_enum(T)
// This one doesn't quite always do the right thing:
// # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
// This one fails if the default alignment has been changed with /Zp:
// # define BOOST_ALIGNMENT_OF(T) __alignof(T)
+# if defined(_MSC_VER) && (_MSC_VER >= 1700)
+# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || ::cutl_details_boost::is_pod<T>::value) && !::cutl_details_boost::is_volatile<T>::value)
+# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || ::cutl_details_boost::is_pod<T>::value) && ! ::cutl_details_boost::is_const<T>::value && !::cutl_details_boost::is_volatile<T>::value)
+# endif
+
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
@@ -127,21 +132,96 @@
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__)))
+#if defined(BOOST_CLANG) && defined(__has_feature)
+# include <cstddef>
# include <cutl/details/boost/type_traits/is_same.hpp>
# include <cutl/details/boost/type_traits/is_reference.hpp>
# include <cutl/details/boost/type_traits/is_volatile.hpp>
+# if __has_feature(is_union)
+# define BOOST_IS_UNION(T) __is_union(T)
+# endif
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod)
+# define BOOST_IS_POD(T) __is_pod(T)
+# endif
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty)
+# define BOOST_IS_EMPTY(T) __is_empty(T)
+# endif
+# if __has_feature(has_trivial_constructor)
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+# endif
+# if __has_feature(has_trivial_copy)
+# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value && !is_volatile<T>::value)
+# endif
+# if __has_feature(has_trivial_assign)
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
+# endif
+# if __has_feature(has_trivial_destructor)
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+# endif
+# if __has_feature(has_nothrow_constructor)
+# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
+# endif
+# if __has_feature(has_nothrow_copy)
+# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
+# endif
+# if __has_feature(has_nothrow_assign)
+# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
+# endif
+# if __has_feature(has_virtual_destructor)
+# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
+# endif
+# if __has_feature(is_abstract)
+# define BOOST_IS_ABSTRACT(T) __is_abstract(T)
+# endif
+# if __has_feature(is_base_of)
+# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
+# endif
+# if __has_feature(is_class)
+# define BOOST_IS_CLASS(T) __is_class(T)
+# endif
+# if __has_feature(is_convertible_to)
+# include <cutl/details/boost/type_traits/is_abstract.hpp>
+# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::cutl_details_boost::is_abstract<U>::value)
+# endif
+# if __has_feature(is_enum)
+# define BOOST_IS_ENUM(T) __is_enum(T)
+# endif
+# if __has_feature(is_polymorphic)
+# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
+# endif
+# if __has_feature(has_trivial_move_constructor)
+# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T)
+# endif
+# if __has_feature(has_trivial_move_assign)
+# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T)
+# endif
+# define BOOST_ALIGNMENT_OF(T) __alignof(T)
+
+# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG)
+# include <cutl/details/boost/type_traits/is_same.hpp>
+# include <cutl/details/boost/type_traits/is_reference.hpp>
+# include <cutl/details/boost/type_traits/is_volatile.hpp>
+
+#ifdef BOOST_INTEL
+# define BOOST_INTEL_TT_OPTS || is_pod<T>::value
+#else
+# define BOOST_INTEL_TT_OPTS
+#endif
+
# define BOOST_IS_UNION(T) __is_union(T)
# define BOOST_IS_POD(T) __is_pod(T)
# define BOOST_IS_EMPTY(T) __is_empty(T)
-# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
-# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
-# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
-# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::cutl_details_boost::is_volatile<T>::value)
+# define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference<T>::value && ! ::cutl_details_boost::is_volatile<T>::value)
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::cutl_details_boost::is_volatile<T>::value && ! ::cutl_details_boost::is_const<T>::value)
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS)
+# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS)
+# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_reference<T>::value)
+# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_const<T>::value)
# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
# define BOOST_IS_ABSTRACT(T) __is_abstract(T)
@@ -168,8 +248,8 @@
# define BOOST_IS_POD(T) __is_pod(T)
# define BOOST_IS_EMPTY(T) __is_empty(T)
# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
+# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value && !is_volatile<T>::value)
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
@@ -195,13 +275,13 @@
# define BOOST_IS_UNION(T) __is_union(T)
# define BOOST_IS_POD(T) __is_pod(T)
# define BOOST_IS_EMPTY(T) __is_empty(T)
-# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T) || is_void<T>::value)
-# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value || is_void<T>::value)
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value || is_void<T>::value)
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || is_void<T>::value)
-# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T) || is_void<T>::value)
-# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value || is_void<T>::value)
-# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value || is_void<T>::value)
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T))
+# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value)
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T))
+# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T))
+# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value)
+# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
# define BOOST_IS_ABSTRACT(T) __is_abstract(T)
@@ -215,51 +295,9 @@
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
-#ifndef BOOST_IS_UNION
-# define BOOST_IS_UNION(T) false
-#endif
-
-#ifndef BOOST_IS_POD
-# define BOOST_IS_POD(T) false
-#endif
-
-#ifndef BOOST_IS_EMPTY
-# define BOOST_IS_EMPTY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
-# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_COPY
-# define BOOST_HAS_TRIVIAL_COPY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_ASSIGN
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
-#endif
-
-#ifndef BOOST_HAS_NOTHROW_CONSTRUCTOR
-# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) false
-#endif
-
-#ifndef BOOST_HAS_NOTHROW_COPY
-# define BOOST_HAS_NOTHROW_COPY(T) false
-#endif
-
-#ifndef BOOST_HAS_NOTHROW_ASSIGN
-# define BOOST_HAS_NOTHROW_ASSIGN(T) false
-#endif
+#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED
-#ifndef BOOST_HAS_VIRTUAL_DESTRUCTOR
-# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) false
-#endif
-#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED
diff --git a/cutl/details/boost/type_traits/is_abstract.hpp b/cutl/details/boost/type_traits/is_abstract.hpp
index 06b21f4..193ffc2 100644
--- a/cutl/details/boost/type_traits/is_abstract.hpp
+++ b/cutl/details/boost/type_traits/is_abstract.hpp
@@ -39,7 +39,7 @@
// At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1.
// - Adapted and added into Boost.Serialization library by Robert Ramey
// (starting with submission #10).
-// - Jan 2004: GCC 3.4 fixed to suport DR337 (Giovanni Bajo).
+// - Jan 2004: GCC 3.4 fixed to support DR337 (Giovanni Bajo).
// - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek).
// - Nov 2004: Christoph Ludwig found that the implementation did not work with
// template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig
diff --git a/cutl/details/boost/type_traits/is_array.hpp b/cutl/details/boost/type_traits/is_array.hpp
index 04b36a8..c4e6b3f 100644
--- a/cutl/details/boost/type_traits/is_array.hpp
+++ b/cutl/details/boost/type_traits/is_array.hpp
@@ -8,7 +8,7 @@
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-// Some fixes for is_array are based on a newgroup posting by Jonathan Lundquist.
+// Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist.
#ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED
diff --git a/cutl/details/boost/type_traits/is_const.hpp b/cutl/details/boost/type_traits/is_const.hpp
index 887f6ad..2828ed8 100644
--- a/cutl/details/boost/type_traits/is_const.hpp
+++ b/cutl/details/boost/type_traits/is_const.hpp
@@ -64,7 +64,7 @@ struct is_const_rvalue_filter
BOOST_STATIC_CONSTANT(bool, value = ::cutl_details_boost::detail::cv_traits_imp<T*>::is_const);
#endif
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
struct is_const_rvalue_filter<T&&>
{
@@ -106,7 +106,7 @@ no_type is_const_tester(volatile void *);
template <bool is_ref, bool array>
struct is_const_helper
- : ::cutl_details_boost::type_traits::false_result
+ : public ::cutl_details_boost::type_traits::false_result
{
};
@@ -136,7 +136,7 @@ struct is_const_helper<false,true>
template <typename T>
struct is_const_impl
- : is_const_helper<
+ : public is_const_helper<
is_reference<T>::value
, is_array<T>::value
>::template result_<T>
diff --git a/cutl/details/boost/type_traits/is_convertible.hpp b/cutl/details/boost/type_traits/is_convertible.hpp
index 8c7bf19..6f0a110 100644
--- a/cutl/details/boost/type_traits/is_convertible.hpp
+++ b/cutl/details/boost/type_traits/is_convertible.hpp
@@ -17,16 +17,17 @@
#include <cutl/details/boost/type_traits/detail/yes_no_type.hpp>
#include <cutl/details/boost/type_traits/config.hpp>
#include <cutl/details/boost/type_traits/is_array.hpp>
-#include <cutl/details/boost/type_traits/add_reference.hpp>
#include <cutl/details/boost/type_traits/ice.hpp>
#include <cutl/details/boost/type_traits/is_arithmetic.hpp>
#include <cutl/details/boost/type_traits/is_void.hpp>
#ifndef BOOST_NO_IS_ABSTRACT
#include <cutl/details/boost/type_traits/is_abstract.hpp>
#endif
+#include <cutl/details/boost/type_traits/add_lvalue_reference.hpp>
+#include <cutl/details/boost/type_traits/add_rvalue_reference.hpp>
+#include <cutl/details/boost/type_traits/is_function.hpp>
#if defined(__MWERKS__)
-#include <cutl/details/boost/type_traits/is_function.hpp>
#include <cutl/details/boost/type_traits/remove_reference.hpp>
#endif
@@ -39,7 +40,7 @@ namespace cutl_details_boost {
#ifndef BOOST_IS_CONVERTIBLE
-// is one type convertable to another?
+// is one type convertible to another?
//
// there are multiple versions of the is_convertible
// template, almost every compiler seems to require its
@@ -68,7 +69,7 @@ struct does_conversion_exist
{
static no_type BOOST_TT_DECL _m_check(...);
static yes_type BOOST_TT_DECL _m_check(To);
- static From _m_from;
+ static typename add_lvalue_reference<From>::type _m_from;
enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) };
};
};
@@ -84,7 +85,7 @@ struct does_conversion_exist<void>
template <typename From, typename To>
struct is_convertible_basic_impl
- : does_conversion_exist<From>::template result_<To>
+ : public does_conversion_exist<From>::template result_<To>
{
};
@@ -106,7 +107,7 @@ struct is_convertible_impl
static ::cutl_details_boost::type_traits::yes_type BOOST_TT_DECL _m_check(T);
};
- static From _m_from;
+ static typename add_lvalue_reference<From>::type _m_from;
static bool const value = sizeof( checker<To>::_m_check(_m_from) )
== sizeof(::cutl_details_boost::type_traits::yes_type);
#pragma option pop
@@ -119,6 +120,8 @@ struct is_convertible_impl
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
template <typename T> any_conversion(T&);
};
@@ -131,9 +134,18 @@ template <typename T> struct checker
template <typename From, typename To>
struct is_convertible_basic_impl
{
- static From _m_from;
- static bool const value = sizeof( cutl_details_boost::detail::checker<To>::_m_check(_m_from, 0) )
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)))
+ static bool const value =
+ sizeof( cutl_details_boost::detail::checker<To>::_m_check(static_cast<rvalue_type>(_m_from), 0) )
+ == sizeof(::cutl_details_boost::type_traits::yes_type);
+#else
+ static bool const value =
+ sizeof( cutl_details_boost::detail::checker<To>::_m_check(_m_from, 0) )
== sizeof(::cutl_details_boost::type_traits::yes_type);
+#endif
};
#elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \
@@ -151,6 +163,8 @@ struct is_convertible_basic_impl
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
// we need this constructor to catch references to functions
// (which can not be cv-qualified):
template <typename T> any_conversion(T&);
@@ -161,11 +175,19 @@ struct is_convertible_basic_impl
{
static ::cutl_details_boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
static ::cutl_details_boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
- static From _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from), 0) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from, 0) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
);
+#endif
};
#elif defined(__DMC__)
@@ -173,6 +195,8 @@ struct is_convertible_basic_impl
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
// we need this constructor to catch references to functions
// (which can not be cv-qualified):
template <typename T> any_conversion(T&);
@@ -185,13 +209,21 @@ struct is_convertible_basic_impl
template <class T>
static ::cutl_details_boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T);
static ::cutl_details_boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int);
- static From _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
// Static constants sometime cause the conversion of _m_from to To to be
// called. This doesn't happen with an enum.
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ enum { value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from), 0, 0) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
+ };
+#else
enum { value =
sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
};
+#endif
};
#elif defined(__MWERKS__)
@@ -208,6 +240,9 @@ struct is_convertible_basic_impl_aux;
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
+ template <typename T> any_conversion(T&);
};
template <typename From, typename To>
@@ -215,11 +250,19 @@ struct is_convertible_basic_impl_aux<From,To,false /*FromIsFunctionRef*/>
{
static ::cutl_details_boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
static ::cutl_details_boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
- static From _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from), 0) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from, 0) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
);
+#endif
};
template <typename From, typename To>
@@ -227,10 +270,18 @@ struct is_convertible_basic_impl_aux<From,To,true /*FromIsFunctionRef*/>
{
static ::cutl_details_boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
static ::cutl_details_boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
- static From _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from)) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
);
+#endif
};
template <typename From, typename To>
@@ -242,7 +293,6 @@ struct is_convertible_basic_impl:
{};
#else
-
//
// This version seems to work pretty well for a wide spectrum of compilers,
// however it does rely on undefined behaviour by passing UDT's through (...).
@@ -252,7 +302,9 @@ struct is_convertible_basic_impl
{
static ::cutl_details_boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
static ::cutl_details_boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
- static From _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4244)
@@ -260,9 +312,15 @@ struct is_convertible_basic_impl
#pragma warning(disable:6334)
#endif
#endif
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from)) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from) ) == sizeof(::cutl_details_boost::type_traits::yes_type)
);
+#endif
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
@@ -275,15 +333,17 @@ struct is_convertible_basic_impl
template <typename From, typename To>
struct is_convertible_impl
{
- typedef typename add_reference<From>::type ref_type;
enum { value =
(::cutl_details_boost::type_traits::ice_and<
::cutl_details_boost::type_traits::ice_or<
- ::cutl_details_boost::detail::is_convertible_basic_impl<ref_type,To>::value,
+ ::cutl_details_boost::detail::is_convertible_basic_impl<From,To>::value,
::cutl_details_boost::is_void<To>::value
>::value,
::cutl_details_boost::type_traits::ice_not<
::cutl_details_boost::is_array<To>::value
+ >::value,
+ ::cutl_details_boost::type_traits::ice_not<
+ ::cutl_details_boost::is_function<To>::value
>::value
>::value) };
};
@@ -291,15 +351,17 @@ struct is_convertible_impl
template <typename From, typename To>
struct is_convertible_impl
{
- typedef typename add_reference<From>::type ref_type;
BOOST_STATIC_CONSTANT(bool, value =
(::cutl_details_boost::type_traits::ice_and<
::cutl_details_boost::type_traits::ice_or<
- ::cutl_details_boost::detail::is_convertible_basic_impl<ref_type,To>::value,
+ ::cutl_details_boost::detail::is_convertible_basic_impl<From,To>::value,
::cutl_details_boost::is_void<To>::value
>::value,
::cutl_details_boost::type_traits::ice_not<
::cutl_details_boost::is_array<To>::value
+ >::value,
+ ::cutl_details_boost::type_traits::ice_not<
+ ::cutl_details_boost::is_function<To>::value
>::value
>::value)
);
@@ -402,14 +464,14 @@ struct is_convertible_impl_dispatch
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false)
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false)
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false)
BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,true)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,true)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false)
#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
diff --git a/cutl/details/boost/type_traits/is_enum.hpp b/cutl/details/boost/type_traits/is_enum.hpp
index 20dff7f..a837de5 100644
--- a/cutl/details/boost/type_traits/is_enum.hpp
+++ b/cutl/details/boost/type_traits/is_enum.hpp
@@ -95,7 +95,7 @@ template <>
struct is_enum_helper<false>
{
template <typename T> struct type
- : ::cutl_details_boost::is_convertible<typename cutl_details_boost::add_reference<T>::type,::cutl_details_boost::detail::int_convertible>
+ : public ::cutl_details_boost::is_convertible<typename cutl_details_boost::add_reference<T>::type,::cutl_details_boost::detail::int_convertible>
{
};
};
diff --git a/cutl/details/boost/type_traits/is_function.hpp b/cutl/details/boost/type_traits/is_function.hpp
index 573e4c1..2d39150 100644
--- a/cutl/details/boost/type_traits/is_function.hpp
+++ b/cutl/details/boost/type_traits/is_function.hpp
@@ -40,7 +40,7 @@ namespace detail {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
template<bool is_ref = true>
struct is_function_chooser
- : ::cutl_details_boost::type_traits::false_result
+ : public ::cutl_details_boost::type_traits::false_result
{
};
@@ -48,14 +48,14 @@ template <>
struct is_function_chooser<false>
{
template< typename T > struct result_
- : ::cutl_details_boost::type_traits::is_function_ptr_helper<T*>
+ : public ::cutl_details_boost::type_traits::is_function_ptr_helper<T*>
{
};
};
template <typename T>
struct is_function_impl
- : is_function_chooser< ::cutl_details_boost::is_reference<T>::value >
+ : public is_function_chooser< ::cutl_details_boost::is_reference<T>::value >
::BOOST_NESTED_TEMPLATE result_<T>
{
};
@@ -83,6 +83,11 @@ struct is_function_impl
template <typename T>
struct is_function_impl<T&> : public false_type
{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <typename T>
+struct is_function_impl<T&&> : public false_type
+{};
+#endif
#endif
#endif
@@ -95,7 +100,7 @@ struct is_function_impl<T&> : 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,::cutl_details_boost::detail::is_function_impl<T>::value)
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_function,T&&,false)
#endif
#endif
diff --git a/cutl/details/boost/type_traits/is_integral.hpp b/cutl/details/boost/type_traits/is_integral.hpp
index 0082035..f5203bb 100644
--- a/cutl/details/boost/type_traits/is_integral.hpp
+++ b/cutl/details/boost/type_traits/is_integral.hpp
@@ -17,7 +17,7 @@
namespace cutl_details_boost {
//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3)
-// as an extention we include long long, as this is likely to be added to the
+// as an extension we include long long, as this is likely to be added to the
// standard at a later date
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,__is_integral(T))
@@ -68,6 +68,11 @@ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::cutl_details_boost::long_long_ty
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
#endif
+
+#ifdef BOOST_HAS_INT128
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,cutl_details_boost::int128_type,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,cutl_details_boost::uint128_type,true)
+#endif
#endif // non-CodeGear implementation
diff --git a/cutl/details/boost/type_traits/is_member_function_pointer.hpp b/cutl/details/boost/type_traits/is_member_function_pointer.hpp
index a13dfd3..ffea213 100644
--- a/cutl/details/boost/type_traits/is_member_function_pointer.hpp
+++ b/cutl/details/boost/type_traits/is_member_function_pointer.hpp
@@ -55,7 +55,7 @@ namespace detail {
template <bool>
struct is_mem_fun_pointer_select
- : ::cutl_details_boost::type_traits::false_result
+ : public ::cutl_details_boost::type_traits::false_result
{
};
@@ -83,7 +83,7 @@ struct is_mem_fun_pointer_select<false>
template <typename T>
struct is_member_function_pointer_impl
- : is_mem_fun_pointer_select<
+ : public is_mem_fun_pointer_select<
::cutl_details_boost::type_traits::ice_or<
::cutl_details_boost::is_reference<T>::value
, ::cutl_details_boost::is_array<T>::value
diff --git a/cutl/details/boost/type_traits/is_member_pointer.hpp b/cutl/details/boost/type_traits/is_member_pointer.hpp
index a79e3c1..8e5acf0 100644
--- a/cutl/details/boost/type_traits/is_member_pointer.hpp
+++ b/cutl/details/boost/type_traits/is_member_pointer.hpp
@@ -66,7 +66,7 @@ template <typename R, typename T>
template <bool>
struct is_member_pointer_select
- : ::cutl_details_boost::type_traits::false_result
+ : public ::cutl_details_boost::type_traits::false_result
{
};
@@ -87,7 +87,7 @@ struct is_member_pointer_select<false>
template <typename T>
struct is_member_pointer_impl
- : is_member_pointer_select<
+ : public is_member_pointer_select<
::cutl_details_boost::type_traits::ice_or<
::cutl_details_boost::is_reference<T>::value
, ::cutl_details_boost::is_array<T>::value
diff --git a/cutl/details/boost/type_traits/is_pod.hpp b/cutl/details/boost/type_traits/is_pod.hpp
index 5527790..6cb954e 100644
--- a/cutl/details/boost/type_traits/is_pod.hpp
+++ b/cutl/details/boost/type_traits/is_pod.hpp
@@ -20,6 +20,12 @@
// should be the last #include
#include <cutl/details/boost/type_traits/detail/bool_trait_def.hpp>
+#ifndef BOOST_IS_POD
+#define BOOST_INTERNAL_IS_POD(T) false
+#else
+#define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T)
+#endif
+
namespace cutl_details_boost {
// forward declaration, needed by 'is_pod_array_helper' template below
@@ -36,14 +42,14 @@ template <typename T> struct is_pod_impl
(::cutl_details_boost::type_traits::ice_or<
::cutl_details_boost::is_scalar<T>::value,
::cutl_details_boost::is_void<T>::value,
- BOOST_IS_POD(T)
+ BOOST_INTERNAL_IS_POD(T)
>::value));
};
#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
template <typename T, std::size_t sz>
struct is_pod_impl<T[sz]>
- : is_pod_impl<T>
+ : public is_pod_impl<T>
{
};
#endif
@@ -60,7 +66,7 @@ struct is_pod_helper
(::cutl_details_boost::type_traits::ice_or<
::cutl_details_boost::is_scalar<T>::value,
::cutl_details_boost::is_void<T>::value,
- BOOST_IS_POD(T)
+ BOOST_INTERNAL_IS_POD(T)
>::value));
};
};
@@ -125,11 +131,15 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const volatile,true)
} // namespace detail
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::cutl_details_boost::detail::is_pod_impl<T>::value)
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::cutl_details_boost::detail::is_pod_impl<T>::value)
+// is_POD is the old depricated name for this trait, do not use this as it may
+// be removed in future without warning!!
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::cutl_details_boost::is_pod<T>::value)
} // namespace cutl_details_boost
#include <cutl/details/boost/type_traits/detail/bool_trait_undef.hpp>
+#undef BOOST_INTERNAL_IS_POD
+
#endif // BOOST_TT_IS_POD_HPP_INCLUDED
diff --git a/cutl/details/boost/type_traits/is_pointer.hpp b/cutl/details/boost/type_traits/is_pointer.hpp
index ea6c8ec..6e3779f 100644
--- a/cutl/details/boost/type_traits/is_pointer.hpp
+++ b/cutl/details/boost/type_traits/is_pointer.hpp
@@ -113,7 +113,7 @@ no_type BOOST_TT_DECL is_pointer_tester(...);
template <bool>
struct is_pointer_select
- : ::cutl_details_boost::type_traits::false_result
+ : public ::cutl_details_boost::type_traits::false_result
{
};
@@ -133,7 +133,7 @@ struct is_pointer_select<false>
template <typename T>
struct is_pointer_impl
- : is_pointer_select<
+ : public is_pointer_select<
::cutl_details_boost::type_traits::ice_or<
::cutl_details_boost::is_reference<T>::value
, ::cutl_details_boost::is_array<T>::value
diff --git a/cutl/details/boost/type_traits/is_rvalue_reference.hpp b/cutl/details/boost/type_traits/is_rvalue_reference.hpp
index d5d11f6..fbf600b 100644
--- a/cutl/details/boost/type_traits/is_rvalue_reference.hpp
+++ b/cutl/details/boost/type_traits/is_rvalue_reference.hpp
@@ -17,7 +17,7 @@
namespace cutl_details_boost {
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_rvalue_reference,T,false)
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true)
#endif
diff --git a/cutl/details/boost/type_traits/is_union.hpp b/cutl/details/boost/type_traits/is_union.hpp
index fa7b1b6..2a4e482 100644
--- a/cutl/details/boost/type_traits/is_union.hpp
+++ b/cutl/details/boost/type_traits/is_union.hpp
@@ -25,7 +25,11 @@ namespace detail {
template <typename T> struct is_union_impl
{
typedef typename remove_cv<T>::type cvt;
+#ifdef BOOST_IS_UNION
BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt));
+#else
+ BOOST_STATIC_CONSTANT(bool, value = false);
+#endif
};
#else
//
@@ -35,7 +39,11 @@ template <typename T> struct is_union_impl
//
template <typename T> struct is_union_impl
{
+#ifdef BOOST_IS_UNION
BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T));
+#else
+ BOOST_STATIC_CONSTANT(bool, value = false);
+#endif
};
#endif
} // namespace detail
diff --git a/cutl/details/boost/type_traits/is_volatile.hpp b/cutl/details/boost/type_traits/is_volatile.hpp
index 48dd6d9..32e8403 100644
--- a/cutl/details/boost/type_traits/is_volatile.hpp
+++ b/cutl/details/boost/type_traits/is_volatile.hpp
@@ -51,7 +51,7 @@ struct is_volatile_rval_filter
BOOST_STATIC_CONSTANT(bool, value = ::cutl_details_boost::detail::cv_traits_imp<T*>::is_volatile);
#endif
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
@@ -94,7 +94,7 @@ no_type is_volatile_tester(void const*);
template <bool is_ref, bool array>
struct is_volatile_helper
- : ::cutl_details_boost::type_traits::false_result
+ : public ::cutl_details_boost::type_traits::false_result
{
};
@@ -124,7 +124,7 @@ struct is_volatile_helper<false,true>
template <typename T>
struct is_volatile_impl
- : is_volatile_helper<
+ : public is_volatile_helper<
is_reference<T>::value
, is_array<T>::value
>::template result_<T>
diff --git a/cutl/details/boost/type_traits/msvc/typeof.hpp b/cutl/details/boost/type_traits/msvc/typeof.hpp
index 6e7e270..942166c 100644
--- a/cutl/details/boost/type_traits/msvc/typeof.hpp
+++ b/cutl/details/boost/type_traits/msvc/typeof.hpp
@@ -20,7 +20,7 @@ namespace cutl_details_boost { namespace detail {
};
template<typename T, typename ID>
- struct msvc_register_type : msvc_extract_type<ID>
+ struct msvc_register_type : public msvc_extract_type<ID>
{
template<>
struct id2type_impl<true> //VC7.0 specific bugfeature
@@ -36,7 +36,7 @@ namespace cutl_details_boost { namespace detail {
};
template<typename T, typename ID>
- struct msvc_register_type : msvc_extract_type<ID>
+ struct msvc_register_type : public msvc_extract_type<ID>
{
typedef msvc_extract_type<ID> base_type;
struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature
diff --git a/cutl/details/boost/type_traits/remove_const.hpp b/cutl/details/boost/type_traits/remove_const.hpp
index f4b13d9..46fd2ca 100644
--- a/cutl/details/boost/type_traits/remove_const.hpp
+++ b/cutl/details/boost/type_traits/remove_const.hpp
@@ -54,7 +54,7 @@ struct remove_const_impl
>::type type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
diff --git a/cutl/details/boost/type_traits/remove_cv.hpp b/cutl/details/boost/type_traits/remove_cv.hpp
index 0ba0297..987edee 100644
--- a/cutl/details/boost/type_traits/remove_cv.hpp
+++ b/cutl/details/boost/type_traits/remove_cv.hpp
@@ -27,6 +27,8 @@
namespace cutl_details_boost {
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
namespace detail{
template <class T>
@@ -35,7 +37,7 @@ struct rvalue_ref_filter_rem_cv
typedef typename cutl_details_boost::detail::cv_traits_imp<T*>::unqualified_type type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
@@ -49,7 +51,6 @@ struct rvalue_ref_filter_rem_cv<T&&>
}
-#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 cutl_details_boost::detail::rvalue_ref_filter_rem_cv<T>::type)
diff --git a/cutl/details/boost/type_traits/remove_pointer.hpp b/cutl/details/boost/type_traits/remove_pointer.hpp
index 46d3fc8..6aa2c0e 100644
--- a/cutl/details/boost/type_traits/remove_pointer.hpp
+++ b/cutl/details/boost/type_traits/remove_pointer.hpp
@@ -9,12 +9,17 @@
#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
-#include <cutl/details/boost/type_traits/broken_compiler_spec.hpp>
#include <cutl/details/boost/config.hpp>
#include <cutl/details/boost/detail/workaround.hpp>
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <cutl/details/boost/type_traits/broken_compiler_spec.hpp>
+#endif
#if BOOST_WORKAROUND(BOOST_MSVC,<=1300)
#include <cutl/details/boost/type_traits/msvc/remove_pointer.hpp>
+#elif defined(BOOST_MSVC)
+#include <cutl/details/boost/type_traits/remove_cv.hpp>
+#include <cutl/details/boost/type_traits/is_pointer.hpp>
#endif
// should be the last #include
@@ -22,7 +27,51 @@
namespace cutl_details_boost {
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#ifdef BOOST_MSVC
+
+namespace detail{
+
+ //
+ // We need all this crazy indirection because a type such as:
+ //
+ // T (*const)(U)
+ //
+ // Does not bind to a <T*> or <T*const> partial specialization with VC10 and earlier
+ //
+ template <class T>
+ struct remove_pointer_imp
+ {
+ typedef T type;
+ };
+
+ template <class T>
+ struct remove_pointer_imp<T*>
+ {
+ typedef T type;
+ };
+
+ template <class T, bool b>
+ struct remove_pointer_imp3
+ {
+ typedef typename remove_pointer_imp<typename cutl_details_boost::remove_cv<T>::type>::type type;
+ };
+
+ template <class T>
+ struct remove_pointer_imp3<T, false>
+ {
+ typedef T type;
+ };
+
+ template <class T>
+ struct remove_pointer_imp2
+ {
+ typedef typename remove_pointer_imp3<T, ::cutl_details_boost::is_pointer<T>::value>::type type;
+ };
+}
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename cutl_details_boost::detail::remove_pointer_imp2<T>::type)
+
+#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T)
diff --git a/cutl/details/boost/type_traits/remove_reference.hpp b/cutl/details/boost/type_traits/remove_reference.hpp
index 281ad62..fcc37d0 100644
--- a/cutl/details/boost/type_traits/remove_reference.hpp
+++ b/cutl/details/boost/type_traits/remove_reference.hpp
@@ -34,7 +34,7 @@ struct remove_rvalue_ref
{
typedef T type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
struct remove_rvalue_ref<T&&>
{
diff --git a/cutl/details/boost/type_traits/type_with_alignment.hpp b/cutl/details/boost/type_traits/type_with_alignment.hpp
index 1fefa45..6545cc1 100644
--- a/cutl/details/boost/type_traits/type_with_alignment.hpp
+++ b/cutl/details/boost/type_traits/type_with_alignment.hpp
@@ -86,7 +86,7 @@ struct lower_alignment_helper_impl<false>
{
template <std::size_t target, class TestType>
struct apply
- : mpl::if_c<(alignment_of<TestType>::value == target), TestType, char>
+ : public mpl::if_c<(alignment_of<TestType>::value == target), TestType, char>
{
enum { value = (alignment_of<TestType>::value == target) };
};
@@ -94,7 +94,7 @@ struct lower_alignment_helper_impl<false>
template <bool found, std::size_t target, class TestType>
struct lower_alignment_helper
- : lower_alignment_helper_impl<found>::template apply<target,TestType>
+ : public lower_alignment_helper_impl<found>::template apply<target,TestType>
{
};
#else
@@ -225,6 +225,8 @@ struct __attribute__((__aligned__(4))) a4 {};
struct __attribute__((__aligned__(8))) a8 {};
struct __attribute__((__aligned__(16))) a16 {};
struct __attribute__((__aligned__(32))) a32 {};
+struct __attribute__((__aligned__(64))) a64 {};
+struct __attribute__((__aligned__(128))) a128 {};
}
template<> class type_with_alignment<1> { public: typedef char type; };
@@ -233,6 +235,8 @@ template<> class type_with_alignment<4> { public: typedef align::a4 type; };
template<> class type_with_alignment<8> { public: typedef align::a8 type; };
template<> class type_with_alignment<16> { public: typedef align::a16 type; };
template<> class type_with_alignment<32> { public: typedef align::a32 type; };
+template<> class type_with_alignment<64> { public: typedef align::a64 type; };
+template<> class type_with_alignment<128> { public: typedef align::a128 type; };
namespace detail {
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::cutl_details_boost::align::a2,true)
@@ -240,6 +244,8 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::cutl_details_boost::align::a4,true)
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::cutl_details_boost::align::a8,true)
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::cutl_details_boost::align::a16,true)
BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::cutl_details_boost::align::a32,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::cutl_details_boost::align::a64,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::cutl_details_boost::align::a128,true)
}
#endif
#if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && _MSC_VER >= 1300