summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/mpl/has_xxx.hpp')
-rw-r--r--3rdParty/Boost/src/boost/mpl/has_xxx.hpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/mpl/has_xxx.hpp b/3rdParty/Boost/src/boost/mpl/has_xxx.hpp
index 121bc48..82e67dd 100644
--- a/3rdParty/Boost/src/boost/mpl/has_xxx.hpp
+++ b/3rdParty/Boost/src/boost/mpl/has_xxx.hpp
@@ -1,52 +1,52 @@
#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED
#define BOOST_MPL_HAS_XXX_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2006
// Copyright David Abrahams 2002-2003
// Copyright Daniel Walker 2007
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
-// $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $
-// $Date: 2010-07-18 17:46:31 -0700 (Sun, 18 Jul 2010) $
-// $Revision: 64146 $
+// $Id$
+// $Date$
+// $Revision$
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/has_xxx.hpp>
#include <boost/mpl/aux_/config/msvc_typename.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/preprocessor/array/elem.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
# include <boost/type_traits/is_class.hpp>
#endif
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET
// newsgroup's posting by John Madsen (comp.lang.c++.moderated,
// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but
// it works way more reliably than the SFINAE-based implementation
// Modified dwa 8/Oct/02 to handle reference types.
# include <boost/mpl/if.hpp>
# include <boost/mpl/bool.hpp>
@@ -123,74 +123,75 @@ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \
/**/
# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \
template<> struct trait<T> \
{ \
BOOST_STATIC_CONSTANT(bool, value = false); \
typedef boost::mpl::bool_<false> type; \
}; \
/**/
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \
/**/
#else
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
/**/
#endif
// SFINAE-based implementations below are derived from a USENET newsgroup's
// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
-# elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
+# elif BOOST_WORKAROUND(BOOST_MSVC, <= 1400) \
+ || (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) && defined(__CUDACC__)) \
|| BOOST_WORKAROUND(__IBMCPP__, <= 700)
-// MSVC 7.1+ & VACPP
+// MSVC 7.1 & MSVC 8.0 & VACPP
// agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE
// applied to partial specialization to fix some apparently random failures
// (thanks to Daniel Wallin for researching this!)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T > \
struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \
{ \
typedef void type; \
};\
\
template< typename T, typename U = void > \
struct BOOST_PP_CAT(trait,_impl_) \
{ \
BOOST_STATIC_CONSTANT(bool, value = false); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T > \
struct BOOST_PP_CAT(trait,_impl_)< \
T \
, typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \
> \
{ \
BOOST_STATIC_CONSTANT(bool, value = true); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
: BOOST_PP_CAT(trait,_impl_)<T> \
{ \
}; \
/**/
@@ -258,82 +259,88 @@ struct trait \
# endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
#else // BOOST_MPL_CFG_NO_HAS_XXX
// placeholder implementation
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
{ \
BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \
typedef fallback_ type; \
}; \
/**/
#endif
#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \
/**/
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE)
// Create a boolean Metafunction to detect a nested template
// member. This implementation is based on a USENET newsgroup's
// posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19),
// Rani Sharoni's USENET posting cited above, the non-template has_xxx
// implementations above, and discussion on the Boost mailing list.
# if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1
+# else
+# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 0
# endif
# endif
# if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION)
# if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS))
# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1
+# else
+# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 0
# endif
# endif
# if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1
+# else
+# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 0
# endif
# endif
// NOTE: Many internal implementation macros take a Boost.Preprocessor
// array argument called args which is of the following form.
// ( 4, ( trait, name, max_arity, default_ ) )
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \
BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \
/**/
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \
BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \
/**/
# define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \
BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \
/**/
// Thanks to Guillaume Melquiond for pointing out the need for the
// "substitute" template as an argument to the overloaded test
// functions to get SFINAE to work for member templates with the
// correct name but different number of arguments.
# define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \
template< \
template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \
> \
struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \
}; \
/**/
# define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \
BOOST_PP_REPEAT( \
BOOST_PP_ARRAY_ELEM(2, args) \
, BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \