mirror of
https://github.com/yuzu-emu/ext-boost.git
synced 2024-12-22 18:25:36 +00:00
Add boost::variant
This commit is contained in:
parent
2dcb9d9796
commit
ba070fe982
106
boost/blank.hpp
Normal file
106
boost/blank.hpp
Normal file
|
@ -0,0 +1,106 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost blank.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_BLANK_HPP
|
||||
#define BOOST_BLANK_HPP
|
||||
|
||||
#include "boost/blank_fwd.hpp"
|
||||
|
||||
#if !defined(BOOST_NO_IOSTREAM)
|
||||
#include <iosfwd> // for std::basic_ostream forward declare
|
||||
#include "boost/detail/templated_streams.hpp"
|
||||
#endif // BOOST_NO_IOSTREAM
|
||||
|
||||
#include "boost/mpl/bool.hpp"
|
||||
#include "boost/type_traits/is_empty.hpp"
|
||||
#include "boost/type_traits/is_pod.hpp"
|
||||
#include "boost/type_traits/is_stateless.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
struct blank
|
||||
{
|
||||
};
|
||||
|
||||
// type traits specializations
|
||||
//
|
||||
|
||||
template <>
|
||||
struct is_pod< blank >
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_empty< blank >
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_stateless< blank >
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
// relational operators
|
||||
//
|
||||
|
||||
inline bool operator==(const blank&, const blank&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool operator<=(const blank&, const blank&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool operator>=(const blank&, const blank&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool operator!=(const blank&, const blank&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool operator<(const blank&, const blank&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool operator>(const blank&, const blank&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// streaming support
|
||||
//
|
||||
#if !defined(BOOST_NO_IOSTREAM)
|
||||
|
||||
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
|
||||
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
|
||||
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
|
||||
, const blank&
|
||||
)
|
||||
{
|
||||
// (output nothing)
|
||||
return out;
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_IOSTREAM
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_BLANK_HPP
|
22
boost/blank_fwd.hpp
Normal file
22
boost/blank_fwd.hpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost blank_fwd.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_BLANK_FWD_HPP
|
||||
#define BOOST_BLANK_FWD_HPP
|
||||
|
||||
namespace boost {
|
||||
|
||||
struct blank;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_BLANK_FWD_HPP
|
121
boost/core/demangle.hpp
Normal file
121
boost/core/demangle.hpp
Normal file
|
@ -0,0 +1,121 @@
|
|||
#ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED
|
||||
#define BOOST_CORE_DEMANGLE_HPP_INCLUDED
|
||||
|
||||
// core::demangle
|
||||
//
|
||||
// Copyright 2014 Peter Dimov
|
||||
// Copyright 2014 Andrey Semashev
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <string>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#if defined( __clang__ ) && defined( __has_include )
|
||||
# if __has_include(<cxxabi.h>)
|
||||
# define BOOST_CORE_HAS_CXXABI_H
|
||||
# endif
|
||||
#elif defined( __GLIBCXX__ ) || defined( __GLIBCPP__ )
|
||||
# define BOOST_CORE_HAS_CXXABI_H
|
||||
#endif
|
||||
|
||||
#if defined( BOOST_CORE_HAS_CXXABI_H )
|
||||
# include <cxxabi.h>
|
||||
# include <cstdlib>
|
||||
# include <cstddef>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace core
|
||||
{
|
||||
|
||||
inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT;
|
||||
inline void demangle_free( char const * name ) BOOST_NOEXCEPT;
|
||||
|
||||
class scoped_demangled_name
|
||||
{
|
||||
private:
|
||||
char const * m_p;
|
||||
|
||||
public:
|
||||
explicit scoped_demangled_name( char const * name ) BOOST_NOEXCEPT :
|
||||
m_p( demangle_alloc( name ) )
|
||||
{
|
||||
}
|
||||
|
||||
~scoped_demangled_name() BOOST_NOEXCEPT
|
||||
{
|
||||
demangle_free( m_p );
|
||||
}
|
||||
|
||||
char const * get() const BOOST_NOEXCEPT
|
||||
{
|
||||
return m_p;
|
||||
}
|
||||
|
||||
BOOST_DELETED_FUNCTION(scoped_demangled_name( scoped_demangled_name const& ))
|
||||
BOOST_DELETED_FUNCTION(scoped_demangled_name& operator= ( scoped_demangled_name const& ))
|
||||
};
|
||||
|
||||
|
||||
#if defined( BOOST_CORE_HAS_CXXABI_H )
|
||||
|
||||
inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT
|
||||
{
|
||||
int status = 0;
|
||||
std::size_t size = 0;
|
||||
return abi::__cxa_demangle( name, NULL, &size, &status );
|
||||
}
|
||||
|
||||
inline void demangle_free( char const * name ) BOOST_NOEXCEPT
|
||||
{
|
||||
std::free( const_cast< char* >( name ) );
|
||||
}
|
||||
|
||||
inline std::string demangle( char const * name )
|
||||
{
|
||||
scoped_demangled_name demangled_name( name );
|
||||
char const * const p = demangled_name.get();
|
||||
if( p )
|
||||
{
|
||||
return p;
|
||||
}
|
||||
else
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
inline void demangle_free( char const * ) BOOST_NOEXCEPT
|
||||
{
|
||||
}
|
||||
|
||||
inline std::string demangle( char const * name )
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace core
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#undef BOOST_CORE_HAS_CXXABI_H
|
||||
|
||||
#endif // #ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED
|
74
boost/detail/templated_streams.hpp
Normal file
74
boost/detail/templated_streams.hpp
Normal file
|
@ -0,0 +1,74 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost detail/templated_streams.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_DETAIL_TEMPLATED_STREAMS_HPP
|
||||
#define BOOST_DETAIL_TEMPLATED_STREAMS_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) BOOST_TEMPLATED_STREAM_* macros
|
||||
//
|
||||
// Provides workaround platforms without stream class templates.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_NO_STD_LOCALE)
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) \
|
||||
template < typename E , typename T >
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) \
|
||||
template < typename E , typename T , typename A >
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) \
|
||||
typename E , typename T
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) \
|
||||
typename E , typename T , typename A
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_COMMA ,
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ELEM(E) E
|
||||
#define BOOST_TEMPLATED_STREAM_TRAITS(T) T
|
||||
#define BOOST_TEMPLATED_STREAM_ALLOC(A) A
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM(X,E,T) \
|
||||
BOOST_JOIN(std::basic_,X)< E , T >
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
|
||||
BOOST_JOIN(std::basic_,X)< E , T , A >
|
||||
|
||||
#else // defined(BOOST_NO_STD_LOCALE)
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_TEMPLATE_ALLOC(E,T,A) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS(E,T) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ARGS_ALLOC(E,T,A) /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_COMMA /**/
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_ELEM(E) char
|
||||
#define BOOST_TEMPLATED_STREAM_TRAITS(T) std::char_traits<char>
|
||||
#define BOOST_TEMPLATED_STREAM_ALLOC(A) std::allocator<char>
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM(X,E,T) \
|
||||
std::X
|
||||
|
||||
#define BOOST_TEMPLATED_STREAM_WITH_ALLOC(X,E,T,A) \
|
||||
std::X
|
||||
|
||||
#endif // BOOST_NO_STD_LOCALE
|
||||
|
||||
#endif // BOOST_DETAIL_TEMPLATED_STREAMS_HPP
|
36
boost/functional/hash/hash_fwd.hpp
Normal file
36
boost/functional/hash/hash_fwd.hpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
// Copyright 2005-2009 Daniel James.
|
||||
// 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)
|
||||
|
||||
// Based on Peter Dimov's proposal
|
||||
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
|
||||
// issue 6.18.
|
||||
|
||||
#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP)
|
||||
#define BOOST_FUNCTIONAL_HASH_FWD_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template <class T> struct hash;
|
||||
|
||||
template <class T> void hash_combine(std::size_t& seed, T const& v);
|
||||
|
||||
template <class It> std::size_t hash_range(It, It);
|
||||
template <class It> void hash_range(std::size_t&, It, It);
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
|
||||
template <class T> inline std::size_t hash_range(T*, T*);
|
||||
template <class T> inline void hash_range(std::size_t&, T*, T*);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
11
boost/functional/hash_fwd.hpp
Normal file
11
boost/functional/hash_fwd.hpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
// Copyright 2005-2009 Daniel James.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/functional/hash/hash_fwd.hpp>
|
97
boost/math/common_factor_ct.hpp
Normal file
97
boost/math/common_factor_ct.hpp
Normal file
|
@ -0,0 +1,97 @@
|
|||
// Boost common_factor_ct.hpp header file ----------------------------------//
|
||||
|
||||
// (C) Copyright Daryle Walker and Stephen Cleary 2001-2002.
|
||||
// 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 for updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_MATH_COMMON_FACTOR_CT_HPP
|
||||
#define BOOST_MATH_COMMON_FACTOR_CT_HPP
|
||||
|
||||
#include <boost/math_fwd.hpp> // self include
|
||||
#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT, etc.
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace math
|
||||
{
|
||||
|
||||
// Implementation details --------------------------------------------------//
|
||||
|
||||
namespace detail
|
||||
{
|
||||
// Build GCD with Euclid's recursive algorithm
|
||||
template < static_gcd_type Value1, static_gcd_type Value2 >
|
||||
struct static_gcd_helper_t
|
||||
{
|
||||
private:
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, new_value1 = Value2 );
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, new_value2 = Value1 % Value2 );
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
#define BOOST_DETAIL_GCD_HELPER_VAL(Value) static_cast<static_gcd_type>(Value)
|
||||
#else
|
||||
typedef static_gcd_helper_t self_type;
|
||||
#define BOOST_DETAIL_GCD_HELPER_VAL(Value) (self_type:: Value )
|
||||
#endif
|
||||
|
||||
typedef static_gcd_helper_t< BOOST_DETAIL_GCD_HELPER_VAL(new_value1),
|
||||
BOOST_DETAIL_GCD_HELPER_VAL(new_value2) > next_step_type;
|
||||
|
||||
#undef BOOST_DETAIL_GCD_HELPER_VAL
|
||||
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, value = next_step_type::value );
|
||||
};
|
||||
|
||||
// Non-recursive case
|
||||
template < static_gcd_type Value1 >
|
||||
struct static_gcd_helper_t< Value1, 0UL >
|
||||
{
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 );
|
||||
};
|
||||
|
||||
// Build the LCM from the GCD
|
||||
template < static_gcd_type Value1, static_gcd_type Value2 >
|
||||
struct static_lcm_helper_t
|
||||
{
|
||||
typedef static_gcd_helper_t<Value1, Value2> gcd_type;
|
||||
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 / gcd_type::value
|
||||
* Value2 );
|
||||
};
|
||||
|
||||
// Special case for zero-GCD values
|
||||
template < >
|
||||
struct static_lcm_helper_t< 0UL, 0UL >
|
||||
{
|
||||
BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
// Compile-time greatest common divisor evaluator class declaration --------//
|
||||
|
||||
template < static_gcd_type Value1, static_gcd_type Value2 >
|
||||
struct static_gcd : public mpl::integral_c<static_gcd_type, (detail::static_gcd_helper_t<Value1, Value2>::value) >
|
||||
{
|
||||
}; // boost::math::static_gcd
|
||||
|
||||
|
||||
// Compile-time least common multiple evaluator class declaration ----------//
|
||||
|
||||
template < static_gcd_type Value1, static_gcd_type Value2 >
|
||||
struct static_lcm : public mpl::integral_c<static_gcd_type, (detail::static_lcm_helper_t<Value1, Value2>::value) >
|
||||
{
|
||||
}; // boost::math::static_lcm
|
||||
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_MATH_COMMON_FACTOR_CT_HPP
|
108
boost/math_fwd.hpp
Normal file
108
boost/math_fwd.hpp
Normal file
|
@ -0,0 +1,108 @@
|
|||
// Boost math_fwd.hpp header file ------------------------------------------//
|
||||
|
||||
// (C) Copyright Hubert Holin and Daryle Walker 2001-2002. 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/math for documentation.
|
||||
|
||||
#ifndef BOOST_MATH_FWD_HPP
|
||||
#define BOOST_MATH_FWD_HPP
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace math
|
||||
{
|
||||
|
||||
|
||||
// From <boost/math/quaternion.hpp> ----------------------------------------//
|
||||
|
||||
template < typename T >
|
||||
class quaternion;
|
||||
|
||||
template < >
|
||||
class quaternion< float >;
|
||||
template < >
|
||||
class quaternion< double >;
|
||||
template < >
|
||||
class quaternion< long double >;
|
||||
|
||||
// Also has many function templates (including operators)
|
||||
|
||||
|
||||
// From <boost/math/octonion.hpp> ------------------------------------------//
|
||||
|
||||
template < typename T >
|
||||
class octonion;
|
||||
|
||||
template < >
|
||||
class octonion< float >;
|
||||
template < >
|
||||
class octonion< double >;
|
||||
template < >
|
||||
class octonion< long double >;
|
||||
|
||||
// Also has many function templates (including operators)
|
||||
|
||||
|
||||
// From <boost/math/special_functions/acosh.hpp> ---------------------------//
|
||||
|
||||
// Only has function template
|
||||
|
||||
|
||||
// From <boost/math/special_functions/asinh.hpp> ---------------------------//
|
||||
|
||||
// Only has function template
|
||||
|
||||
|
||||
// From <boost/math/special_functions/atanh.hpp> ---------------------------//
|
||||
|
||||
// Only has function template
|
||||
|
||||
|
||||
// From <boost/math/special_functions/sinc.hpp> ----------------------------//
|
||||
|
||||
// Only has function templates
|
||||
|
||||
|
||||
// From <boost/math/special_functions/sinhc.hpp> ---------------------------//
|
||||
|
||||
// Only has function templates
|
||||
|
||||
|
||||
// From <boost/math/common_factor.hpp> -------------------------------------//
|
||||
|
||||
// Only #includes other headers
|
||||
|
||||
|
||||
// From <boost/math/common_factor_ct.hpp> ----------------------------------//
|
||||
|
||||
#ifdef BOOST_NO_INTEGRAL_INT64_T
|
||||
typedef unsigned long static_gcd_type;
|
||||
#else
|
||||
typedef boost::uintmax_t static_gcd_type;
|
||||
#endif
|
||||
|
||||
template < static_gcd_type Value1, static_gcd_type Value2 >
|
||||
struct static_gcd;
|
||||
template < static_gcd_type Value1, static_gcd_type Value2 >
|
||||
struct static_lcm;
|
||||
|
||||
|
||||
// From <boost/math/common_factor_rt.hpp> ----------------------------------//
|
||||
|
||||
template < typename IntegerType >
|
||||
class gcd_evaluator;
|
||||
template < typename IntegerType >
|
||||
class lcm_evaluator;
|
||||
|
||||
// Also has a couple of function templates
|
||||
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_MATH_FWD_HPP
|
43
boost/mpl/aux_/empty_impl.hpp
Normal file
43
boost/mpl/aux_/empty_impl.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/empty_fwd.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// default implementation; conrete sequences might override it by
|
||||
// specializing either the 'empty_impl' or the primary 'empty' template
|
||||
|
||||
template< typename Tag >
|
||||
struct empty_impl
|
||||
{
|
||||
template< typename Sequence > struct apply
|
||||
: is_same<
|
||||
typename begin<Sequence>::type
|
||||
, typename end<Sequence>::type
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED
|
41
boost/mpl/aux_/front_impl.hpp
Normal file
41
boost/mpl/aux_/front_impl.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
|
||||
#ifndef BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/front_fwd.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
// default implementation; conrete sequences might override it by
|
||||
// specializing either the 'front_impl' or the primary 'front' template
|
||||
|
||||
template< typename Tag >
|
||||
struct front_impl
|
||||
{
|
||||
template< typename Sequence > struct apply
|
||||
{
|
||||
typedef typename begin<Sequence>::type iter_;
|
||||
typedef typename deref<iter_>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_impl)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED
|
39
boost/mpl/empty.hpp
Normal file
39
boost/mpl/empty.hpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
|
||||
#ifndef BOOST_MPL_EMPTY_HPP_INCLUDED
|
||||
#define BOOST_MPL_EMPTY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/empty_fwd.hpp>
|
||||
#include <boost/mpl/sequence_tag.hpp>
|
||||
#include <boost/mpl/aux_/empty_impl.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
>
|
||||
struct empty
|
||||
: empty_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,empty,(Sequence))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(1, empty)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_EMPTY_HPP_INCLUDED
|
112
boost/mpl/equal.hpp
Normal file
112
boost/mpl/equal.hpp
Normal file
|
@ -0,0 +1,112 @@
|
|||
|
||||
#ifndef BOOST_MPL_EQUAL_HPP_INCLUDED
|
||||
#define BOOST_MPL_EQUAL_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/iter_fold_if_impl.hpp>
|
||||
#include <boost/mpl/aux_/iter_apply.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/always.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/lambda.hpp>
|
||||
#include <boost/mpl/bind.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename Predicate
|
||||
, typename LastIterator1
|
||||
, typename LastIterator2
|
||||
>
|
||||
struct equal_pred
|
||||
{
|
||||
template<
|
||||
typename Iterator2
|
||||
, typename Iterator1
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
typedef typename and_<
|
||||
not_< is_same<Iterator1,LastIterator1> >
|
||||
, not_< is_same<Iterator2,LastIterator2> >
|
||||
, aux::iter_apply2<Predicate,Iterator1,Iterator2>
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
template<
|
||||
typename Sequence1
|
||||
, typename Sequence2
|
||||
, typename Predicate
|
||||
>
|
||||
struct equal_impl
|
||||
{
|
||||
typedef typename begin<Sequence1>::type first1_;
|
||||
typedef typename begin<Sequence2>::type first2_;
|
||||
typedef typename end<Sequence1>::type last1_;
|
||||
typedef typename end<Sequence2>::type last2_;
|
||||
|
||||
typedef aux::iter_fold_if_impl<
|
||||
first1_
|
||||
, first2_
|
||||
, next<>
|
||||
, protect< aux::equal_pred<Predicate,last1_,last2_> >
|
||||
, void_
|
||||
, always<false_>
|
||||
> fold_;
|
||||
|
||||
typedef typename fold_::iterator iter1_;
|
||||
typedef typename fold_::state iter2_;
|
||||
typedef and_<
|
||||
is_same<iter1_,last1_>
|
||||
, is_same<iter2_,last2_>
|
||||
> result_;
|
||||
|
||||
typedef typename result_::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace aux
|
||||
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
|
||||
, typename Predicate = is_same<_,_>
|
||||
>
|
||||
struct equal
|
||||
: aux::msvc_eti_base<
|
||||
typename aux::equal_impl<Sequence1,Sequence2,Predicate>::type
|
||||
>::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(2, equal)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_EQUAL_HPP_INCLUDED
|
39
boost/mpl/front.hpp
Normal file
39
boost/mpl/front.hpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
|
||||
#ifndef BOOST_MPL_FRONT_HPP_INCLUDED
|
||||
#define BOOST_MPL_FRONT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/front_fwd.hpp>
|
||||
#include <boost/mpl/aux_/front_impl.hpp>
|
||||
#include <boost/mpl/sequence_tag.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
>
|
||||
struct front
|
||||
: front_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,front,(Sequence))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(1, front)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_FRONT_HPP_INCLUDED
|
112
boost/mpl/is_sequence.hpp
Normal file
112
boost/mpl/is_sequence.hpp
Normal file
|
@ -0,0 +1,112 @@
|
|||
|
||||
#ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
|
||||
#define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/sequence_tag_fwd.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/aux_/has_tag.hpp>
|
||||
#include <boost/mpl/aux_/has_begin.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
# include <boost/mpl/aux_/msvc_is_class.hpp>
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
# include <boost/type_traits/is_class.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
|
||||
namespace aux {
|
||||
|
||||
// agurt, 11/jun/03:
|
||||
// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a
|
||||
// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >'
|
||||
// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds
|
||||
// the issue for most real-world cases
|
||||
template< typename T > struct is_sequence_impl
|
||||
: and_<
|
||||
identity< aux::has_tag<T> >
|
||||
, identity< aux::has_begin<T> >
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||
>
|
||||
struct is_sequence
|
||||
: if_<
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
aux::msvc_is_class<T>
|
||||
#else
|
||||
boost::is_class<T>
|
||||
#endif
|
||||
, aux::is_sequence_impl<T>
|
||||
, bool_<false>
|
||||
>::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
|
||||
};
|
||||
|
||||
#elif defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||
>
|
||||
struct is_sequence
|
||||
: bool_<false>
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||
>
|
||||
struct is_sequence
|
||||
: not_< is_same< typename begin<T>::type, void_ > >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
|
||||
};
|
||||
|
||||
#endif // BOOST_MSVC
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
template<> struct is_sequence<int>
|
||||
: bool_<false>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
|
35
boost/mpl/iterator_category.hpp
Normal file
35
boost/mpl/iterator_category.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
#ifndef BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
|
||||
#define BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
|
||||
>
|
||||
struct iterator_category
|
||||
{
|
||||
typedef typename Iterator::category type;
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,iterator_category,(Iterator))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(1, iterator_category)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
|
21
boost/mpl/limits/list.hpp
Normal file
21
boost/mpl/limits/list.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_LIMIT_LIST_SIZE)
|
||||
# define BOOST_MPL_LIMIT_LIST_SIZE 20
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
|
57
boost/mpl/list.hpp
Normal file
57
boost/mpl/list.hpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/limits/list.hpp>
|
||||
# include <boost/mpl/aux_/na.hpp>
|
||||
# include <boost/mpl/aux_/config/preprocessor.hpp>
|
||||
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/stringize.hpp>
|
||||
|
||||
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
|
||||
# define AUX778076_LIST_HEADER \
|
||||
BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \
|
||||
/**/
|
||||
#else
|
||||
# define AUX778076_LIST_HEADER \
|
||||
BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER)
|
||||
# undef AUX778076_LIST_HEADER
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/list.hpp>
|
||||
|
||||
# define AUX778076_SEQUENCE_NAME list
|
||||
# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE
|
||||
# include <boost/mpl/aux_/sequence_wrapper.hpp>
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_LIST_HPP_INCLUDED
|
33
boost/mpl/list/aux_/O1_size.hpp
Normal file
33
boost/mpl/list/aux_/O1_size.hpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/O1_size_fwd.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct O1_size_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List > struct apply
|
||||
: List::size
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
|
44
boost/mpl/list/aux_/begin_end.hpp
Normal file
44
boost/mpl/list/aux_/begin_end.hpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/begin_end_fwd.hpp>
|
||||
#include <boost/mpl/list/aux_/iterator.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
#include <boost/mpl/list/aux_/item.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct begin_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List > struct apply
|
||||
{
|
||||
typedef l_iter<typename List::type> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct end_impl< aux::list_tag >
|
||||
{
|
||||
template< typename > struct apply
|
||||
{
|
||||
typedef l_iter<l_end> type;
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
|
34
boost/mpl/list/aux_/clear.hpp
Normal file
34
boost/mpl/list/aux_/clear.hpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/clear_fwd.hpp>
|
||||
#include <boost/mpl/list/aux_/item.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct clear_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List > struct apply
|
||||
{
|
||||
typedef l_end type;
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
|
34
boost/mpl/list/aux_/empty.hpp
Normal file
34
boost/mpl/list/aux_/empty.hpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/empty_fwd.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct empty_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List > struct apply
|
||||
: not_<typename List::size>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
|
33
boost/mpl/list/aux_/front.hpp
Normal file
33
boost/mpl/list/aux_/front.hpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/front_fwd.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct front_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List > struct apply
|
||||
{
|
||||
typedef typename List::item type;
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
|
35
boost/mpl/list/aux_/include_preprocessed.hpp
Normal file
35
boost/mpl/list/aux_/include_preprocessed.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2001-2006
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
|
||||
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/stringize.hpp>
|
||||
|
||||
# define AUX778076_HEADER \
|
||||
aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \
|
||||
/**/
|
||||
|
||||
#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
|
||||
# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
|
||||
# include AUX778076_INCLUDE_STRING
|
||||
# undef AUX778076_INCLUDE_STRING
|
||||
#else
|
||||
# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
|
||||
#endif
|
||||
|
||||
# undef AUX778076_HEADER
|
||||
|
||||
#undef BOOST_MPL_PREPROCESSED_HEADER
|
55
boost/mpl/list/aux_/item.hpp
Normal file
55
boost/mpl/list/aux_/item.hpp
Normal file
|
@ -0,0 +1,55 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/long.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Size
|
||||
, typename T
|
||||
, typename Next
|
||||
>
|
||||
struct l_item
|
||||
{
|
||||
// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
typedef int begin;
|
||||
#endif
|
||||
typedef aux::list_tag tag;
|
||||
typedef l_item type;
|
||||
|
||||
typedef Size size;
|
||||
typedef T item;
|
||||
typedef Next next;
|
||||
};
|
||||
|
||||
struct l_end
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
typedef int begin;
|
||||
#endif
|
||||
typedef aux::list_tag tag;
|
||||
typedef l_end type;
|
||||
typedef long_<0> size;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
|
76
boost/mpl/list/aux_/iterator.hpp
Normal file
76
boost/mpl/list/aux_/iterator.hpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/iterator_tags.hpp>
|
||||
#include <boost/mpl/next_prior.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#include <boost/mpl/list/aux_/item.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/lambda_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template< typename Node >
|
||||
struct l_iter
|
||||
{
|
||||
typedef aux::l_iter_tag tag;
|
||||
typedef forward_iterator_tag category;
|
||||
};
|
||||
|
||||
template< typename Node >
|
||||
struct deref< l_iter<Node> >
|
||||
{
|
||||
typedef typename Node::item type;
|
||||
};
|
||||
|
||||
template< typename Node >
|
||||
struct next< l_iter<Node> >
|
||||
{
|
||||
typedef l_iter< typename Node::next > type;
|
||||
};
|
||||
|
||||
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
template< typename Node >
|
||||
struct l_iter
|
||||
{
|
||||
typedef aux::l_iter_tag tag;
|
||||
typedef forward_iterator_tag category;
|
||||
typedef typename Node::item type;
|
||||
typedef l_iter< typename mpl::next<Node>::type > next;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template<> struct l_iter<l_end>
|
||||
{
|
||||
typedef aux::l_iter_tag tag;
|
||||
typedef forward_iterator_tag category;
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
typedef na type;
|
||||
typedef l_iter next;
|
||||
#endif
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
|
68
boost/mpl/list/aux_/numbered.hpp
Normal file
68
boost/mpl/list/aux_/numbered.hpp
Normal file
|
@ -0,0 +1,68 @@
|
|||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
|
||||
|
||||
// Copyright Peter Dimov 2000-2002
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
#include <boost/preprocessor/enum_params.hpp>
|
||||
#include <boost/preprocessor/enum_shifted_params.hpp>
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if i == 1
|
||||
|
||||
template<
|
||||
BOOST_PP_ENUM_PARAMS(i, typename T)
|
||||
>
|
||||
struct list1
|
||||
: l_item<
|
||||
long_<1>
|
||||
, T0
|
||||
, l_end
|
||||
>
|
||||
{
|
||||
typedef list1 type;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
# define MPL_AUX_LIST_TAIL(list, i, T) \
|
||||
BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \
|
||||
BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \
|
||||
> \
|
||||
/**/
|
||||
|
||||
template<
|
||||
BOOST_PP_ENUM_PARAMS(i, typename T)
|
||||
>
|
||||
struct BOOST_PP_CAT(list,i)
|
||||
: l_item<
|
||||
long_<i>
|
||||
, T0
|
||||
, MPL_AUX_LIST_TAIL(list,i,T)
|
||||
>
|
||||
{
|
||||
typedef BOOST_PP_CAT(list,i) type;
|
||||
};
|
||||
|
||||
# undef MPL_AUX_LIST_TAIL
|
||||
|
||||
#endif // i == 1
|
||||
|
||||
#undef i
|
||||
|
||||
#endif // BOOST_PP_IS_ITERATING
|
71
boost/mpl/list/aux_/numbered_c.hpp
Normal file
71
boost/mpl/list/aux_/numbered_c.hpp
Normal file
|
@ -0,0 +1,71 @@
|
|||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
#include <boost/preprocessor/enum_params.hpp>
|
||||
#include <boost/preprocessor/enum_shifted_params.hpp>
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if i == 1
|
||||
|
||||
template<
|
||||
typename T
|
||||
, BOOST_PP_ENUM_PARAMS(i, T C)
|
||||
>
|
||||
struct list1_c
|
||||
: l_item<
|
||||
long_<1>
|
||||
, integral_c<T,C0>
|
||||
, l_end
|
||||
>
|
||||
{
|
||||
typedef list1_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
# define MPL_AUX_LIST_C_TAIL(list, i, C) \
|
||||
BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c)<T, \
|
||||
BOOST_PP_ENUM_SHIFTED_PARAMS(i, C) \
|
||||
> \
|
||||
/**/
|
||||
|
||||
template<
|
||||
typename T
|
||||
, BOOST_PP_ENUM_PARAMS(i, T C)
|
||||
>
|
||||
struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c)
|
||||
: l_item<
|
||||
long_<i>
|
||||
, integral_c<T,C0>
|
||||
, MPL_AUX_LIST_C_TAIL(list,i,C)
|
||||
>
|
||||
{
|
||||
typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
# undef MPL_AUX_LIST_C_TAIL
|
||||
|
||||
#endif // i == 1
|
||||
|
||||
#undef i
|
||||
|
||||
#endif // BOOST_PP_IS_ITERATING
|
34
boost/mpl/list/aux_/pop_front.hpp
Normal file
34
boost/mpl/list/aux_/pop_front.hpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/pop_front_fwd.hpp>
|
||||
#include <boost/mpl/next_prior.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct pop_front_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List > struct apply
|
||||
{
|
||||
typedef typename mpl::next<List>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
|
149
boost/mpl/list/aux_/preprocessed/plain/list10.hpp
Normal file
149
boost/mpl/list/aux_/preprocessed/plain/list10.hpp
Normal file
|
@ -0,0 +1,149 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list10.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T0
|
||||
>
|
||||
struct list1
|
||||
: l_item<
|
||||
long_<1>
|
||||
, T0
|
||||
, l_end
|
||||
>
|
||||
{
|
||||
typedef list1 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1
|
||||
>
|
||||
struct list2
|
||||
: l_item<
|
||||
long_<2>
|
||||
, T0
|
||||
, list1<T1>
|
||||
>
|
||||
{
|
||||
typedef list2 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2
|
||||
>
|
||||
struct list3
|
||||
: l_item<
|
||||
long_<3>
|
||||
, T0
|
||||
, list2< T1,T2 >
|
||||
>
|
||||
{
|
||||
typedef list3 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct list4
|
||||
: l_item<
|
||||
long_<4>
|
||||
, T0
|
||||
, list3< T1,T2,T3 >
|
||||
>
|
||||
{
|
||||
typedef list4 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct list5
|
||||
: l_item<
|
||||
long_<5>
|
||||
, T0
|
||||
, list4< T1,T2,T3,T4 >
|
||||
>
|
||||
{
|
||||
typedef list5 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct list6
|
||||
: l_item<
|
||||
long_<6>
|
||||
, T0
|
||||
, list5< T1,T2,T3,T4,T5 >
|
||||
>
|
||||
{
|
||||
typedef list6 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6
|
||||
>
|
||||
struct list7
|
||||
: l_item<
|
||||
long_<7>
|
||||
, T0
|
||||
, list6< T1,T2,T3,T4,T5,T6 >
|
||||
>
|
||||
{
|
||||
typedef list7 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7
|
||||
>
|
||||
struct list8
|
||||
: l_item<
|
||||
long_<8>
|
||||
, T0
|
||||
, list7< T1,T2,T3,T4,T5,T6,T7 >
|
||||
>
|
||||
{
|
||||
typedef list8 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8
|
||||
>
|
||||
struct list9
|
||||
: l_item<
|
||||
long_<9>
|
||||
, T0
|
||||
, list8< T1,T2,T3,T4,T5,T6,T7,T8 >
|
||||
>
|
||||
{
|
||||
typedef list9 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
>
|
||||
struct list10
|
||||
: l_item<
|
||||
long_<10>
|
||||
, T0
|
||||
, list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 >
|
||||
>
|
||||
{
|
||||
typedef list10 type;
|
||||
};
|
||||
|
||||
}}
|
164
boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
Normal file
164
boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
Normal file
|
@ -0,0 +1,164 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list10_c.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0
|
||||
>
|
||||
struct list1_c
|
||||
: l_item<
|
||||
long_<1>
|
||||
, integral_c< T,C0 >
|
||||
, l_end
|
||||
>
|
||||
{
|
||||
typedef list1_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1
|
||||
>
|
||||
struct list2_c
|
||||
: l_item<
|
||||
long_<2>
|
||||
, integral_c< T,C0 >
|
||||
, list1_c< T,C1 >
|
||||
>
|
||||
{
|
||||
typedef list2_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2
|
||||
>
|
||||
struct list3_c
|
||||
: l_item<
|
||||
long_<3>
|
||||
, integral_c< T,C0 >
|
||||
, list2_c< T,C1,C2 >
|
||||
>
|
||||
{
|
||||
typedef list3_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3
|
||||
>
|
||||
struct list4_c
|
||||
: l_item<
|
||||
long_<4>
|
||||
, integral_c< T,C0 >
|
||||
, list3_c< T,C1,C2,C3 >
|
||||
>
|
||||
{
|
||||
typedef list4_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4
|
||||
>
|
||||
struct list5_c
|
||||
: l_item<
|
||||
long_<5>
|
||||
, integral_c< T,C0 >
|
||||
, list4_c< T,C1,C2,C3,C4 >
|
||||
>
|
||||
{
|
||||
typedef list5_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5
|
||||
>
|
||||
struct list6_c
|
||||
: l_item<
|
||||
long_<6>
|
||||
, integral_c< T,C0 >
|
||||
, list5_c< T,C1,C2,C3,C4,C5 >
|
||||
>
|
||||
{
|
||||
typedef list6_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6
|
||||
>
|
||||
struct list7_c
|
||||
: l_item<
|
||||
long_<7>
|
||||
, integral_c< T,C0 >
|
||||
, list6_c< T,C1,C2,C3,C4,C5,C6 >
|
||||
>
|
||||
{
|
||||
typedef list7_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
|
||||
>
|
||||
struct list8_c
|
||||
: l_item<
|
||||
long_<8>
|
||||
, integral_c< T,C0 >
|
||||
, list7_c< T,C1,C2,C3,C4,C5,C6,C7 >
|
||||
>
|
||||
{
|
||||
typedef list8_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
|
||||
>
|
||||
struct list9_c
|
||||
: l_item<
|
||||
long_<9>
|
||||
, integral_c< T,C0 >
|
||||
, list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 >
|
||||
>
|
||||
{
|
||||
typedef list9_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
|
||||
>
|
||||
struct list10_c
|
||||
: l_item<
|
||||
long_<10>
|
||||
, integral_c< T,C0 >
|
||||
, list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
|
||||
>
|
||||
{
|
||||
typedef list10_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
169
boost/mpl/list/aux_/preprocessed/plain/list20.hpp
Normal file
169
boost/mpl/list/aux_/preprocessed/plain/list20.hpp
Normal file
|
@ -0,0 +1,169 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list20.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10
|
||||
>
|
||||
struct list11
|
||||
: l_item<
|
||||
long_<11>
|
||||
, T0
|
||||
, list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
|
||||
>
|
||||
{
|
||||
typedef list11 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11
|
||||
>
|
||||
struct list12
|
||||
: l_item<
|
||||
long_<12>
|
||||
, T0
|
||||
, list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
|
||||
>
|
||||
{
|
||||
typedef list12 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12
|
||||
>
|
||||
struct list13
|
||||
: l_item<
|
||||
long_<13>
|
||||
, T0
|
||||
, list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
|
||||
>
|
||||
{
|
||||
typedef list13 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13
|
||||
>
|
||||
struct list14
|
||||
: l_item<
|
||||
long_<14>
|
||||
, T0
|
||||
, list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
|
||||
>
|
||||
{
|
||||
typedef list14 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
>
|
||||
struct list15
|
||||
: l_item<
|
||||
long_<15>
|
||||
, T0
|
||||
, list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >
|
||||
>
|
||||
{
|
||||
typedef list15 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15
|
||||
>
|
||||
struct list16
|
||||
: l_item<
|
||||
long_<16>
|
||||
, T0
|
||||
, list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >
|
||||
>
|
||||
{
|
||||
typedef list16 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16
|
||||
>
|
||||
struct list17
|
||||
: l_item<
|
||||
long_<17>
|
||||
, T0
|
||||
, list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >
|
||||
>
|
||||
{
|
||||
typedef list17 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17
|
||||
>
|
||||
struct list18
|
||||
: l_item<
|
||||
long_<18>
|
||||
, T0
|
||||
, list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >
|
||||
>
|
||||
{
|
||||
typedef list18 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18
|
||||
>
|
||||
struct list19
|
||||
: l_item<
|
||||
long_<19>
|
||||
, T0
|
||||
, list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >
|
||||
>
|
||||
{
|
||||
typedef list19 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
>
|
||||
struct list20
|
||||
: l_item<
|
||||
long_<20>
|
||||
, T0
|
||||
, list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >
|
||||
>
|
||||
{
|
||||
typedef list20 type;
|
||||
};
|
||||
|
||||
}}
|
173
boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
Normal file
173
boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
Normal file
|
@ -0,0 +1,173 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list20_c.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
>
|
||||
struct list11_c
|
||||
: l_item<
|
||||
long_<11>
|
||||
, integral_c< T,C0 >
|
||||
, list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
|
||||
>
|
||||
{
|
||||
typedef list11_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11
|
||||
>
|
||||
struct list12_c
|
||||
: l_item<
|
||||
long_<12>
|
||||
, integral_c< T,C0 >
|
||||
, list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
|
||||
>
|
||||
{
|
||||
typedef list12_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12
|
||||
>
|
||||
struct list13_c
|
||||
: l_item<
|
||||
long_<13>
|
||||
, integral_c< T,C0 >
|
||||
, list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
|
||||
>
|
||||
{
|
||||
typedef list13_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13
|
||||
>
|
||||
struct list14_c
|
||||
: l_item<
|
||||
long_<14>
|
||||
, integral_c< T,C0 >
|
||||
, list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >
|
||||
>
|
||||
{
|
||||
typedef list14_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14
|
||||
>
|
||||
struct list15_c
|
||||
: l_item<
|
||||
long_<15>
|
||||
, integral_c< T,C0 >
|
||||
, list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >
|
||||
>
|
||||
{
|
||||
typedef list15_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15
|
||||
>
|
||||
struct list16_c
|
||||
: l_item<
|
||||
long_<16>
|
||||
, integral_c< T,C0 >
|
||||
, list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >
|
||||
>
|
||||
{
|
||||
typedef list16_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16
|
||||
>
|
||||
struct list17_c
|
||||
: l_item<
|
||||
long_<17>
|
||||
, integral_c< T,C0 >
|
||||
, list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >
|
||||
>
|
||||
{
|
||||
typedef list17_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17
|
||||
>
|
||||
struct list18_c
|
||||
: l_item<
|
||||
long_<18>
|
||||
, integral_c< T,C0 >
|
||||
, list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >
|
||||
>
|
||||
{
|
||||
typedef list18_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
|
||||
>
|
||||
struct list19_c
|
||||
: l_item<
|
||||
long_<19>
|
||||
, integral_c< T,C0 >
|
||||
, list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >
|
||||
>
|
||||
{
|
||||
typedef list19_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
|
||||
>
|
||||
struct list20_c
|
||||
: l_item<
|
||||
long_<20>
|
||||
, integral_c< T,C0 >
|
||||
, list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >
|
||||
>
|
||||
{
|
||||
typedef list20_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
189
boost/mpl/list/aux_/preprocessed/plain/list30.hpp
Normal file
189
boost/mpl/list/aux_/preprocessed/plain/list30.hpp
Normal file
|
@ -0,0 +1,189 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list30.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20
|
||||
>
|
||||
struct list21
|
||||
: l_item<
|
||||
long_<21>
|
||||
, T0
|
||||
, list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 >
|
||||
>
|
||||
{
|
||||
typedef list21 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21
|
||||
>
|
||||
struct list22
|
||||
: l_item<
|
||||
long_<22>
|
||||
, T0
|
||||
, list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 >
|
||||
>
|
||||
{
|
||||
typedef list22 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22
|
||||
>
|
||||
struct list23
|
||||
: l_item<
|
||||
long_<23>
|
||||
, T0
|
||||
, list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 >
|
||||
>
|
||||
{
|
||||
typedef list23 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23
|
||||
>
|
||||
struct list24
|
||||
: l_item<
|
||||
long_<24>
|
||||
, T0
|
||||
, list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 >
|
||||
>
|
||||
{
|
||||
typedef list24 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
>
|
||||
struct list25
|
||||
: l_item<
|
||||
long_<25>
|
||||
, T0
|
||||
, list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 >
|
||||
>
|
||||
{
|
||||
typedef list25 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25
|
||||
>
|
||||
struct list26
|
||||
: l_item<
|
||||
long_<26>
|
||||
, T0
|
||||
, list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 >
|
||||
>
|
||||
{
|
||||
typedef list26 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26
|
||||
>
|
||||
struct list27
|
||||
: l_item<
|
||||
long_<27>
|
||||
, T0
|
||||
, list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 >
|
||||
>
|
||||
{
|
||||
typedef list27 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27
|
||||
>
|
||||
struct list28
|
||||
: l_item<
|
||||
long_<28>
|
||||
, T0
|
||||
, list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 >
|
||||
>
|
||||
{
|
||||
typedef list28 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28
|
||||
>
|
||||
struct list29
|
||||
: l_item<
|
||||
long_<29>
|
||||
, T0
|
||||
, list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 >
|
||||
>
|
||||
{
|
||||
typedef list29 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
>
|
||||
struct list30
|
||||
: l_item<
|
||||
long_<30>
|
||||
, T0
|
||||
, list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 >
|
||||
>
|
||||
{
|
||||
typedef list30 type;
|
||||
};
|
||||
|
||||
}}
|
183
boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
Normal file
183
boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
Normal file
|
@ -0,0 +1,183 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list30_c.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
>
|
||||
struct list21_c
|
||||
: l_item<
|
||||
long_<21>
|
||||
, integral_c< T,C0 >
|
||||
, list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 >
|
||||
>
|
||||
{
|
||||
typedef list21_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21
|
||||
>
|
||||
struct list22_c
|
||||
: l_item<
|
||||
long_<22>
|
||||
, integral_c< T,C0 >
|
||||
, list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 >
|
||||
>
|
||||
{
|
||||
typedef list22_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22
|
||||
>
|
||||
struct list23_c
|
||||
: l_item<
|
||||
long_<23>
|
||||
, integral_c< T,C0 >
|
||||
, list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 >
|
||||
>
|
||||
{
|
||||
typedef list23_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23
|
||||
>
|
||||
struct list24_c
|
||||
: l_item<
|
||||
long_<24>
|
||||
, integral_c< T,C0 >
|
||||
, list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 >
|
||||
>
|
||||
{
|
||||
typedef list24_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24
|
||||
>
|
||||
struct list25_c
|
||||
: l_item<
|
||||
long_<25>
|
||||
, integral_c< T,C0 >
|
||||
, list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 >
|
||||
>
|
||||
{
|
||||
typedef list25_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25
|
||||
>
|
||||
struct list26_c
|
||||
: l_item<
|
||||
long_<26>
|
||||
, integral_c< T,C0 >
|
||||
, list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 >
|
||||
>
|
||||
{
|
||||
typedef list26_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26
|
||||
>
|
||||
struct list27_c
|
||||
: l_item<
|
||||
long_<27>
|
||||
, integral_c< T,C0 >
|
||||
, list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 >
|
||||
>
|
||||
{
|
||||
typedef list27_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27
|
||||
>
|
||||
struct list28_c
|
||||
: l_item<
|
||||
long_<28>
|
||||
, integral_c< T,C0 >
|
||||
, list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 >
|
||||
>
|
||||
{
|
||||
typedef list28_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
|
||||
>
|
||||
struct list29_c
|
||||
: l_item<
|
||||
long_<29>
|
||||
, integral_c< T,C0 >
|
||||
, list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 >
|
||||
>
|
||||
{
|
||||
typedef list29_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
|
||||
>
|
||||
struct list30_c
|
||||
: l_item<
|
||||
long_<30>
|
||||
, integral_c< T,C0 >
|
||||
, list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 >
|
||||
>
|
||||
{
|
||||
typedef list30_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
209
boost/mpl/list/aux_/preprocessed/plain/list40.hpp
Normal file
209
boost/mpl/list/aux_/preprocessed/plain/list40.hpp
Normal file
|
@ -0,0 +1,209 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list40.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30
|
||||
>
|
||||
struct list31
|
||||
: l_item<
|
||||
long_<31>
|
||||
, T0
|
||||
, list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 >
|
||||
>
|
||||
{
|
||||
typedef list31 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31
|
||||
>
|
||||
struct list32
|
||||
: l_item<
|
||||
long_<32>
|
||||
, T0
|
||||
, list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 >
|
||||
>
|
||||
{
|
||||
typedef list32 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32
|
||||
>
|
||||
struct list33
|
||||
: l_item<
|
||||
long_<33>
|
||||
, T0
|
||||
, list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 >
|
||||
>
|
||||
{
|
||||
typedef list33 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33
|
||||
>
|
||||
struct list34
|
||||
: l_item<
|
||||
long_<34>
|
||||
, T0
|
||||
, list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 >
|
||||
>
|
||||
{
|
||||
typedef list34 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
>
|
||||
struct list35
|
||||
: l_item<
|
||||
long_<35>
|
||||
, T0
|
||||
, list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 >
|
||||
>
|
||||
{
|
||||
typedef list35 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35
|
||||
>
|
||||
struct list36
|
||||
: l_item<
|
||||
long_<36>
|
||||
, T0
|
||||
, list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 >
|
||||
>
|
||||
{
|
||||
typedef list36 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36
|
||||
>
|
||||
struct list37
|
||||
: l_item<
|
||||
long_<37>
|
||||
, T0
|
||||
, list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 >
|
||||
>
|
||||
{
|
||||
typedef list37 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37
|
||||
>
|
||||
struct list38
|
||||
: l_item<
|
||||
long_<38>
|
||||
, T0
|
||||
, list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 >
|
||||
>
|
||||
{
|
||||
typedef list38 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38
|
||||
>
|
||||
struct list39
|
||||
: l_item<
|
||||
long_<39>
|
||||
, T0
|
||||
, list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 >
|
||||
>
|
||||
{
|
||||
typedef list39 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
>
|
||||
struct list40
|
||||
: l_item<
|
||||
long_<40>
|
||||
, T0
|
||||
, list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 >
|
||||
>
|
||||
{
|
||||
typedef list40 type;
|
||||
};
|
||||
|
||||
}}
|
193
boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
Normal file
193
boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
Normal file
|
@ -0,0 +1,193 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list40_c.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
>
|
||||
struct list31_c
|
||||
: l_item<
|
||||
long_<31>
|
||||
, integral_c< T,C0 >
|
||||
, list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 >
|
||||
>
|
||||
{
|
||||
typedef list31_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31
|
||||
>
|
||||
struct list32_c
|
||||
: l_item<
|
||||
long_<32>
|
||||
, integral_c< T,C0 >
|
||||
, list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 >
|
||||
>
|
||||
{
|
||||
typedef list32_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32
|
||||
>
|
||||
struct list33_c
|
||||
: l_item<
|
||||
long_<33>
|
||||
, integral_c< T,C0 >
|
||||
, list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 >
|
||||
>
|
||||
{
|
||||
typedef list33_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33
|
||||
>
|
||||
struct list34_c
|
||||
: l_item<
|
||||
long_<34>
|
||||
, integral_c< T,C0 >
|
||||
, list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 >
|
||||
>
|
||||
{
|
||||
typedef list34_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34
|
||||
>
|
||||
struct list35_c
|
||||
: l_item<
|
||||
long_<35>
|
||||
, integral_c< T,C0 >
|
||||
, list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 >
|
||||
>
|
||||
{
|
||||
typedef list35_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35
|
||||
>
|
||||
struct list36_c
|
||||
: l_item<
|
||||
long_<36>
|
||||
, integral_c< T,C0 >
|
||||
, list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 >
|
||||
>
|
||||
{
|
||||
typedef list36_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36
|
||||
>
|
||||
struct list37_c
|
||||
: l_item<
|
||||
long_<37>
|
||||
, integral_c< T,C0 >
|
||||
, list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 >
|
||||
>
|
||||
{
|
||||
typedef list37_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37
|
||||
>
|
||||
struct list38_c
|
||||
: l_item<
|
||||
long_<38>
|
||||
, integral_c< T,C0 >
|
||||
, list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 >
|
||||
>
|
||||
{
|
||||
typedef list38_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
|
||||
>
|
||||
struct list39_c
|
||||
: l_item<
|
||||
long_<39>
|
||||
, integral_c< T,C0 >
|
||||
, list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 >
|
||||
>
|
||||
{
|
||||
typedef list39_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
|
||||
>
|
||||
struct list40_c
|
||||
: l_item<
|
||||
long_<40>
|
||||
, integral_c< T,C0 >
|
||||
, list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 >
|
||||
>
|
||||
{
|
||||
typedef list40_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
229
boost/mpl/list/aux_/preprocessed/plain/list50.hpp
Normal file
229
boost/mpl/list/aux_/preprocessed/plain/list50.hpp
Normal file
|
@ -0,0 +1,229 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list50.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40
|
||||
>
|
||||
struct list41
|
||||
: l_item<
|
||||
long_<41>
|
||||
, T0
|
||||
, list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 >
|
||||
>
|
||||
{
|
||||
typedef list41 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41
|
||||
>
|
||||
struct list42
|
||||
: l_item<
|
||||
long_<42>
|
||||
, T0
|
||||
, list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 >
|
||||
>
|
||||
{
|
||||
typedef list42 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42
|
||||
>
|
||||
struct list43
|
||||
: l_item<
|
||||
long_<43>
|
||||
, T0
|
||||
, list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 >
|
||||
>
|
||||
{
|
||||
typedef list43 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42, typename T43
|
||||
>
|
||||
struct list44
|
||||
: l_item<
|
||||
long_<44>
|
||||
, T0
|
||||
, list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 >
|
||||
>
|
||||
{
|
||||
typedef list44 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42, typename T43, typename T44
|
||||
>
|
||||
struct list45
|
||||
: l_item<
|
||||
long_<45>
|
||||
, T0
|
||||
, list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 >
|
||||
>
|
||||
{
|
||||
typedef list45 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42, typename T43, typename T44
|
||||
, typename T45
|
||||
>
|
||||
struct list46
|
||||
: l_item<
|
||||
long_<46>
|
||||
, T0
|
||||
, list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 >
|
||||
>
|
||||
{
|
||||
typedef list46 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42, typename T43, typename T44
|
||||
, typename T45, typename T46
|
||||
>
|
||||
struct list47
|
||||
: l_item<
|
||||
long_<47>
|
||||
, T0
|
||||
, list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 >
|
||||
>
|
||||
{
|
||||
typedef list47 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42, typename T43, typename T44
|
||||
, typename T45, typename T46, typename T47
|
||||
>
|
||||
struct list48
|
||||
: l_item<
|
||||
long_<48>
|
||||
, T0
|
||||
, list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 >
|
||||
>
|
||||
{
|
||||
typedef list48 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42, typename T43, typename T44
|
||||
, typename T45, typename T46, typename T47, typename T48
|
||||
>
|
||||
struct list49
|
||||
: l_item<
|
||||
long_<49>
|
||||
, T0
|
||||
, list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 >
|
||||
>
|
||||
{
|
||||
typedef list49 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T0, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename T6, typename T7, typename T8, typename T9
|
||||
, typename T10, typename T11, typename T12, typename T13, typename T14
|
||||
, typename T15, typename T16, typename T17, typename T18, typename T19
|
||||
, typename T20, typename T21, typename T22, typename T23, typename T24
|
||||
, typename T25, typename T26, typename T27, typename T28, typename T29
|
||||
, typename T30, typename T31, typename T32, typename T33, typename T34
|
||||
, typename T35, typename T36, typename T37, typename T38, typename T39
|
||||
, typename T40, typename T41, typename T42, typename T43, typename T44
|
||||
, typename T45, typename T46, typename T47, typename T48, typename T49
|
||||
>
|
||||
struct list50
|
||||
: l_item<
|
||||
long_<50>
|
||||
, T0
|
||||
, list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 >
|
||||
>
|
||||
{
|
||||
typedef list50 type;
|
||||
};
|
||||
|
||||
}}
|
203
boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
Normal file
203
boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
Normal file
|
@ -0,0 +1,203 @@
|
|||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/list/list50_c.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
>
|
||||
struct list41_c
|
||||
: l_item<
|
||||
long_<41>
|
||||
, integral_c< T,C0 >
|
||||
, list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 >
|
||||
>
|
||||
{
|
||||
typedef list41_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41
|
||||
>
|
||||
struct list42_c
|
||||
: l_item<
|
||||
long_<42>
|
||||
, integral_c< T,C0 >
|
||||
, list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 >
|
||||
>
|
||||
{
|
||||
typedef list42_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42
|
||||
>
|
||||
struct list43_c
|
||||
: l_item<
|
||||
long_<43>
|
||||
, integral_c< T,C0 >
|
||||
, list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 >
|
||||
>
|
||||
{
|
||||
typedef list43_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42, T C43
|
||||
>
|
||||
struct list44_c
|
||||
: l_item<
|
||||
long_<44>
|
||||
, integral_c< T,C0 >
|
||||
, list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 >
|
||||
>
|
||||
{
|
||||
typedef list44_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42, T C43, T C44
|
||||
>
|
||||
struct list45_c
|
||||
: l_item<
|
||||
long_<45>
|
||||
, integral_c< T,C0 >
|
||||
, list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 >
|
||||
>
|
||||
{
|
||||
typedef list45_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42, T C43, T C44, T C45
|
||||
>
|
||||
struct list46_c
|
||||
: l_item<
|
||||
long_<46>
|
||||
, integral_c< T,C0 >
|
||||
, list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 >
|
||||
>
|
||||
{
|
||||
typedef list46_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42, T C43, T C44, T C45, T C46
|
||||
>
|
||||
struct list47_c
|
||||
: l_item<
|
||||
long_<47>
|
||||
, integral_c< T,C0 >
|
||||
, list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 >
|
||||
>
|
||||
{
|
||||
typedef list47_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42, T C43, T C44, T C45, T C46, T C47
|
||||
>
|
||||
struct list48_c
|
||||
: l_item<
|
||||
long_<48>
|
||||
, integral_c< T,C0 >
|
||||
, list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 >
|
||||
>
|
||||
{
|
||||
typedef list48_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
|
||||
>
|
||||
struct list49_c
|
||||
: l_item<
|
||||
long_<49>
|
||||
, integral_c< T,C0 >
|
||||
, list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 >
|
||||
>
|
||||
{
|
||||
typedef list49_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
|
||||
, T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
|
||||
, T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
|
||||
>
|
||||
struct list50_c
|
||||
: l_item<
|
||||
long_<50>
|
||||
, integral_c< T,C0 >
|
||||
, list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 >
|
||||
>
|
||||
{
|
||||
typedef list50_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
36
boost/mpl/list/aux_/push_back.hpp
Normal file
36
boost/mpl/list/aux_/push_back.hpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/push_back_fwd.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Tag > struct has_push_back_impl;
|
||||
|
||||
template<>
|
||||
struct has_push_back_impl< aux::list_tag >
|
||||
{
|
||||
template< typename Seq > struct apply
|
||||
: false_
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
|
39
boost/mpl/list/aux_/push_front.hpp
Normal file
39
boost/mpl/list/aux_/push_front.hpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/push_front_fwd.hpp>
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/list/aux_/item.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct push_front_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List, typename T > struct apply
|
||||
{
|
||||
typedef l_item<
|
||||
typename next<typename List::size>::type
|
||||
, T
|
||||
, typename List::type
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
|
33
boost/mpl/list/aux_/size.hpp
Normal file
33
boost/mpl/list/aux_/size.hpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/size_fwd.hpp>
|
||||
#include <boost/mpl/list/aux_/tag.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct size_impl< aux::list_tag >
|
||||
{
|
||||
template< typename List > struct apply
|
||||
: List::size
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
|
24
boost/mpl/list/aux_/tag.hpp
Normal file
24
boost/mpl/list/aux_/tag.hpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
struct list_tag;
|
||||
struct l_iter_tag;
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
|
42
boost/mpl/list/list0.hpp
Normal file
42
boost/mpl/list/list0.hpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST0_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/long.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/list/aux_/push_front.hpp>
|
||||
#include <boost/mpl/list/aux_/pop_front.hpp>
|
||||
#include <boost/mpl/list/aux_/push_back.hpp>
|
||||
#include <boost/mpl/list/aux_/front.hpp>
|
||||
#include <boost/mpl/list/aux_/clear.hpp>
|
||||
#include <boost/mpl/list/aux_/O1_size.hpp>
|
||||
#include <boost/mpl/list/aux_/size.hpp>
|
||||
#include <boost/mpl/list/aux_/empty.hpp>
|
||||
#include <boost/mpl/list/aux_/begin_end.hpp>
|
||||
#include <boost/mpl/list/aux_/item.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Dummy = na > struct list0;
|
||||
|
||||
template<> struct list0<na>
|
||||
: l_end
|
||||
{
|
||||
typedef l_end type;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED
|
31
boost/mpl/list/list0_c.hpp
Normal file
31
boost/mpl/list/list0_c.hpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/list/list0.hpp>
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename T > struct list0_c
|
||||
: l_end
|
||||
{
|
||||
typedef l_end type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
|
43
boost/mpl/list/list10.hpp
Normal file
43
boost/mpl/list/list10.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST10_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list0.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list10.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(1, 10, <boost/mpl/list/aux_/numbered.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED
|
43
boost/mpl/list/list10_c.hpp
Normal file
43
boost/mpl/list/list10_c.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list0_c.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(1, 10, <boost/mpl/list/aux_/numbered_c.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
|
43
boost/mpl/list/list20.hpp
Normal file
43
boost/mpl/list/list20.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST20_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list10.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list20.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(11, 20, <boost/mpl/list/aux_/numbered.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED
|
43
boost/mpl/list/list20_c.hpp
Normal file
43
boost/mpl/list/list20_c.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list10_c.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(11, 20, <boost/mpl/list/aux_/numbered_c.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
|
43
boost/mpl/list/list30.hpp
Normal file
43
boost/mpl/list/list30.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST30_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list20.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list30.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(21, 30, <boost/mpl/list/aux_/numbered.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED
|
43
boost/mpl/list/list30_c.hpp
Normal file
43
boost/mpl/list/list30_c.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list20_c.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(21, 30, <boost/mpl/list/aux_/numbered_c.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
|
43
boost/mpl/list/list40.hpp
Normal file
43
boost/mpl/list/list40.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST40_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list30.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list40.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(31, 40, <boost/mpl/list/aux_/numbered.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED
|
43
boost/mpl/list/list40_c.hpp
Normal file
43
boost/mpl/list/list40_c.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list30_c.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(31, 40, <boost/mpl/list/aux_/numbered_c.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
|
43
boost/mpl/list/list50.hpp
Normal file
43
boost/mpl/list/list50.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST50_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list40.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list50.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(41, 50, <boost/mpl/list/aux_/numbered.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED
|
43
boost/mpl/list/list50_c.hpp
Normal file
43
boost/mpl/list/list50_c.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
|
||||
#ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
|
||||
#define BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/list/list40_c.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp
|
||||
# include <boost/mpl/list/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(41, 50, <boost/mpl/list/aux_/numbered_c.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
#endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
|
72
boost/mpl/max_element.hpp
Normal file
72
boost/mpl/max_element.hpp
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
#ifndef BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
|
||||
#define BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/less.hpp>
|
||||
#include <boost/mpl/iter_fold.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/aux_/common_name_wknd.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_COMMON_NAME_WKND(max_element)
|
||||
|
||||
namespace aux {
|
||||
|
||||
template< typename Predicate >
|
||||
struct select_max
|
||||
{
|
||||
template< typename OldIterator, typename Iterator >
|
||||
struct apply
|
||||
{
|
||||
typedef typename apply2<
|
||||
Predicate
|
||||
, typename deref<OldIterator>::type
|
||||
, typename deref<Iterator>::type
|
||||
>::type condition_;
|
||||
|
||||
typedef typename if_<
|
||||
condition_
|
||||
, Iterator
|
||||
, OldIterator
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
, typename Predicate = less<_,_>
|
||||
>
|
||||
struct max_element
|
||||
: iter_fold<
|
||||
Sequence
|
||||
, typename begin<Sequence>::type
|
||||
, protect< aux::select_max<Predicate> >
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(1, max_element)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED
|
46
boost/mpl/min_max.hpp
Normal file
46
boost/mpl/min_max.hpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
|
||||
#ifndef BOOST_MPL_MIN_MAX_HPP_INCLUDED
|
||||
#define BOOST_MPL_MIN_MAX_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2008
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/less.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct min
|
||||
: if_< less<N1,N2>,N1,N2 >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct max
|
||||
: if_< less<N1,N2>,N2,N1 >
|
||||
{
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(2, min)
|
||||
BOOST_MPL_AUX_NA_SPEC(2, max)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_MIN_MAX_HPP_INCLUDED
|
169
boost/mpl/pair_view.hpp
Normal file
169
boost/mpl/pair_view.hpp
Normal file
|
@ -0,0 +1,169 @@
|
|||
|
||||
#ifndef BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
|
||||
#define BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
|
||||
|
||||
// Copyright David Abrahams 2003-2004
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/iterator_category.hpp>
|
||||
#include <boost/mpl/advance.hpp>
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/next_prior.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#include <boost/mpl/min_max.hpp>
|
||||
#include <boost/mpl/pair.hpp>
|
||||
#include <boost/mpl/iterator_tags.hpp>
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
struct pair_iter_tag;
|
||||
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template< typename Iter1, typename Iter2, typename Category >
|
||||
struct pair_iter;
|
||||
|
||||
template< typename Category > struct prior_pair_iter
|
||||
{
|
||||
template< typename Iter1, typename Iter2 > struct apply
|
||||
{
|
||||
typedef typename mpl::prior<Iter1>::type i1_;
|
||||
typedef typename mpl::prior<Iter2>::type i2_;
|
||||
typedef pair_iter<i1_,i2_,Category> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct prior_pair_iter<forward_iterator_tag>
|
||||
{
|
||||
template< typename Iter1, typename Iter2 > struct apply
|
||||
{
|
||||
typedef pair_iter<Iter1,Iter2,forward_iterator_tag> type;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
template<
|
||||
typename Iter1
|
||||
, typename Iter2
|
||||
, typename Category
|
||||
>
|
||||
struct pair_iter
|
||||
{
|
||||
typedef aux::pair_iter_tag tag;
|
||||
typedef Category category;
|
||||
typedef Iter1 first;
|
||||
typedef Iter2 second;
|
||||
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
typedef pair<
|
||||
typename deref<Iter1>::type
|
||||
, typename deref<Iter2>::type
|
||||
> type;
|
||||
|
||||
typedef typename mpl::next<Iter1>::type i1_;
|
||||
typedef typename mpl::next<Iter2>::type i2_;
|
||||
typedef pair_iter<i1_,i2_,Category> next;
|
||||
|
||||
typedef apply_wrap2< aux::prior_pair_iter<Category>,Iter1,Iter2 >::type prior;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template< typename Iter1, typename Iter2, typename C >
|
||||
struct deref< pair_iter<Iter1,Iter2,C> >
|
||||
{
|
||||
typedef pair<
|
||||
typename deref<Iter1>::type
|
||||
, typename deref<Iter2>::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template< typename Iter1, typename Iter2, typename C >
|
||||
struct next< pair_iter<Iter1,Iter2,C> >
|
||||
{
|
||||
typedef typename mpl::next<Iter1>::type i1_;
|
||||
typedef typename mpl::next<Iter2>::type i2_;
|
||||
typedef pair_iter<i1_,i2_,C> type;
|
||||
};
|
||||
|
||||
template< typename Iter1, typename Iter2, typename C >
|
||||
struct prior< pair_iter<Iter1,Iter2,C> >
|
||||
{
|
||||
typedef typename mpl::prior<Iter1>::type i1_;
|
||||
typedef typename mpl::prior<Iter2>::type i2_;
|
||||
typedef pair_iter<i1_,i2_,C> type;
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
|
||||
template<> struct advance_impl<aux::pair_iter_tag>
|
||||
{
|
||||
template< typename Iter, typename D > struct apply
|
||||
{
|
||||
typedef typename mpl::advance< typename Iter::first,D >::type i1_;
|
||||
typedef typename mpl::advance< typename Iter::second,D >::type i2_;
|
||||
typedef pair_iter<i1_,i2_,typename Iter::category> type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct distance_impl<aux::pair_iter_tag>
|
||||
{
|
||||
template< typename Iter1, typename Iter2 > struct apply
|
||||
{
|
||||
// agurt, 10/nov/04: MSVC 6.5 ICE-s on forwarding
|
||||
typedef typename mpl::distance<
|
||||
typename first<Iter1>::type
|
||||
, typename first<Iter2>::type
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
|
||||
>
|
||||
struct pair_view
|
||||
{
|
||||
typedef nested_begin_end_tag tag;
|
||||
|
||||
typedef typename begin<Sequence1>::type iter1_;
|
||||
typedef typename begin<Sequence2>::type iter2_;
|
||||
typedef typename min<
|
||||
typename iterator_category<iter1_>::type
|
||||
, typename iterator_category<iter2_>::type
|
||||
>::type category_;
|
||||
|
||||
typedef pair_iter<iter1_,iter2_,category_> begin;
|
||||
|
||||
typedef pair_iter<
|
||||
typename end<Sequence1>::type
|
||||
, typename end<Sequence2>::type
|
||||
, category_
|
||||
> end;
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(2, pair_view)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_PAIR_VIEW_HPP_INCLUDED
|
36
boost/mpl/sizeof.hpp
Normal file
36
boost/mpl/sizeof.hpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED
|
||||
#define BOOST_MPL_SIZEOF_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2003
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/size_t.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||
>
|
||||
struct sizeof_
|
||||
: mpl::size_t< sizeof(T) >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,sizeof_,(T))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, sizeof_)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_SIZEOF_HPP_INCLUDED
|
145
boost/mpl/transform.hpp
Normal file
145
boost/mpl/transform.hpp
Normal file
|
@ -0,0 +1,145 @@
|
|||
|
||||
#ifndef BOOST_MPL_TRANSFORM_HPP_INCLUDED
|
||||
#define BOOST_MPL_TRANSFORM_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright David Abrahams 2003-2004
|
||||
//
|
||||
// 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$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/fold.hpp>
|
||||
#include <boost/mpl/reverse_fold.hpp>
|
||||
#include <boost/mpl/pair_view.hpp>
|
||||
#include <boost/mpl/is_sequence.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/lambda.hpp>
|
||||
#include <boost/mpl/bind.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/inserter_algorithm.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename Seq
|
||||
, typename Op
|
||||
, typename In
|
||||
>
|
||||
struct transform1_impl
|
||||
: fold<
|
||||
Seq
|
||||
, typename In::state
|
||||
, bind2< typename lambda< typename In::operation >::type
|
||||
, _1
|
||||
, bind1< typename lambda<Op>::type, _2>
|
||||
>
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename Seq
|
||||
, typename Op
|
||||
, typename In
|
||||
>
|
||||
struct reverse_transform1_impl
|
||||
: reverse_fold<
|
||||
Seq
|
||||
, typename In::state
|
||||
, bind2< typename lambda< typename In::operation >::type
|
||||
, _1
|
||||
, bind1< typename lambda<Op>::type, _2>
|
||||
>
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename Seq1
|
||||
, typename Seq2
|
||||
, typename Op
|
||||
, typename In
|
||||
>
|
||||
struct transform2_impl
|
||||
: fold<
|
||||
pair_view<Seq1,Seq2>
|
||||
, typename In::state
|
||||
, bind2< typename lambda< typename In::operation >::type
|
||||
, _1
|
||||
, bind2<
|
||||
typename lambda<Op>::type
|
||||
, bind1<first<>,_2>
|
||||
, bind1<second<>,_2>
|
||||
>
|
||||
>
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename Seq1
|
||||
, typename Seq2
|
||||
, typename Op
|
||||
, typename In
|
||||
>
|
||||
struct reverse_transform2_impl
|
||||
: reverse_fold<
|
||||
pair_view<Seq1,Seq2>
|
||||
, typename In::state
|
||||
, bind2< typename lambda< typename In::operation >::type
|
||||
, _1
|
||||
, bind2< typename lambda< Op >::type
|
||||
, bind1<first<>,_2>
|
||||
, bind1<second<>,_2>
|
||||
>
|
||||
>
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, transform1)
|
||||
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, transform2)
|
||||
|
||||
#define AUX778076_TRANSFORM_DEF(name) \
|
||||
template< \
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Seq1) \
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Seq2OrOperation) \
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(OperationOrInserter) \
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Inserter) \
|
||||
> \
|
||||
struct name \
|
||||
{ \
|
||||
typedef typename eval_if< \
|
||||
or_< \
|
||||
is_na<OperationOrInserter> \
|
||||
, is_lambda_expression< Seq2OrOperation > \
|
||||
, not_< is_sequence<Seq2OrOperation> > \
|
||||
> \
|
||||
, name##1<Seq1,Seq2OrOperation,OperationOrInserter> \
|
||||
, name##2<Seq1,Seq2OrOperation,OperationOrInserter,Inserter> \
|
||||
>::type type; \
|
||||
}; \
|
||||
BOOST_MPL_AUX_NA_SPEC(4, name) \
|
||||
/**/
|
||||
|
||||
AUX778076_TRANSFORM_DEF(transform)
|
||||
AUX778076_TRANSFORM_DEF(reverse_transform)
|
||||
|
||||
#undef AUX778076_TRANSFORM_DEF
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_TRANSFORM_HPP_INCLUDED
|
265
boost/type_index.hpp
Normal file
265
boost/type_index.hpp
Normal file
|
@ -0,0 +1,265 @@
|
|||
//
|
||||
// Copyright (c) Antony Polukhin, 2012-2014.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef BOOST_TYPE_INDEX_HPP
|
||||
#define BOOST_TYPE_INDEX_HPP
|
||||
|
||||
/// \file boost/type_index.hpp
|
||||
/// \brief Includes minimal set of headers required to use the Boost.TypeIndex library.
|
||||
///
|
||||
/// By inclusion of this file most optimal type index classes will be included and used
|
||||
/// as a boost::typeindex::type_index and boost::typeindex::type_info.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
|
||||
# include BOOST_TYPE_INDEX_USER_TYPEINDEX
|
||||
# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||
# pragma detect_mismatch( "boost__type_index__abi", "user defined type_index class is used: " BOOST_STRINGIZE(BOOST_TYPE_INDEX_USER_TYPEINDEX))
|
||||
# endif
|
||||
#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
|
||||
# include <boost/type_index/stl_type_index.hpp>
|
||||
# ifdef BOOST_NO_RTTI
|
||||
# include <boost/type_index/detail/stl_register_class.hpp>
|
||||
# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||
# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - typeid() is used only for templates")
|
||||
# endif
|
||||
# else
|
||||
# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||
# pragma detect_mismatch( "boost__type_index__abi", "RTTI is used")
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# include <boost/type_index/ctti_type_index.hpp>
|
||||
# include <boost/type_index/detail/ctti_register_class.hpp>
|
||||
# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||
# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - using CTTI")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_TYPE_INDEX_REGISTER_CLASS
|
||||
#define BOOST_TYPE_INDEX_REGISTER_CLASS
|
||||
#endif
|
||||
|
||||
namespace boost { namespace typeindex {
|
||||
|
||||
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
|
||||
|
||||
/// \def BOOST_TYPE_INDEX_FUNCTION_SIGNATURE
|
||||
/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is used by boost::typeindex::ctti_type_index class to
|
||||
/// deduce the name of a type. If your compiler is not recognized
|
||||
/// by the TypeIndex library and you wish to work with boost::typeindex::ctti_type_index, you may
|
||||
/// define this macro by yourself.
|
||||
///
|
||||
/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE must be defined to a compiler specific macro
|
||||
/// that outputs the \b whole function signature \b including \b template \b parameters.
|
||||
///
|
||||
/// If your compiler is not recognised and BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is not defined,
|
||||
/// then a compile-time error will arise at any attempt to use boost::typeindex::ctti_type_index classes.
|
||||
///
|
||||
/// See BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS and BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING
|
||||
/// for an information of how to tune the implementation to make a nice pretty_name() output.
|
||||
#define BOOST_TYPE_INDEX_FUNCTION_SIGNATURE BOOST_CURRENT_FUNCTION
|
||||
|
||||
/// \def BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING
|
||||
/// This is a helper macro for making correct pretty_names() with RTTI off.
|
||||
///
|
||||
/// BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING macro may be defined to
|
||||
/// '(begin_skip, end_skip, runtime_skip, runtime_skip_until)' with parameters for adding a
|
||||
/// support for compilers, that by default are not recognized by TypeIndex library.
|
||||
///
|
||||
/// \b Example:
|
||||
///
|
||||
/// Imagine the situation when
|
||||
/// \code boost::typeindex::ctti_type_index::type_id<int>().pretty_name() \endcode
|
||||
/// returns the following string:
|
||||
/// \code "static const char *boost::detail::ctti<int>::n() [T = int]" \endcode
|
||||
/// and \code boost::typeindex::ctti_type_index::type_id<short>().pretty_name() \endcode returns the following:
|
||||
/// \code "static const char *boost::detail::ctti<short>::n() [T = short]" \endcode
|
||||
///
|
||||
/// As we may see first 39 characters are "static const char *boost::detail::ctti<" and they do not depend on
|
||||
/// the type T. After first 39 characters we have a human readable type name which is duplicated at the end
|
||||
/// of a string. String always ends on ']', which consumes 1 character.
|
||||
///
|
||||
/// Now if we define `BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING` to
|
||||
/// `(39, 1, false, "")` we'll be getting \code "int>::n() [T = int" \endcode
|
||||
/// for `boost::typeindex::ctti_type_index::type_id<int>().pretty_name()` and \code "short>::n() [T = short" \endcode
|
||||
/// for `boost::typeindex::ctti_type_index::type_id<short>().pretty_name()`.
|
||||
///
|
||||
/// Now we need to take additional care of the characters that go before the last mention of our type. We'll
|
||||
/// do that by telling the macro that we need to cut off everything that goes before the "T = " including the "T = "
|
||||
/// itself:
|
||||
///
|
||||
/// \code (39, 1, true, "T = ") \endcode
|
||||
///
|
||||
/// In case of GCC or Clang command line we need to add the following line while compiling all the sources:
|
||||
///
|
||||
/// \code
|
||||
/// -DBOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING='(39, 1, true, "T = ")'
|
||||
/// \endcode
|
||||
/// \param begin_skip How many characters must be skipped at the beginning of the type holding string.
|
||||
/// Must be a compile time constant.
|
||||
/// \param end_skip How many characters must be skipped at the end of the type holding string.
|
||||
/// Must be a compile time constant.
|
||||
/// \param runtime_skip Do we need additional checks at runtime to cut off the more characters.
|
||||
/// Must be `true` or `false`.
|
||||
/// \param runtime_skip_until Skip all the characters before the following string (including the string itself).
|
||||
/// Must be a compile time array of characters.
|
||||
///
|
||||
/// See [RTTI emulation limitations](boost_typeindex/rtti_emulation_limitations.html) for more info.
|
||||
#define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (0, 0, false, "")
|
||||
|
||||
|
||||
/// Depending on a compiler flags, optimal implementation of type_index will be used
|
||||
/// as a default boost::typeindex::type_index.
|
||||
///
|
||||
/// Could be a boost::typeindex::stl_type_index, boost::typeindex::ctti_type_index or
|
||||
/// user defined type_index class.
|
||||
///
|
||||
/// \b See boost::typeindex::type_index_facade for a full description of type_index functions.
|
||||
typedef platform_specific type_index;
|
||||
#elif defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
|
||||
// Nothing to do
|
||||
#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
|
||||
typedef boost::typeindex::stl_type_index type_index;
|
||||
#else
|
||||
typedef boost::typeindex::ctti_type_index type_index;
|
||||
#endif
|
||||
|
||||
/// Depending on a compiler flags, optimal implementation of type_info will be used
|
||||
/// as a default boost::typeindex::type_info.
|
||||
///
|
||||
/// Could be a std::type_info, boost::typeindex::detail::ctti_data or
|
||||
/// some user defined class.
|
||||
///
|
||||
/// type_info \b is \b not copyable or default constructible. It is \b not assignable too!
|
||||
typedef type_index::type_info_t type_info;
|
||||
|
||||
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
|
||||
|
||||
/// \def BOOST_TYPE_INDEX_USER_TYPEINDEX
|
||||
/// BOOST_TYPE_INDEX_USER_TYPEINDEX can be defined to the path to header file
|
||||
/// with user provided implementation of type_index.
|
||||
///
|
||||
/// See [Making a custom type_index](boost_typeindex/making_a_custom_type_index.html) section
|
||||
/// of documentation for usage example.
|
||||
#define BOOST_TYPE_INDEX_USER_TYPEINDEX <full/absolute/path/to/header/with/type_index.hpp>
|
||||
|
||||
|
||||
/// \def BOOST_TYPE_INDEX_REGISTER_CLASS
|
||||
/// BOOST_TYPE_INDEX_REGISTER_CLASS is used to help to emulate RTTI.
|
||||
/// Put this macro into the public section of polymorphic class to allow runtime type detection.
|
||||
///
|
||||
/// Depending on the typeid() availability this macro will expand to nothing or to virtual helper function
|
||||
/// `virtual const type_info& boost_type_info_type_id_runtime_() const noexcept`.
|
||||
///
|
||||
/// \b Example:
|
||||
/// \code
|
||||
/// class A {
|
||||
/// public:
|
||||
/// BOOST_TYPE_INDEX_REGISTER_CLASS
|
||||
/// virtual ~A(){}
|
||||
/// };
|
||||
///
|
||||
/// struct B: public A {
|
||||
/// BOOST_TYPE_INDEX_REGISTER_CLASS
|
||||
/// };
|
||||
///
|
||||
/// struct C: public B {
|
||||
/// BOOST_TYPE_INDEX_REGISTER_CLASS
|
||||
/// };
|
||||
///
|
||||
/// ...
|
||||
///
|
||||
/// C c1;
|
||||
/// A* pc1 = &c1;
|
||||
/// assert(boost::typeindex::type_id<C>() == boost::typeindex::type_id_runtime(*pc1));
|
||||
/// \endcode
|
||||
#define BOOST_TYPE_INDEX_REGISTER_CLASS nothing-or-some-virtual-functions
|
||||
|
||||
/// \def BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
|
||||
/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY is a helper macro that must be defined if mixing
|
||||
/// RTTI on/off modules. See
|
||||
/// [Mixing sources with RTTI on and RTTI off](boost_typeindex/mixing_sources_with_rtti_on_and_.html)
|
||||
/// section of documentation for more info.
|
||||
#define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
|
||||
|
||||
#endif // defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
|
||||
|
||||
|
||||
/// Function to get boost::typeindex::type_index for a type T.
|
||||
/// Removes const, volatile && and & modifiers from T.
|
||||
///
|
||||
/// \b Example:
|
||||
/// \code
|
||||
/// type_index ti = type_id<int&>();
|
||||
/// std::cout << ti.pretty_name(); // Outputs 'int'
|
||||
/// \endcode
|
||||
///
|
||||
/// \tparam T Type for which type_index must be created.
|
||||
/// \throw Nothing.
|
||||
/// \return boost::typeindex::type_index with information about the specified type T.
|
||||
template <class T>
|
||||
inline type_index type_id() BOOST_NOEXCEPT {
|
||||
return type_index::type_id<T>();
|
||||
}
|
||||
|
||||
/// Function for constructing boost::typeindex::type_index instance for type T.
|
||||
/// Does not remove const, volatile, & and && modifiers from T.
|
||||
///
|
||||
/// If T has no const, volatile, & and && modifiers, then returns exactly
|
||||
/// the same result as in case of calling `type_id<T>()`.
|
||||
///
|
||||
/// \b Example:
|
||||
/// \code
|
||||
/// type_index ti = type_id_with_cvr<int&>();
|
||||
/// std::cout << ti.pretty_name(); // Outputs 'int&'
|
||||
/// \endcode
|
||||
///
|
||||
/// \tparam T Type for which type_index must be created.
|
||||
/// \throw Nothing.
|
||||
/// \return boost::typeindex::type_index with information about the specified type T.
|
||||
template <class T>
|
||||
inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
|
||||
return type_index::type_id_with_cvr<T>();
|
||||
}
|
||||
|
||||
/// Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index.
|
||||
///
|
||||
/// Retunrs runtime information about specified type.
|
||||
///
|
||||
/// \b Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS.
|
||||
///
|
||||
/// \b Example:
|
||||
/// \code
|
||||
/// struct Base { virtual ~Base(){} };
|
||||
/// struct Derived: public Base {};
|
||||
/// ...
|
||||
/// Derived d;
|
||||
/// Base& b = d;
|
||||
/// type_index ti = type_id_runtime(b);
|
||||
/// std::cout << ti.pretty_name(); // Outputs 'Derived'
|
||||
/// \endcode
|
||||
///
|
||||
/// \param runtime_val Varaible which runtime type must be returned.
|
||||
/// \throw Nothing.
|
||||
/// \return boost::typeindex::type_index with information about the specified variable.
|
||||
template <class T>
|
||||
inline type_index type_id_runtime(const T& runtime_val) BOOST_NOEXCEPT {
|
||||
return type_index::type_id_runtime(runtime_val);
|
||||
}
|
||||
|
||||
}} // namespace boost::typeindex
|
||||
|
||||
|
||||
|
||||
#endif // BOOST_TYPE_INDEX_HPP
|
||||
|
273
boost/type_index/stl_type_index.hpp
Normal file
273
boost/type_index/stl_type_index.hpp
Normal file
|
@ -0,0 +1,273 @@
|
|||
//
|
||||
// Copyright (c) Antony Polukhin, 2013-2014.
|
||||
//
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
|
||||
#define BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
|
||||
|
||||
/// \file stl_type_index.hpp
|
||||
/// \brief Contains boost::typeindex::stl_type_index class.
|
||||
///
|
||||
/// boost::typeindex::stl_type_index class can be used as a drop-in replacement
|
||||
/// for std::type_index.
|
||||
///
|
||||
/// It is used in situations when RTTI is enabled or typeid() method is available.
|
||||
/// When typeid() is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro
|
||||
/// is defined boost::typeindex::ctti is usually used instead of boost::typeindex::stl_type_index.
|
||||
|
||||
#include <boost/type_index/type_index_facade.hpp>
|
||||
|
||||
// MSVC is capable of calling typeid(T) even when RTTI is off
|
||||
#if defined(BOOST_NO_RTTI) && !defined(BOOST_MSVC)
|
||||
#error "File boost/type_index/stl_type_index.ipp is not usable when typeid() is not available."
|
||||
#endif
|
||||
|
||||
#include <typeinfo>
|
||||
#include <cstring> // std::strcmp, std::strlen, std::strstr
|
||||
#include <stdexcept>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/core/demangle.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
#include <boost/type_traits/is_volatile.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/functional/hash_fwd.hpp>
|
||||
|
||||
#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
|
||||
|| (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
|
||||
# include <boost/type_traits/is_signed.hpp>
|
||||
# include <boost/type_traits/make_signed.hpp>
|
||||
# include <boost/mpl/identity.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost { namespace typeindex {
|
||||
|
||||
/// \class stl_type_index
|
||||
/// This class is a wrapper around std::type_info, that workarounds issues and provides
|
||||
/// much more rich interface. \b For \b description \b of \b functions \b see type_index_facade.
|
||||
///
|
||||
/// This class requires typeid() to work. For cases when RTTI is disabled see ctti_type_index.
|
||||
class stl_type_index
|
||||
: public type_index_facade<
|
||||
stl_type_index,
|
||||
#ifdef BOOST_NO_STD_TYPEINFO
|
||||
type_info
|
||||
#else
|
||||
std::type_info
|
||||
#endif
|
||||
>
|
||||
{
|
||||
public:
|
||||
#ifdef BOOST_NO_STD_TYPEINFO
|
||||
typedef type_info type_info_t;
|
||||
#else
|
||||
typedef std::type_info type_info_t;
|
||||
#endif
|
||||
|
||||
private:
|
||||
const type_info_t* data_;
|
||||
|
||||
public:
|
||||
inline stl_type_index() BOOST_NOEXCEPT
|
||||
: data_(&typeid(void))
|
||||
{}
|
||||
|
||||
inline stl_type_index(const type_info_t& data) BOOST_NOEXCEPT
|
||||
: data_(&data)
|
||||
{}
|
||||
|
||||
inline const type_info_t& type_info() const BOOST_NOEXCEPT;
|
||||
|
||||
inline const char* raw_name() const BOOST_NOEXCEPT;
|
||||
inline const char* name() const BOOST_NOEXCEPT;
|
||||
inline std::string pretty_name() const;
|
||||
|
||||
inline std::size_t hash_code() const BOOST_NOEXCEPT;
|
||||
inline bool equal(const stl_type_index& rhs) const BOOST_NOEXCEPT;
|
||||
inline bool before(const stl_type_index& rhs) const BOOST_NOEXCEPT;
|
||||
|
||||
template <class T>
|
||||
inline static stl_type_index type_id() BOOST_NOEXCEPT;
|
||||
|
||||
template <class T>
|
||||
inline static stl_type_index type_id_with_cvr() BOOST_NOEXCEPT;
|
||||
|
||||
template <class T>
|
||||
inline static stl_type_index type_id_runtime(const T& value) BOOST_NOEXCEPT;
|
||||
};
|
||||
|
||||
inline const stl_type_index::type_info_t& stl_type_index::type_info() const BOOST_NOEXCEPT {
|
||||
return *data_;
|
||||
}
|
||||
|
||||
|
||||
inline const char* stl_type_index::raw_name() const BOOST_NOEXCEPT {
|
||||
#ifdef _MSC_VER
|
||||
return data_->raw_name();
|
||||
#else
|
||||
return data_->name();
|
||||
#endif
|
||||
}
|
||||
|
||||
inline const char* stl_type_index::name() const BOOST_NOEXCEPT {
|
||||
return data_->name();
|
||||
}
|
||||
|
||||
inline std::string stl_type_index::pretty_name() const {
|
||||
static const char cvr_saver_name[] = "boost::typeindex::detail::cvr_saver<";
|
||||
static BOOST_CONSTEXPR_OR_CONST std::string::size_type cvr_saver_name_len = sizeof(cvr_saver_name) - 1;
|
||||
|
||||
// In case of MSVC demangle() is a no-op, and name() already returns demangled name.
|
||||
// In case of GCC and Clang (on non-Windows systems) name() returns mangled name and demangle() undecorates it.
|
||||
const boost::core::scoped_demangled_name demangled_name(data_->name());
|
||||
|
||||
const char* begin = demangled_name.get();
|
||||
if (!begin) {
|
||||
boost::throw_exception(std::runtime_error("Type name demangling failed"));
|
||||
}
|
||||
|
||||
const std::string::size_type len = std::strlen(begin);
|
||||
const char* end = begin + len;
|
||||
|
||||
if (len > cvr_saver_name_len) {
|
||||
const char* b = std::strstr(begin, cvr_saver_name);
|
||||
if (b) {
|
||||
b += cvr_saver_name_len;
|
||||
|
||||
// Trim leading spaces
|
||||
while (*b == ' ') { // the string is zero terminated, we won't exceed the buffer size
|
||||
++ b;
|
||||
}
|
||||
|
||||
// Skip the closing angle bracket
|
||||
const char* e = end - 1;
|
||||
while (e > b && *e != '>') {
|
||||
-- e;
|
||||
}
|
||||
|
||||
// Trim trailing spaces
|
||||
while (e > b && *(e - 1) == ' ') {
|
||||
-- e;
|
||||
}
|
||||
|
||||
if (b < e) {
|
||||
// Parsing seems to have succeeded, the type name is not empty
|
||||
begin = b;
|
||||
end = e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return std::string(begin, end);
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT {
|
||||
#if _MSC_VER > 1600 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__))
|
||||
return data_->hash_code();
|
||||
#else
|
||||
return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/// @cond
|
||||
|
||||
// for this compiler at least, cross-shared-library type_info
|
||||
// comparisons don't work, so we are using typeid(x).name() instead.
|
||||
# if (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))) \
|
||||
|| defined(_AIX) \
|
||||
|| (defined(__sgi) && defined(__host_mips)) \
|
||||
|| (defined(__hpux) && defined(__HP_aCC)) \
|
||||
|| (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC))
|
||||
# define BOOST_CLASSINFO_COMPARE_BY_NAMES
|
||||
# endif
|
||||
|
||||
/// @endcond
|
||||
|
||||
inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEPT {
|
||||
#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES
|
||||
return raw_name() == rhs.raw_name() || !std::strcmp(raw_name(), rhs.raw_name());
|
||||
#else
|
||||
return *data_ == *rhs.data_;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCEPT {
|
||||
#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES
|
||||
return raw_name() != rhs.raw_name() && std::strcmp(raw_name(), rhs.raw_name()) < 0;
|
||||
#else
|
||||
return !!data_->before(*rhs.data_);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES
|
||||
#undef BOOST_CLASSINFO_COMPARE_BY_NAMES
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
template <class T>
|
||||
inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT {
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type no_ref_t;
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<no_ref_t>::type no_cvr_prefinal_t;
|
||||
|
||||
# if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
|
||||
|| (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
|
||||
|
||||
// Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral'
|
||||
// in typeid() expressions. Full template specialization for 'integral' fixes that issue:
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
|
||||
boost::is_signed<no_cvr_prefinal_t>,
|
||||
boost::make_signed<no_cvr_prefinal_t>,
|
||||
boost::mpl::identity<no_cvr_prefinal_t>
|
||||
>::type no_cvr_prefinal_lazy_t;
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME no_cvr_prefinal_t::type no_cvr_t;
|
||||
#else
|
||||
typedef no_cvr_prefinal_t no_cvr_t;
|
||||
#endif
|
||||
|
||||
return typeid(no_cvr_t);
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
template <class T> class cvr_saver{};
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
|
||||
boost::mpl::or_<boost::is_reference<T>, boost::is_const<T>, boost::is_volatile<T> >,
|
||||
detail::cvr_saver<T>,
|
||||
T
|
||||
>::type type;
|
||||
|
||||
return typeid(type);
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
inline stl_type_index stl_type_index::type_id_runtime(const T& value) BOOST_NOEXCEPT {
|
||||
#ifdef BOOST_NO_RTTI
|
||||
return value.boost_type_index_type_id_runtime_();
|
||||
#else
|
||||
return typeid(value);
|
||||
#endif
|
||||
}
|
||||
|
||||
}} // namespace boost::typeindex
|
||||
|
||||
#endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
|
296
boost/type_index/type_index_facade.hpp
Normal file
296
boost/type_index/type_index_facade.hpp
Normal file
|
@ -0,0 +1,296 @@
|
|||
//
|
||||
// Copyright (c) Antony Polukhin, 2013-2014.
|
||||
//
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP
|
||||
#define BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/functional/hash_fwd.hpp>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
#if !defined(BOOST_NO_IOSTREAM)
|
||||
#if !defined(BOOST_NO_IOSFWD)
|
||||
#include <iosfwd> // for std::basic_ostream
|
||||
#else
|
||||
#include <ostream>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
namespace boost { namespace typeindex {
|
||||
|
||||
/// \class type_index_facade
|
||||
///
|
||||
/// This class takes care about the comparison operators, hash functions and
|
||||
/// ostream operators. Use this class as a public base class for defining new
|
||||
/// type_info-conforming classes.
|
||||
///
|
||||
/// \b Example:
|
||||
/// \code
|
||||
/// class stl_type_index: public type_index_facade<stl_type_index, std::type_info>
|
||||
/// {
|
||||
/// public:
|
||||
/// typedef std::type_info type_info_t;
|
||||
/// private:
|
||||
/// const type_info_t* data_;
|
||||
///
|
||||
/// public:
|
||||
/// stl_type_index(const type_info_t& data) noexcept
|
||||
/// : data_(&data)
|
||||
/// {}
|
||||
/// // ...
|
||||
/// };
|
||||
/// \endcode
|
||||
///
|
||||
/// \tparam Derived Class derived from type_index_facade.
|
||||
/// \tparam TypeInfo Class that will be used as a base type_info class.
|
||||
/// \note Take a look at the protected methods. They are \b not \b defined in type_index_facade.
|
||||
/// Protected member functions raw_name() \b must be defined in Derived class. All the other
|
||||
/// methods are mandatory.
|
||||
/// \see 'Making a custom type_index' section for more information about
|
||||
/// creating your own type_index using type_index_facade.
|
||||
template <class Derived, class TypeInfo>
|
||||
class type_index_facade {
|
||||
private:
|
||||
/// @cond
|
||||
const Derived & derived() const BOOST_NOEXCEPT {
|
||||
return *static_cast<Derived const*>(this);
|
||||
}
|
||||
/// @endcond
|
||||
public:
|
||||
typedef TypeInfo type_info_t;
|
||||
|
||||
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
|
||||
/// \return Name of a type. By default returns Derived::raw_name().
|
||||
inline const char* name() const BOOST_NOEXCEPT {
|
||||
return derived().raw_name();
|
||||
}
|
||||
|
||||
/// \b Override: This function \b may be redefined in Derived class. Overrides may throw.
|
||||
/// \return Human readable type name. By default returns Derived::name().
|
||||
inline std::string pretty_name() const {
|
||||
return derived().name();
|
||||
}
|
||||
|
||||
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
|
||||
/// \return True if two types are equal. By default compares types by raw_name().
|
||||
inline bool equal(const Derived& rhs) const BOOST_NOEXCEPT {
|
||||
const char* const left = derived().raw_name();
|
||||
const char* const right = rhs.raw_name();
|
||||
return left == right || !std::strcmp(left, right);
|
||||
}
|
||||
|
||||
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
|
||||
/// \return True if rhs is greater than this. By default compares types by raw_name().
|
||||
inline bool before(const Derived& rhs) const BOOST_NOEXCEPT {
|
||||
const char* const left = derived().raw_name();
|
||||
const char* const right = rhs.raw_name();
|
||||
return left != right && std::strcmp(left, right) < 0;
|
||||
}
|
||||
|
||||
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
|
||||
/// \return Hash code of a type. By default hashes types by raw_name().
|
||||
/// \note <boost/functional/hash.hpp> has to be included if this function is used.
|
||||
inline std::size_t hash_code() const BOOST_NOEXCEPT {
|
||||
const char* const name = derived().raw_name();
|
||||
return boost::hash_range(name, name + std::strlen(name));
|
||||
}
|
||||
|
||||
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
|
||||
protected:
|
||||
/// \b Override: This function \b must be redefined in Derived class. Overrides \b must not throw.
|
||||
/// \return Pointer to unredable/raw type name.
|
||||
inline const char* raw_name() const BOOST_NOEXCEPT;
|
||||
|
||||
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
|
||||
/// \return Const reference to underlying low level type_info_t.
|
||||
inline const type_info_t& type_info() const BOOST_NOEXCEPT;
|
||||
|
||||
/// This is a factory method that is used to create instances of Derived classes.
|
||||
/// boost::typeindex::type_id() will call this method, if Derived has same type as boost::typeindex::type_index.
|
||||
///
|
||||
/// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw.
|
||||
/// Overrides \b must remove const, volatile && and & modifiers from T.
|
||||
/// \tparam T Type for which type_index must be created.
|
||||
/// \return type_index for type T.
|
||||
template <class T>
|
||||
static Derived type_id() BOOST_NOEXCEPT;
|
||||
|
||||
/// This is a factory method that is used to create instances of Derived classes.
|
||||
/// boost::typeindex::type_id_with_cvr() will call this method, if Derived has same type as boost::typeindex::type_index.
|
||||
///
|
||||
/// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw.
|
||||
/// Overrides \b must \b not remove const, volatile && and & modifiers from T.
|
||||
/// \tparam T Type for which type_index must be created.
|
||||
/// \return type_index for type T.
|
||||
template <class T>
|
||||
static Derived type_id_with_cvr() BOOST_NOEXCEPT;
|
||||
|
||||
/// This is a factory method that is used to create instances of Derived classes.
|
||||
/// boost::typeindex::type_id_runtime(const T&) will call this method, if Derived has same type as boost::typeindex::type_index.
|
||||
///
|
||||
/// \b Override: This function \b may be redefined and made public in Derived class.
|
||||
/// \param variable Variable which runtime type will be stored in type_index.
|
||||
/// \return type_index with runtime type of variable.
|
||||
template <class T>
|
||||
static Derived type_id_runtime(const T& variable) BOOST_NOEXCEPT;
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/// @cond
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return static_cast<Derived const&>(lhs).equal(static_cast<Derived const&>(rhs));
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return rhs < lhs;
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return !(lhs > rhs);
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return !(lhs < rhs);
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
// ######################### COMPARISONS with Derived ############################ //
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator == (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return Derived(lhs) == rhs;
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator < (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return Derived(lhs) < rhs;
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator > (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return rhs < Derived(lhs);
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator <= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return !(Derived(lhs) > rhs);
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator >= (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return !(Derived(lhs) < rhs);
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator != (const TypeInfo& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
|
||||
return !(Derived(lhs) == rhs);
|
||||
}
|
||||
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
|
||||
return lhs == Derived(rhs);
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
|
||||
return lhs < Derived(rhs);
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
|
||||
return Derived(rhs) < lhs;
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
|
||||
return !(lhs > Derived(rhs));
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
|
||||
return !(lhs < Derived(rhs));
|
||||
}
|
||||
|
||||
template <class Derived, class TypeInfo>
|
||||
inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT {
|
||||
return !(lhs == Derived(rhs));
|
||||
}
|
||||
|
||||
// ######################### COMPARISONS with Derived END ############################ //
|
||||
|
||||
/// @endcond
|
||||
|
||||
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
|
||||
|
||||
/// noexcept comparison operators for type_index_facade classes.
|
||||
bool operator ==, !=, <, ... (const type_index_facade& lhs, const type_index_facade& rhs) noexcept;
|
||||
|
||||
/// noexcept comparison operators for type_index_facade and it's TypeInfo classes.
|
||||
bool operator ==, !=, <, ... (const type_index_facade& lhs, const TypeInfo& rhs) noexcept;
|
||||
|
||||
/// noexcept comparison operators for type_index_facade's TypeInfo and type_index_facade classes.
|
||||
bool operator ==, !=, <, ... (const TypeInfo& lhs, const type_index_facade& rhs) noexcept;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_IOSTREAM
|
||||
#ifdef BOOST_NO_TEMPLATED_IOSTREAMS
|
||||
/// @cond
|
||||
/// Ostream operator that will output demangled name
|
||||
template <class Derived, class TypeInfo>
|
||||
inline std::ostream& operator<<(std::ostream& ostr, const type_index_facade<Derived, TypeInfo>& ind) {
|
||||
ostr << static_cast<Derived const&>(ind).pretty_name();
|
||||
return ostr;
|
||||
}
|
||||
/// @endcond
|
||||
#else
|
||||
/// Ostream operator that will output demangled name.
|
||||
template <class CharT, class TriatT, class Derived, class TypeInfo>
|
||||
inline std::basic_ostream<CharT, TriatT>& operator<<(
|
||||
std::basic_ostream<CharT, TriatT>& ostr,
|
||||
const type_index_facade<Derived, TypeInfo>& ind)
|
||||
{
|
||||
ostr << static_cast<Derived const&>(ind).pretty_name();
|
||||
return ostr;
|
||||
}
|
||||
#endif // BOOST_NO_TEMPLATED_IOSTREAMS
|
||||
#endif // BOOST_NO_IOSTREAM
|
||||
|
||||
/// This free function is used by Boost's unordered containers.
|
||||
/// \note <boost/functional/hash.hpp> has to be included if this function is used.
|
||||
template <class Derived, class TypeInfo>
|
||||
inline std::size_t hash_value(const type_index_facade<Derived, TypeInfo>& lhs) BOOST_NOEXCEPT {
|
||||
return static_cast<Derived const&>(lhs).hash_code();
|
||||
}
|
||||
|
||||
}} // namespace boost::typeindex
|
||||
|
||||
#endif // BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP
|
||||
|
27
boost/variant.hpp
Normal file
27
boost/variant.hpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant.hpp header file
|
||||
// See http://www.boost.org/libs/variant for documentation.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman, Itay Maman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_HPP
|
||||
#define BOOST_VARIANT_HPP
|
||||
|
||||
// variant "main"
|
||||
#include "boost/variant/variant.hpp"
|
||||
#include "boost/variant/recursive_variant.hpp"
|
||||
#include "boost/variant/recursive_wrapper.hpp"
|
||||
|
||||
// common applications
|
||||
#include "boost/variant/get.hpp"
|
||||
#include "boost/variant/apply_visitor.hpp"
|
||||
#include "boost/variant/static_visitor.hpp"
|
||||
#include "boost/variant/visitor_ptr.hpp"
|
||||
|
||||
#endif // BOOST_VARIANT_HPP
|
20
boost/variant/apply_visitor.hpp
Normal file
20
boost/variant/apply_visitor.hpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/apply_visitor.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_APPLY_VISITOR_HPP
|
||||
#define BOOST_VARIANT_APPLY_VISITOR_HPP
|
||||
|
||||
#include "boost/variant/detail/apply_visitor_unary.hpp"
|
||||
#include "boost/variant/detail/apply_visitor_binary.hpp"
|
||||
#include "boost/variant/detail/apply_visitor_delayed.hpp"
|
||||
|
||||
#endif // BOOST_VARIANT_APPLY_VISITOR_HPP
|
41
boost/variant/bad_visit.hpp
Normal file
41
boost/variant/bad_visit.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/bad_visit.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_BAD_VISIT_HPP
|
||||
#define BOOST_VARIANT_BAD_VISIT_HPP
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// class bad_visit
|
||||
//
|
||||
// Exception thrown when a visitation attempt via apply_visitor fails due
|
||||
// to invalid visited subtype or contents.
|
||||
//
|
||||
struct bad_visit
|
||||
: std::exception
|
||||
{
|
||||
public: // std::exception interface
|
||||
|
||||
virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return "boost::bad_visit: "
|
||||
"failed visitation using boost::apply_visitor";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_BAD_VISIT_HPP
|
178
boost/variant/detail/apply_visitor_binary.hpp
Normal file
178
boost/variant/detail/apply_visitor_binary.hpp
Normal file
|
@ -0,0 +1,178 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/apply_visitor_binary.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
|
||||
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
#include "boost/variant/detail/generic_result_type.hpp"
|
||||
|
||||
#include "boost/variant/detail/apply_visitor_unary.hpp"
|
||||
|
||||
#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
|
||||
#include "boost/utility/enable_if.hpp"
|
||||
#include "boost/mpl/not.hpp"
|
||||
#include "boost/type_traits/is_const.hpp"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// function template apply_visitor(visitor, visitable1, visitable2)
|
||||
//
|
||||
// Visits visitable1 and visitable2 such that their values (which we
|
||||
// shall call x and y, respectively) are used as arguments in the
|
||||
// expression visitor(x, y).
|
||||
//
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
template <typename Visitor, typename Value1>
|
||||
class apply_visitor_binary_invoke
|
||||
{
|
||||
public: // visitor typedefs
|
||||
|
||||
typedef typename Visitor::result_type
|
||||
result_type;
|
||||
|
||||
private: // representation
|
||||
|
||||
Visitor& visitor_;
|
||||
Value1& value1_;
|
||||
|
||||
public: // structors
|
||||
|
||||
apply_visitor_binary_invoke(Visitor& visitor, Value1& value1) BOOST_NOEXCEPT
|
||||
: visitor_(visitor)
|
||||
, value1_(value1)
|
||||
{
|
||||
}
|
||||
|
||||
public: // visitor interfaces
|
||||
|
||||
template <typename Value2>
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
|
||||
operator()(Value2& value2)
|
||||
{
|
||||
return visitor_(value1_, value2);
|
||||
}
|
||||
|
||||
private:
|
||||
apply_visitor_binary_invoke& operator=(const apply_visitor_binary_invoke&);
|
||||
|
||||
};
|
||||
|
||||
template <typename Visitor, typename Visitable2>
|
||||
class apply_visitor_binary_unwrap
|
||||
{
|
||||
public: // visitor typedefs
|
||||
|
||||
typedef typename Visitor::result_type
|
||||
result_type;
|
||||
|
||||
private: // representation
|
||||
|
||||
Visitor& visitor_;
|
||||
Visitable2& visitable2_;
|
||||
|
||||
public: // structors
|
||||
|
||||
apply_visitor_binary_unwrap(Visitor& visitor, Visitable2& visitable2) BOOST_NOEXCEPT
|
||||
: visitor_(visitor)
|
||||
, visitable2_(visitable2)
|
||||
{
|
||||
}
|
||||
|
||||
public: // visitor interfaces
|
||||
|
||||
template <typename Value1>
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
|
||||
operator()(Value1& value1)
|
||||
{
|
||||
apply_visitor_binary_invoke<
|
||||
Visitor
|
||||
, Value1
|
||||
> invoker(visitor_, value1);
|
||||
|
||||
return boost::apply_visitor(invoker, visitable2_);
|
||||
}
|
||||
|
||||
private:
|
||||
apply_visitor_binary_unwrap& operator=(const apply_visitor_binary_unwrap&);
|
||||
|
||||
};
|
||||
|
||||
}} // namespace detail::variant
|
||||
|
||||
//
|
||||
// nonconst-visitor version:
|
||||
//
|
||||
|
||||
#if !BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
|
||||
|
||||
# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
|
||||
/**/
|
||||
|
||||
#else // EDG-based compilers
|
||||
|
||||
# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
|
||||
typename enable_if< \
|
||||
mpl::not_< is_const< V > > \
|
||||
, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
|
||||
>::type \
|
||||
/**/
|
||||
|
||||
#endif // EDG-based compilers workaround
|
||||
|
||||
template <typename Visitor, typename Visitable1, typename Visitable2>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(Visitor)
|
||||
apply_visitor(
|
||||
Visitor& visitor
|
||||
, Visitable1& visitable1, Visitable2& visitable2
|
||||
)
|
||||
{
|
||||
::boost::detail::variant::apply_visitor_binary_unwrap<
|
||||
Visitor, Visitable2
|
||||
> unwrapper(visitor, visitable2);
|
||||
|
||||
return boost::apply_visitor(unwrapper, visitable1);
|
||||
}
|
||||
|
||||
#undef BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE
|
||||
|
||||
//
|
||||
// const-visitor version:
|
||||
//
|
||||
|
||||
template <typename Visitor, typename Visitable1, typename Visitable2>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
|
||||
typename Visitor::result_type
|
||||
)
|
||||
apply_visitor(
|
||||
const Visitor& visitor
|
||||
, Visitable1& visitable1, Visitable2& visitable2
|
||||
)
|
||||
{
|
||||
::boost::detail::variant::apply_visitor_binary_unwrap<
|
||||
const Visitor, Visitable2
|
||||
> unwrapper(visitor, visitable2);
|
||||
|
||||
return boost::apply_visitor(unwrapper, visitable1);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
|
88
boost/variant/detail/apply_visitor_delayed.hpp
Normal file
88
boost/variant/detail/apply_visitor_delayed.hpp
Normal file
|
@ -0,0 +1,88 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/apply_visitor_delayed.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
|
||||
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
|
||||
|
||||
#include "boost/variant/detail/generic_result_type.hpp"
|
||||
|
||||
#include "boost/variant/detail/apply_visitor_unary.hpp"
|
||||
#include "boost/variant/detail/apply_visitor_binary.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// function template apply_visitor(visitor)
|
||||
//
|
||||
// Returns a function object, overloaded for unary and binary usage, that
|
||||
// visits its arguments using visitor (or a copy of visitor) via
|
||||
// * apply_visitor( visitor, [argument] )
|
||||
// under unary invocation, or
|
||||
// * apply_visitor( visitor, [argument1], [argument2] )
|
||||
// under binary invocation.
|
||||
//
|
||||
// NOTE: Unlike other apply_visitor forms, the visitor object must be
|
||||
// non-const; this prevents user from giving temporary, to disastrous
|
||||
// effect (i.e., returned function object would have dead reference).
|
||||
//
|
||||
|
||||
template <typename Visitor>
|
||||
class apply_visitor_delayed_t
|
||||
{
|
||||
public: // visitor typedefs
|
||||
|
||||
typedef typename Visitor::result_type
|
||||
result_type;
|
||||
|
||||
private: // representation
|
||||
|
||||
Visitor& visitor_;
|
||||
|
||||
public: // structors
|
||||
|
||||
explicit apply_visitor_delayed_t(Visitor& visitor) BOOST_NOEXCEPT
|
||||
: visitor_(visitor)
|
||||
{
|
||||
}
|
||||
|
||||
public: // unary visitor interface
|
||||
|
||||
template <typename Visitable>
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
|
||||
operator()(Visitable& visitable) const
|
||||
{
|
||||
return apply_visitor(visitor_, visitable);
|
||||
}
|
||||
|
||||
public: // binary visitor interface
|
||||
|
||||
template <typename Visitable1, typename Visitable2>
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
|
||||
operator()(Visitable1& visitable1, Visitable2& visitable2) const
|
||||
{
|
||||
return apply_visitor(visitor_, visitable1, visitable2);
|
||||
}
|
||||
|
||||
private:
|
||||
apply_visitor_delayed_t& operator=(const apply_visitor_delayed_t&);
|
||||
|
||||
};
|
||||
|
||||
template <typename Visitor>
|
||||
inline apply_visitor_delayed_t<Visitor> apply_visitor(Visitor& visitor)
|
||||
{
|
||||
return apply_visitor_delayed_t<Visitor>(visitor);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
|
79
boost/variant/detail/apply_visitor_unary.hpp
Normal file
79
boost/variant/detail/apply_visitor_unary.hpp
Normal file
|
@ -0,0 +1,79 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/apply_visitor_unary.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
|
||||
#define BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
#include "boost/variant/detail/generic_result_type.hpp"
|
||||
|
||||
#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
|
||||
#include "boost/utility/enable_if.hpp"
|
||||
#include "boost/mpl/not.hpp"
|
||||
#include "boost/type_traits/is_const.hpp"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// function template apply_visitor(visitor, visitable)
|
||||
//
|
||||
// Visits visitable with visitor.
|
||||
//
|
||||
|
||||
//
|
||||
// nonconst-visitor version:
|
||||
//
|
||||
|
||||
#if !BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
|
||||
|
||||
# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
|
||||
/**/
|
||||
|
||||
#else // EDG-based compilers
|
||||
|
||||
# define BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(V) \
|
||||
typename enable_if< \
|
||||
mpl::not_< is_const< V > > \
|
||||
, BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename V::result_type) \
|
||||
>::type \
|
||||
/**/
|
||||
|
||||
#endif // EDG-based compilers workaround
|
||||
|
||||
template <typename Visitor, typename Visitable>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE(Visitor)
|
||||
apply_visitor(Visitor& visitor, Visitable& visitable)
|
||||
{
|
||||
return visitable.apply_visitor(visitor);
|
||||
}
|
||||
|
||||
#undef BOOST_VARIANT_AUX_APPLY_VISITOR_NON_CONST_RESULT_TYPE
|
||||
|
||||
//
|
||||
// const-visitor version:
|
||||
//
|
||||
|
||||
template <typename Visitor, typename Visitable>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
|
||||
apply_visitor(const Visitor& visitor, Visitable& visitable)
|
||||
{
|
||||
return visitable.apply_visitor(visitor);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
|
95
boost/variant/detail/backup_holder.hpp
Normal file
95
boost/variant/detail/backup_holder.hpp
Normal file
|
@ -0,0 +1,95 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/backup_holder.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
|
||||
#define BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/assert.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
template <typename T>
|
||||
class backup_holder
|
||||
{
|
||||
private: // representation
|
||||
|
||||
T* backup_;
|
||||
|
||||
public: // structors
|
||||
|
||||
~backup_holder() BOOST_NOEXCEPT
|
||||
{
|
||||
delete backup_;
|
||||
}
|
||||
|
||||
explicit backup_holder(T* backup) BOOST_NOEXCEPT
|
||||
: backup_(backup)
|
||||
{
|
||||
}
|
||||
|
||||
backup_holder(const backup_holder&);
|
||||
|
||||
public: // modifiers
|
||||
|
||||
backup_holder& operator=(const backup_holder& rhs)
|
||||
{
|
||||
*backup_ = rhs.get();
|
||||
return *this;
|
||||
}
|
||||
|
||||
backup_holder& operator=(const T& rhs)
|
||||
{
|
||||
*backup_ = rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void swap(backup_holder& rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
T* tmp = rhs.backup_;
|
||||
rhs.backup_ = this->backup_;
|
||||
this->backup_ = tmp;
|
||||
}
|
||||
|
||||
public: // queries
|
||||
|
||||
T& get() BOOST_NOEXCEPT
|
||||
{
|
||||
return *backup_;
|
||||
}
|
||||
|
||||
const T& get() const BOOST_NOEXCEPT
|
||||
{
|
||||
return *backup_;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
backup_holder<T>::backup_holder(const backup_holder&)
|
||||
: backup_(0)
|
||||
{
|
||||
// not intended for copy, but do not want to prohibit syntactically
|
||||
BOOST_ASSERT(false);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void swap(backup_holder<T>& lhs, backup_holder<T>& rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
|
30
boost/variant/detail/bool_trait_def.hpp
Normal file
30
boost/variant/detail/bool_trait_def.hpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost/variant/detail/bool_trait_def.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// 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)
|
||||
|
||||
// Needed until move-related traits incorporated into type_traits library.
|
||||
// no include guards, the header is intended for multiple inclusion!
|
||||
|
||||
// should be the last #include
|
||||
#include "boost/type_traits/detail/bool_trait_def.hpp"
|
||||
|
||||
#define BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \
|
||||
template< typename T > struct trait \
|
||||
BOOST_TT_AUX_BOOL_C_BASE(C) \
|
||||
{ \
|
||||
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(arity, name) \
|
||||
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(arity, name) \
|
||||
/**/
|
21
boost/variant/detail/bool_trait_undef.hpp
Normal file
21
boost/variant/detail/bool_trait_undef.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost/variant/detail/bool_trait_undef.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// 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)
|
||||
|
||||
// Needed until move-related traits incorporated into type_traits library.
|
||||
// no include guards, the header is intended for multiple inclusion!
|
||||
|
||||
// should be the last #include
|
||||
#include "boost/type_traits/detail/bool_trait_undef.hpp"
|
||||
|
||||
|
||||
#undef BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1
|
||||
#undef BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX
|
42
boost/variant/detail/cast_storage.hpp
Normal file
42
boost/variant/detail/cast_storage.hpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/cast_storage.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP
|
||||
#define BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) function template cast_storage
|
||||
//
|
||||
// Casts the given storage to the specified type, but with qualification.
|
||||
//
|
||||
|
||||
template <typename T>
|
||||
inline T& cast_storage(void* storage)
|
||||
{
|
||||
return *static_cast<T*>(storage);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const T& cast_storage(const void* storage)
|
||||
{
|
||||
return *static_cast<const T*>(storage);
|
||||
}
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP
|
37
boost/variant/detail/config.hpp
Normal file
37
boost/variant/detail/config.hpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/config.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_CONFIG_HPP
|
||||
#define BOOST_VARIANT_DETAIL_CONFIG_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING
|
||||
//
|
||||
#if BOOST_WORKAROUND(__MWERKS__, <= 0x3201) \
|
||||
|| BOOST_WORKAROUND(BOOST_INTEL, <= 700) \
|
||||
&& !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING)
|
||||
# define BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND
|
||||
//
|
||||
#if !defined(BOOST_NO_SFINAE) \
|
||||
&& !BOOST_WORKAROUND(BOOST_INTEL, <= 700) \
|
||||
&& !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND)
|
||||
# define BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND
|
||||
#endif
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_CONFIG_HPP
|
133
boost/variant/detail/enable_recursive.hpp
Normal file
133
boost/variant/detail/enable_recursive.hpp
Normal file
|
@ -0,0 +1,133 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/enable_recursive.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_HPP
|
||||
#define BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_HPP
|
||||
|
||||
#include "boost/variant/detail/enable_recursive_fwd.hpp"
|
||||
#include "boost/variant/variant_fwd.hpp"
|
||||
|
||||
#if !defined(BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT)
|
||||
# include "boost/mpl/apply.hpp"
|
||||
# include "boost/mpl/eval_if.hpp"
|
||||
# include "boost/mpl/lambda.hpp"
|
||||
#endif
|
||||
|
||||
#include "boost/variant/detail/substitute.hpp"
|
||||
#include "boost/mpl/aux_/config/ctps.hpp"
|
||||
#include "boost/mpl/bool_fwd.hpp"
|
||||
#include "boost/mpl/if.hpp"
|
||||
#include "boost/mpl/or.hpp"
|
||||
#include "boost/type_traits/is_pointer.hpp"
|
||||
#include "boost/type_traits/is_reference.hpp"
|
||||
#include "boost/type_traits/is_same.hpp"
|
||||
|
||||
#include "boost/variant/recursive_wrapper.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
#if !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
# define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL(T,Dest,Source) \
|
||||
substitute< T , Dest , Source > \
|
||||
/**/
|
||||
|
||||
#else // defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) class template rebind1
|
||||
//
|
||||
// Limited workaround in case 'substitute' metafunction unavailable.
|
||||
//
|
||||
|
||||
template <typename T, typename U1>
|
||||
struct rebind1
|
||||
{
|
||||
private:
|
||||
typedef typename mpl::lambda<
|
||||
mpl::identity<T>
|
||||
>::type le_;
|
||||
|
||||
public:
|
||||
typedef typename mpl::eval_if<
|
||||
is_same< le_, mpl::identity<T> >
|
||||
, le_ // identity<T>
|
||||
, mpl::apply1<le_, U1>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
# define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL(T,Dest,Source) \
|
||||
rebind1< T , Dest > \
|
||||
/**/
|
||||
|
||||
#endif // !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction enable_recursive
|
||||
//
|
||||
// See boost/variant/detail/enable_recursive_fwd.hpp for more information.
|
||||
//
|
||||
|
||||
|
||||
template <typename T, typename RecursiveVariant, typename NoWrapper>
|
||||
struct enable_recursive
|
||||
: BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL(
|
||||
T, RecursiveVariant, ::boost::recursive_variant_
|
||||
)
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T, typename RecursiveVariant>
|
||||
struct enable_recursive< T,RecursiveVariant,mpl::false_ >
|
||||
{
|
||||
private: // helpers, for metafunction result (below)
|
||||
|
||||
typedef typename BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL(
|
||||
T, RecursiveVariant, ::boost::recursive_variant_
|
||||
)::type t_;
|
||||
|
||||
public: // metafunction result
|
||||
|
||||
// [Wrap with recursive_wrapper only if rebind really changed something:]
|
||||
typedef typename mpl::if_<
|
||||
mpl::or_<
|
||||
is_same< t_,T >
|
||||
, is_reference<t_>
|
||||
, is_pointer<t_>
|
||||
>
|
||||
, t_
|
||||
, boost::recursive_wrapper<t_>
|
||||
>::type type;
|
||||
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction class quoted_enable_recursive
|
||||
//
|
||||
// Same behavior as enable_recursive metafunction (see above).
|
||||
//
|
||||
template <typename RecursiveVariant, typename NoWrapper>
|
||||
struct quoted_enable_recursive
|
||||
{
|
||||
template <typename T>
|
||||
struct apply
|
||||
: enable_recursive<T, RecursiveVariant, NoWrapper>
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_HPP
|
87
boost/variant/detail/enable_recursive_fwd.hpp
Normal file
87
boost/variant/detail/enable_recursive_fwd.hpp
Normal file
|
@ -0,0 +1,87 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/enable_recursive_fwd.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
|
||||
#define BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
|
||||
|
||||
#include "boost/mpl/aux_/config/ctps.hpp"
|
||||
|
||||
#include "boost/mpl/bool_fwd.hpp"
|
||||
|
||||
# include "boost/mpl/bool.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) tag recursive_flag
|
||||
//
|
||||
// Signifies that the variant should perform recursive substituion.
|
||||
//
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct recursive_flag
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction is_recursive_flag
|
||||
//
|
||||
// Signifies that the variant should perform recursive substituion.
|
||||
//
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct is_recursive_flag
|
||||
: mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_recursive_flag< recursive_flag<T> >
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction enable_recursive
|
||||
//
|
||||
// Attempts recursive_variant_ tag substitution, wrapping with
|
||||
// boost::recursive_wrapper if substituion occurs w/ non-indirect result
|
||||
// (i.e., not a reference or pointer) *and* NoWrapper is false_.
|
||||
//
|
||||
template <
|
||||
typename T
|
||||
, typename RecursiveVariant
|
||||
, typename NoWrapper = mpl::false_
|
||||
>
|
||||
struct enable_recursive;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction class quoted_enable_recursive
|
||||
//
|
||||
// Same behavior as enable_recursive metafunction (see above).
|
||||
//
|
||||
template <
|
||||
typename RecursiveVariant
|
||||
, typename NoWrapper = mpl::false_
|
||||
>
|
||||
struct quoted_enable_recursive;
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
|
102
boost/variant/detail/forced_return.hpp
Normal file
102
boost/variant/detail/forced_return.hpp
Normal file
|
@ -0,0 +1,102 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/forced_return.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
|
||||
#define BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/variant/detail/generic_result_type.hpp"
|
||||
#include "boost/assert.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) function template forced_return
|
||||
//
|
||||
// Logical error to permit invocation at runtime, but (artificially) satisfies
|
||||
// compile-time requirement of returning a result value.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_MSVC) \
|
||||
&& !defined(BOOST_NO_VOID_RETURNS)
|
||||
|
||||
// "standard" implementation:
|
||||
|
||||
template <typename T>
|
||||
inline T forced_return()
|
||||
{
|
||||
// logical error: should never be here! (see above)
|
||||
BOOST_ASSERT(false);
|
||||
|
||||
T (*dummy_function_ptr)() = 0;
|
||||
return dummy_function_ptr();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void forced_return<void>()
|
||||
{
|
||||
// logical error: should never be here! (see above)
|
||||
BOOST_ASSERT(false);
|
||||
}
|
||||
|
||||
#elif !defined(BOOST_MSVC)
|
||||
|
||||
// workaround implementation
|
||||
//
|
||||
// TODO: Determine the most efficient way to handle this -- as below? by
|
||||
// throwing? by recursive call to forced_return itself? etc.
|
||||
//
|
||||
|
||||
template <typename T>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
|
||||
forced_return()
|
||||
{
|
||||
// logical error: should never be here! (see above)
|
||||
BOOST_ASSERT(false);
|
||||
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) (*dummy)() = 0;
|
||||
return dummy();
|
||||
}
|
||||
|
||||
#else // defined(BOOST_MSVC)
|
||||
|
||||
# pragma warning( push )
|
||||
# pragma warning( disable : 4702 ) // unreachable code
|
||||
// msvc-specific implementation
|
||||
//
|
||||
// Leverages __declspec(noreturn) for optimized implementation.
|
||||
//
|
||||
|
||||
__declspec(noreturn)
|
||||
inline void forced_return_no_return() {};
|
||||
|
||||
template <typename T>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
|
||||
forced_return()
|
||||
{
|
||||
// logical error: should never be here! (see above)
|
||||
BOOST_ASSERT(false);
|
||||
|
||||
forced_return_no_return();
|
||||
}
|
||||
|
||||
# pragma warning( pop )
|
||||
|
||||
#endif // BOOST_MSVC optimization
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
|
88
boost/variant/detail/generic_result_type.hpp
Normal file
88
boost/variant/detail/generic_result_type.hpp
Normal file
|
@ -0,0 +1,88 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/generic_result_type.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
|
||||
#define BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// (workaround) macro BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE
|
||||
//
|
||||
// On compilers with BOOST_NO_VOID_RETURNS, this macro provides a route
|
||||
// to a single syntax for dealing with template functions that may (but
|
||||
// not necessarily) return nothing (i.e. void).
|
||||
//
|
||||
// BOOST_VARIANT_AUX_RETURN_VOID provided for compilers w/ (erroneous?)
|
||||
// warnings about non-void functions not returning a value.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_NO_VOID_RETURNS)
|
||||
|
||||
#define BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) \
|
||||
T \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_AUX_RETURN_VOID \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_AUX_RETURN_VOID_TYPE \
|
||||
void \
|
||||
/**/
|
||||
|
||||
#else // defined(BOOST_NO_VOID_RETURNS)
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
struct fake_return_void
|
||||
{
|
||||
fake_return_void()
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
fake_return_void(const T&)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct no_void_returns_helper
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct no_void_returns_helper<void>
|
||||
{
|
||||
typedef fake_return_void type;
|
||||
};
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#define BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) \
|
||||
BOOST_DEDUCED_TYPENAME \
|
||||
::boost::detail::variant::no_void_returns_helper< T >::type \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_AUX_RETURN_VOID \
|
||||
return ::boost::detail::variant::fake_return_void() \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_AUX_RETURN_VOID_TYPE \
|
||||
::boost::detail::variant::fake_return_void
|
||||
|
||||
#endif // BOOST_NO_VOID_RETURNS workaround
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
|
47
boost/variant/detail/hash_variant.hpp
Normal file
47
boost/variant/detail/hash_variant.hpp
Normal file
|
@ -0,0 +1,47 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/hash_variant.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2011
|
||||
// Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
#ifndef BOOST_HASH_VARIANT_FUNCTION_HPP
|
||||
#define BOOST_HASH_VARIANT_FUNCTION_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/functional/hash_fwd.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail { namespace variant {
|
||||
struct variant_hasher: public boost::static_visitor<std::size_t> {
|
||||
template <class T>
|
||||
std::size_t operator()(T const& val) const {
|
||||
boost::hash<T> hasher;
|
||||
return hasher(val);
|
||||
}
|
||||
};
|
||||
}}
|
||||
|
||||
template < BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
std::size_t hash_value(variant< BOOST_VARIANT_ENUM_PARAMS(T) > const& val) {
|
||||
std::size_t seed = boost::apply_visitor(detail::variant::variant_hasher(), val);
|
||||
hash_combine(seed, val.which());
|
||||
return seed;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
249
boost/variant/detail/initializer.hpp
Normal file
249
boost/variant/detail/initializer.hpp
Normal file
|
@ -0,0 +1,249 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/initializer.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman, Itay Maman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_INITIALIZER_HPP
|
||||
#define BOOST_VARIANT_DETAIL_INITIALIZER_HPP
|
||||
|
||||
#include <new> // for placement new
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
#include "boost/call_traits.hpp"
|
||||
#include "boost/detail/reference_content.hpp"
|
||||
#include "boost/variant/recursive_wrapper_fwd.hpp"
|
||||
#include "boost/variant/detail/move.hpp"
|
||||
|
||||
#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
# include "boost/mpl/aux_/value_wknd.hpp"
|
||||
# include "boost/mpl/int.hpp"
|
||||
# include "boost/mpl/iter_fold.hpp"
|
||||
# include "boost/mpl/next.hpp"
|
||||
# include "boost/mpl/deref.hpp"
|
||||
# include "boost/mpl/pair.hpp"
|
||||
# include "boost/mpl/protect.hpp"
|
||||
#else
|
||||
# include "boost/variant/variant_fwd.hpp"
|
||||
# include "boost/preprocessor/cat.hpp"
|
||||
# include "boost/preprocessor/enum.hpp"
|
||||
# include "boost/preprocessor/repeat.hpp"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) support to simulate standard overload resolution rules
|
||||
//
|
||||
// The below initializers allows variant to follow standard overload
|
||||
// resolution rules over the specified set of bounded types.
|
||||
//
|
||||
// On compilers where using declarations in class templates can correctly
|
||||
// avoid name hiding, use an optimal solution based on the variant's typelist.
|
||||
//
|
||||
// Otherwise, use a preprocessor workaround based on knowledge of the fixed
|
||||
// size of the variant's psuedo-variadic template parameter list.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
|
||||
// (detail) quoted metafunction make_initializer_node
|
||||
//
|
||||
// Exposes a pair whose first type is a node in the initializer hierarchy.
|
||||
//
|
||||
struct make_initializer_node
|
||||
{
|
||||
template <typename BaseIndexPair, typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
private: // helpers, for metafunction result (below)
|
||||
|
||||
typedef typename BaseIndexPair::first
|
||||
base;
|
||||
typedef typename BaseIndexPair::second
|
||||
index;
|
||||
|
||||
class initializer_node
|
||||
: public base
|
||||
{
|
||||
private: // helpers, for static functions (below)
|
||||
|
||||
typedef typename mpl::deref<Iterator>::type
|
||||
recursive_enabled_T;
|
||||
typedef typename unwrap_recursive<recursive_enabled_T>::type
|
||||
public_T;
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
typedef boost::is_reference<public_T>
|
||||
is_reference_content_t;
|
||||
|
||||
typedef typename boost::mpl::if_<is_reference_content_t, public_T, const public_T& >::type
|
||||
param_T;
|
||||
|
||||
template <class T> struct disable_overload{};
|
||||
|
||||
typedef typename boost::mpl::if_<is_reference_content_t, disable_overload<public_T>, public_T&& >::type
|
||||
param2_T;
|
||||
#else
|
||||
typedef typename call_traits<public_T>::param_type
|
||||
param_T;
|
||||
#endif
|
||||
|
||||
public: // static functions
|
||||
|
||||
using base::initialize;
|
||||
|
||||
static int initialize(void* dest, param_T operand)
|
||||
{
|
||||
typedef typename boost::detail::make_reference_content<
|
||||
recursive_enabled_T
|
||||
>::type internal_T;
|
||||
|
||||
new(dest) internal_T(operand);
|
||||
return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
static int initialize(void* dest, param2_T operand)
|
||||
{
|
||||
// This assert must newer trigger, because all the reference contents are
|
||||
// handled by the initilize(void* dest, param_T operand) function above
|
||||
BOOST_ASSERT(!is_reference_content_t::value);
|
||||
|
||||
typedef typename boost::mpl::if_<is_reference_content_t, param2_T, recursive_enabled_T>::type value_T;
|
||||
new(dest) value_T( boost::detail::variant::move(operand) );
|
||||
return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
friend class initializer_node;
|
||||
|
||||
public: // metafunction result
|
||||
|
||||
typedef mpl::pair<
|
||||
initializer_node
|
||||
, typename mpl::next< index >::type
|
||||
> type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
// (detail) class initializer_root
|
||||
//
|
||||
// Every level of the initializer hierarchy must expose the name
|
||||
// "initialize," so initializer_root provides a dummy function:
|
||||
//
|
||||
class initializer_root
|
||||
{
|
||||
public: // static functions
|
||||
|
||||
static void initialize();
|
||||
|
||||
};
|
||||
|
||||
#else // defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
|
||||
// Obsolete. Remove.
|
||||
#define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_PARAMS \
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename recursive_enabled_T) \
|
||||
/**/
|
||||
|
||||
// Obsolete. Remove.
|
||||
#define BOOST_VARIANT_AUX_PP_INITIALIZER_DEFINE_PARAM_T(N) \
|
||||
typedef typename unwrap_recursive< \
|
||||
BOOST_PP_CAT(recursive_enabled_T,N) \
|
||||
>::type BOOST_PP_CAT(public_T,N); \
|
||||
typedef typename call_traits< \
|
||||
BOOST_PP_CAT(public_T,N) \
|
||||
>::param_type BOOST_PP_CAT(param_T,N); \
|
||||
/**/
|
||||
|
||||
template < BOOST_VARIANT_ENUM_PARAMS(typename recursive_enabled_T) >
|
||||
struct preprocessor_list_initializer
|
||||
{
|
||||
public: // static functions
|
||||
|
||||
#define BOOST_VARIANT_AUX_PP_INITIALIZE_FUNCTION(z,N,_) \
|
||||
typedef typename unwrap_recursive< \
|
||||
BOOST_PP_CAT(recursive_enabled_T,N) \
|
||||
>::type BOOST_PP_CAT(public_T,N); \
|
||||
typedef typename call_traits< \
|
||||
BOOST_PP_CAT(public_T,N) \
|
||||
>::param_type BOOST_PP_CAT(param_T,N); \
|
||||
static int initialize( \
|
||||
void* dest \
|
||||
, BOOST_PP_CAT(param_T,N) operand \
|
||||
) \
|
||||
{ \
|
||||
typedef typename boost::detail::make_reference_content< \
|
||||
BOOST_PP_CAT(recursive_enabled_T,N) \
|
||||
>::type internal_T; \
|
||||
\
|
||||
new(dest) internal_T(operand); \
|
||||
return (N); /*which*/ \
|
||||
} \
|
||||
/**/
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_VARIANT_LIMIT_TYPES
|
||||
, BOOST_VARIANT_AUX_PP_INITIALIZE_FUNCTION
|
||||
, _
|
||||
)
|
||||
|
||||
#undef BOOST_VARIANT_AUX_PP_INITIALIZE_FUNCTION
|
||||
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_AUX_INITIALIZER_T
|
||||
//
|
||||
// Given both the variant's typelist and a basename for forming the list of
|
||||
// bounded types (i.e., T becomes T1, T2, etc.), exposes the initializer
|
||||
// most appropriate to the current compiler.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
|
||||
#define BOOST_VARIANT_AUX_INITIALIZER_T( mpl_seq, typename_base ) \
|
||||
::boost::mpl::iter_fold< \
|
||||
mpl_seq \
|
||||
, ::boost::mpl::pair< \
|
||||
::boost::detail::variant::initializer_root \
|
||||
, ::boost::mpl::int_<0> \
|
||||
> \
|
||||
, ::boost::mpl::protect< \
|
||||
::boost::detail::variant::make_initializer_node \
|
||||
> \
|
||||
>::type::first \
|
||||
/**/
|
||||
|
||||
#else // defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
|
||||
// Obsolete. Remove.
|
||||
#define BOOST_VARIANT_AUX_PP_INITIALIZER_TEMPLATE_ARGS(typename_base) \
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename_base) \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_AUX_INITIALIZER_T( mpl_seq, typename_base ) \
|
||||
::boost::detail::variant::preprocessor_list_initializer< \
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename_base) \
|
||||
> \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_INITIALIZER_HPP
|
73
boost/variant/detail/make_variant_list.hpp
Normal file
73
boost/variant/detail/make_variant_list.hpp
Normal file
|
@ -0,0 +1,73 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/make_variant_list.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2013 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
|
||||
#define BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
|
||||
|
||||
#include "boost/variant/variant_fwd.hpp"
|
||||
|
||||
#include "boost/mpl/list.hpp"
|
||||
#include "boost/preprocessor/cat.hpp"
|
||||
#include "boost/preprocessor/enum.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction make_variant_list
|
||||
//
|
||||
// Provides a MPL-compatible sequence with the specified non-void types
|
||||
// as arguments.
|
||||
//
|
||||
// Rationale: see class template convert_void (variant_fwd.hpp) and using-
|
||||
// declaration workaround (below).
|
||||
//
|
||||
|
||||
#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
template < typename... T >
|
||||
struct make_variant_list
|
||||
{
|
||||
typedef typename mpl::list< T... >::type type;
|
||||
};
|
||||
|
||||
#else // defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
template < BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
struct make_variant_list
|
||||
{
|
||||
public: // metafunction result
|
||||
|
||||
// [Define a macro to convert any void(NN) tags to mpl::void...]
|
||||
# define BOOST_VARIANT_AUX_CONVERT_VOID(z, N,_) \
|
||||
typename convert_void< BOOST_PP_CAT(T,N) >::type
|
||||
|
||||
// [...so that the specified types can be passed to mpl::list...]
|
||||
typedef typename mpl::list<
|
||||
BOOST_PP_ENUM(
|
||||
BOOST_VARIANT_LIMIT_TYPES
|
||||
, BOOST_VARIANT_AUX_CONVERT_VOID
|
||||
, _
|
||||
)
|
||||
>::type type;
|
||||
|
||||
// [...and, finally, the conversion macro can be undefined:]
|
||||
# undef BOOST_VARIANT_AUX_CONVERT_VOID
|
||||
|
||||
};
|
||||
|
||||
#endif // BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES workaround
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
|
69
boost/variant/detail/move.hpp
Normal file
69
boost/variant/detail/move.hpp
Normal file
|
@ -0,0 +1,69 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/move.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003 Eric Friedman
|
||||
// Copyright (c) 2002 by Andrei Alexandrescu
|
||||
// Copyright (c) 2013 Antony Polukhin
|
||||
//
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// This file derivative of MoJO. Much thanks to Andrei for his initial work.
|
||||
// See <http://www.cuj.com/experts/2102/alexandr.htm> for information on MOJO.
|
||||
// Re-issued here under the Boost Software License, with permission of the original
|
||||
// author (Andrei Alexandrescu).
|
||||
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_MOVE_HPP
|
||||
#define BOOST_VARIANT_DETAIL_MOVE_HPP
|
||||
|
||||
#include <iterator> // for iterator_traits
|
||||
#include <new> // for placement new
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
#include "boost/move/move.hpp"
|
||||
|
||||
namespace boost { namespace detail { namespace variant {
|
||||
|
||||
using boost::move;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// function template move_swap
|
||||
//
|
||||
// Swaps using Koenig lookup but falls back to move-swap for primitive
|
||||
// types and on non-conforming compilers.
|
||||
//
|
||||
|
||||
namespace move_swap_fallback {
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline void swap(T1& lhs, T2& rhs)
|
||||
{
|
||||
T1 tmp( boost::detail::variant::move(lhs) );
|
||||
lhs = boost::detail::variant::move(rhs);
|
||||
rhs = boost::detail::variant::move(tmp);
|
||||
}
|
||||
|
||||
} // namespace move_swap_fallback
|
||||
|
||||
template <typename T>
|
||||
inline void move_swap(T& lhs, T& rhs)
|
||||
{
|
||||
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||
move_swap_fallback::swap(lhs, rhs);
|
||||
#else
|
||||
using move_swap_fallback::swap;
|
||||
swap(lhs, rhs);
|
||||
#endif
|
||||
}
|
||||
|
||||
}}} // namespace boost::detail::variant
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_MOVE_HPP
|
||||
|
||||
|
||||
|
58
boost/variant/detail/over_sequence.hpp
Normal file
58
boost/variant/detail/over_sequence.hpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/over_sequence.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Portions Copyright (C) 2002 David Abrahams
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
|
||||
#define BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
|
||||
|
||||
#include "boost/mpl/aux_/config/ctps.hpp"
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) class over_sequence
|
||||
//
|
||||
// Wrapper used to indicate bounded types for variant are from type sequence.
|
||||
//
|
||||
template <typename Types>
|
||||
struct over_sequence
|
||||
{
|
||||
typedef Types type;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction is_over_sequence (modeled on code by David Abrahams)
|
||||
//
|
||||
// Indicates whether the specified type is of form over_sequence<...> or not.
|
||||
//
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct is_over_sequence
|
||||
: mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
template <typename Types>
|
||||
struct is_over_sequence< over_sequence<Types> >
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
|
252
boost/variant/detail/substitute.hpp
Normal file
252
boost/variant/detail/substitute.hpp
Normal file
|
@ -0,0 +1,252 @@
|
|||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/substitute.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_SUBSTITUTE_HPP
|
||||
#define BOOST_VARIANT_DETAIL_SUBSTITUTE_HPP
|
||||
|
||||
#include "boost/mpl/aux_/config/ctps.hpp"
|
||||
|
||||
#include "boost/variant/detail/substitute_fwd.hpp"
|
||||
#include "boost/mpl/aux_/lambda_arity_param.hpp"
|
||||
#include "boost/mpl/aux_/preprocessor/params.hpp"
|
||||
#include "boost/mpl/aux_/preprocessor/repeat.hpp"
|
||||
#include "boost/mpl/int_fwd.hpp"
|
||||
#include "boost/mpl/limits/arity.hpp"
|
||||
#include "boost/preprocessor/cat.hpp"
|
||||
#include "boost/preprocessor/empty.hpp"
|
||||
#include "boost/preprocessor/arithmetic/inc.hpp"
|
||||
#include "boost/preprocessor/iterate.hpp"
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
#if !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction substitute
|
||||
//
|
||||
// Substitutes one type for another in the given type expression.
|
||||
//
|
||||
|
||||
//
|
||||
// primary template
|
||||
//
|
||||
template <
|
||||
typename T, typename Dest, typename Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(
|
||||
typename Arity /* = ... (see substitute_fwd.hpp) */
|
||||
)
|
||||
>
|
||||
struct substitute
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//
|
||||
// tag substitution specializations
|
||||
//
|
||||
|
||||
#define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(CV_) \
|
||||
template <typename Dest, typename Source> \
|
||||
struct substitute< \
|
||||
CV_ Source \
|
||||
, Dest \
|
||||
, Source \
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>) \
|
||||
> \
|
||||
{ \
|
||||
typedef CV_ Dest type; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG( BOOST_PP_EMPTY() )
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(const)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(volatile)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG(const volatile)
|
||||
|
||||
#undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_SUBSTITUTE_TAG
|
||||
|
||||
//
|
||||
// pointer specializations
|
||||
//
|
||||
#define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(CV_) \
|
||||
template <typename T, typename Dest, typename Source> \
|
||||
struct substitute< \
|
||||
T * CV_ \
|
||||
, Dest \
|
||||
, Source \
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>) \
|
||||
> \
|
||||
{ \
|
||||
typedef typename substitute< \
|
||||
T, Dest, Source \
|
||||
>::type * CV_ type; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER( BOOST_PP_EMPTY() )
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(const)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(volatile)
|
||||
BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER(const volatile)
|
||||
|
||||
#undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_IMPL_HANDLE_POINTER
|
||||
|
||||
//
|
||||
// reference specializations
|
||||
//
|
||||
template <typename T, typename Dest, typename Source>
|
||||
struct substitute<
|
||||
T&
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>)
|
||||
>
|
||||
{
|
||||
typedef typename substitute<
|
||||
T, Dest, Source
|
||||
>::type & type;
|
||||
};
|
||||
|
||||
//
|
||||
// template expression (i.e., F<...>) specializations
|
||||
//
|
||||
|
||||
#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
template <
|
||||
template <typename...> class F
|
||||
, typename... Ts
|
||||
, typename Dest
|
||||
, typename Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(typename Arity)
|
||||
>
|
||||
struct substitute<
|
||||
F<Ts...>
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(Arity)
|
||||
>
|
||||
{
|
||||
typedef F<typename substitute<
|
||||
Ts, Dest, Source
|
||||
>::type...> type;
|
||||
};
|
||||
#endif // !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
#define BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF_IMPL(N) \
|
||||
typedef typename substitute< \
|
||||
BOOST_PP_CAT(U,N), Dest, Source \
|
||||
>::type BOOST_PP_CAT(u,N); \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF(z, N, _) \
|
||||
BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF_IMPL( BOOST_PP_INC(N) ) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_ITERATION_LIMITS (0,BOOST_MPL_LIMIT_METAFUNCTION_ARITY)
|
||||
#define BOOST_PP_FILENAME_1 "boost/variant/detail/substitute.hpp"
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#undef BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF_IMPL
|
||||
#undef BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF
|
||||
|
||||
#endif // !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_SUBSTITUTE_HPP
|
||||
|
||||
///// iteration, depth == 1
|
||||
|
||||
#elif BOOST_PP_ITERATION_DEPTH() == 1
|
||||
#define i BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if i > 0
|
||||
|
||||
//
|
||||
// template specializations
|
||||
//
|
||||
template <
|
||||
template < BOOST_MPL_PP_PARAMS(i,typename P) > class T
|
||||
, BOOST_MPL_PP_PARAMS(i,typename U)
|
||||
, typename Dest
|
||||
, typename Source
|
||||
>
|
||||
struct substitute<
|
||||
T< BOOST_MPL_PP_PARAMS(i,U) >
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<( i )>)
|
||||
>
|
||||
{
|
||||
private:
|
||||
BOOST_MPL_PP_REPEAT(i, BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF, _)
|
||||
|
||||
public:
|
||||
typedef T< BOOST_MPL_PP_PARAMS(i,u) > type;
|
||||
};
|
||||
|
||||
//
|
||||
// function specializations
|
||||
//
|
||||
template <
|
||||
typename R
|
||||
, BOOST_MPL_PP_PARAMS(i,typename U)
|
||||
, typename Dest
|
||||
, typename Source
|
||||
>
|
||||
struct substitute<
|
||||
R (*)( BOOST_MPL_PP_PARAMS(i,U) )
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>)
|
||||
>
|
||||
{
|
||||
private:
|
||||
typedef typename substitute< R, Dest, Source >::type r;
|
||||
BOOST_MPL_PP_REPEAT(i, BOOST_VARIANT_AUX_SUBSTITUTE_TYPEDEF, _)
|
||||
|
||||
public:
|
||||
typedef r (*type)( BOOST_MPL_PP_PARAMS(i,u) );
|
||||
};
|
||||
|
||||
#elif i == 0
|
||||
|
||||
//
|
||||
// zero-arg function specialization
|
||||
//
|
||||
template <
|
||||
typename R, typename Dest, typename Source
|
||||
>
|
||||
struct substitute<
|
||||
R (*)( void )
|
||||
, Dest
|
||||
, Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(mpl::int_<-1>)
|
||||
>
|
||||
{
|
||||
private:
|
||||
typedef typename substitute< R, Dest, Source >::type r;
|
||||
|
||||
public:
|
||||
typedef r (*type)( void );
|
||||
};
|
||||
|
||||
#endif // i
|
||||
|
||||
#undef i
|
||||
#endif // BOOST_PP_IS_ITERATING
|
58
boost/variant/detail/substitute_fwd.hpp
Normal file
58
boost/variant/detail/substitute_fwd.hpp
Normal file
|
@ -0,0 +1,58 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/substitute_fwd.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
|
||||
#define BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
|
||||
|
||||
#include "boost/mpl/aux_/lambda_arity_param.hpp"
|
||||
#include "boost/mpl/aux_/template_arity.hpp"
|
||||
#include "boost/mpl/int_fwd.hpp"
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BOOST_VARIANT_DETAIL_NO_SUBSTITUTE
|
||||
//
|
||||
// Defined if 'substitute' is not implementable on the current compiler.
|
||||
//
|
||||
|
||||
#include "boost/mpl/aux_/config/ctps.hpp"
|
||||
#include "boost/mpl/aux_/config/ttp.hpp"
|
||||
|
||||
#if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
|
||||
&& !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
# define BOOST_VARIANT_DETAIL_NO_SUBSTITUTE
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
#if !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction substitute
|
||||
//
|
||||
// Substitutes one type for another in the given type expression.
|
||||
//
|
||||
template <
|
||||
typename T, typename Dest, typename Source
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(
|
||||
typename Arity = mpl::int_< mpl::aux::template_arity<T>::value >
|
||||
)
|
||||
>
|
||||
struct substitute;
|
||||
|
||||
#endif // !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
|
95
boost/variant/detail/variant_io.hpp
Normal file
95
boost/variant/detail/variant_io.hpp
Normal file
|
@ -0,0 +1,95 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/variant_io.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman, Itay Maman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_VARIANT_IO_HPP
|
||||
#define BOOST_VARIANT_DETAIL_VARIANT_IO_HPP
|
||||
|
||||
#include <iosfwd> // for std::basic_ostream forward declare
|
||||
|
||||
#include "boost/variant/variant_fwd.hpp"
|
||||
|
||||
#include "boost/detail/templated_streams.hpp"
|
||||
#include "boost/variant/static_visitor.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// function template operator<<
|
||||
//
|
||||
// Outputs the content of the given variant to the given ostream.
|
||||
//
|
||||
|
||||
// forward declare (allows output of embedded variant< variant< ... >, ... >)
|
||||
template <
|
||||
BOOST_TEMPLATED_STREAM_ARGS(E,T)
|
||||
BOOST_TEMPLATED_STREAM_COMMA
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename U)
|
||||
>
|
||||
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
|
||||
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
|
||||
, const variant< BOOST_VARIANT_ENUM_PARAMS(U) >& rhs
|
||||
);
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
template <typename OStream>
|
||||
class printer
|
||||
: public boost::static_visitor<>
|
||||
{
|
||||
private: // representation
|
||||
|
||||
OStream& out_;
|
||||
|
||||
public: // structors
|
||||
|
||||
explicit printer(OStream& out)
|
||||
: out_( out )
|
||||
{
|
||||
}
|
||||
|
||||
public: // visitor interface
|
||||
|
||||
template <typename T>
|
||||
void operator()(const T& operand) const
|
||||
{
|
||||
out_ << operand;
|
||||
}
|
||||
|
||||
private:
|
||||
printer& operator=(const printer&);
|
||||
|
||||
};
|
||||
|
||||
}} // namespace detail::variant
|
||||
|
||||
template <
|
||||
BOOST_TEMPLATED_STREAM_ARGS(E,T)
|
||||
BOOST_TEMPLATED_STREAM_COMMA
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename U)
|
||||
>
|
||||
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
|
||||
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
|
||||
, const variant< BOOST_VARIANT_ENUM_PARAMS(U) >& rhs
|
||||
)
|
||||
{
|
||||
detail::variant::printer<
|
||||
BOOST_TEMPLATED_STREAM(ostream, E,T)
|
||||
> visitor(out);
|
||||
|
||||
rhs.apply_visitor(visitor);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_VARIANT_IO_HPP
|
276
boost/variant/detail/visitation_impl.hpp
Normal file
276
boost/variant/detail/visitation_impl.hpp
Normal file
|
@ -0,0 +1,276 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/detail/visitation_impl.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
|
||||
#define BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
|
||||
#include "boost/variant/detail/backup_holder.hpp"
|
||||
#include "boost/variant/detail/cast_storage.hpp"
|
||||
#include "boost/variant/detail/forced_return.hpp"
|
||||
#include "boost/variant/detail/generic_result_type.hpp"
|
||||
|
||||
#include "boost/mpl/eval_if.hpp"
|
||||
#include "boost/mpl/bool.hpp"
|
||||
#include "boost/mpl/identity.hpp"
|
||||
#include "boost/mpl/int.hpp"
|
||||
#include "boost/mpl/next.hpp"
|
||||
#include "boost/mpl/deref.hpp"
|
||||
#include "boost/mpl/or.hpp"
|
||||
#include "boost/preprocessor/cat.hpp"
|
||||
#include "boost/preprocessor/inc.hpp"
|
||||
#include "boost/preprocessor/repeat.hpp"
|
||||
#include "boost/type_traits/is_same.hpp"
|
||||
#include "boost/type_traits/has_nothrow_copy.hpp"
|
||||
#include "boost/type_traits/is_nothrow_move_constructible.hpp"
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||
# pragma warning (push)
|
||||
# pragma warning (disable : 4702) //unreachable code
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BOOST_VARIANT_VISITATION_UNROLLING_LIMIT
|
||||
//
|
||||
// Unrolls variant's visitation mechanism to reduce template instantiation
|
||||
// and potentially increase runtime performance. (TODO: Investigate further.)
|
||||
//
|
||||
#if !defined(BOOST_VARIANT_VISITATION_UNROLLING_LIMIT)
|
||||
|
||||
#ifndef BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
|
||||
# include "boost/mpl/limits/list.hpp"
|
||||
# define BOOST_VARIANT_VISITATION_UNROLLING_LIMIT \
|
||||
BOOST_MPL_LIMIT_LIST_SIZE
|
||||
#else
|
||||
# define BOOST_VARIANT_VISITATION_UNROLLING_LIMIT \
|
||||
BOOST_VARIANT_LIMIT_TYPES
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) class apply_visitor_unrolled
|
||||
//
|
||||
// Tag type indicates when visitation_impl is unrolled.
|
||||
//
|
||||
struct apply_visitor_unrolled {};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) class template visitation_impl_step
|
||||
//
|
||||
// "Never ending" iterator range facilitates visitation_impl unrolling.
|
||||
//
|
||||
|
||||
|
||||
template <typename Iter, typename LastIter>
|
||||
struct visitation_impl_step
|
||||
{
|
||||
typedef typename mpl::deref<Iter>::type type;
|
||||
|
||||
typedef typename mpl::next<Iter>::type next_iter;
|
||||
typedef visitation_impl_step<
|
||||
next_iter, LastIter
|
||||
> next;
|
||||
};
|
||||
|
||||
template <typename LastIter>
|
||||
struct visitation_impl_step< LastIter,LastIter >
|
||||
{
|
||||
typedef apply_visitor_unrolled type;
|
||||
typedef visitation_impl_step next;
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) function template visitation_impl_invoke
|
||||
//
|
||||
// Invokes the given visitor on the specified type in the given storage.
|
||||
//
|
||||
|
||||
template <typename Visitor, typename VoidPtrCV, typename T>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
|
||||
visitation_impl_invoke_impl(
|
||||
int, Visitor& visitor, VoidPtrCV storage, T*
|
||||
, mpl::true_// never_uses_backup
|
||||
)
|
||||
{
|
||||
return visitor.internal_visit(
|
||||
cast_storage<T>(storage), 1L
|
||||
);
|
||||
}
|
||||
|
||||
template <typename Visitor, typename VoidPtrCV, typename T>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
|
||||
visitation_impl_invoke_impl(
|
||||
int internal_which, Visitor& visitor, VoidPtrCV storage, T*
|
||||
, mpl::false_// never_uses_backup
|
||||
)
|
||||
{
|
||||
if (internal_which >= 0)
|
||||
{
|
||||
return visitor.internal_visit(
|
||||
cast_storage<T>(storage), 1L
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return visitor.internal_visit(
|
||||
cast_storage< backup_holder<T> >(storage), 1L
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Visitor, typename VoidPtrCV, typename T, typename NoBackupFlag>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
|
||||
visitation_impl_invoke(
|
||||
int internal_which, Visitor& visitor, VoidPtrCV storage, T* t
|
||||
, NoBackupFlag
|
||||
, int
|
||||
)
|
||||
{
|
||||
typedef typename mpl::or_<
|
||||
NoBackupFlag
|
||||
, is_nothrow_move_constructible<T>
|
||||
, has_nothrow_copy<T>
|
||||
>::type never_uses_backup;
|
||||
|
||||
return (visitation_impl_invoke_impl)(
|
||||
internal_which, visitor, storage, t
|
||||
, never_uses_backup()
|
||||
);
|
||||
}
|
||||
|
||||
template <typename Visitor, typename VoidPtrCV, typename NBF>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
|
||||
visitation_impl_invoke(int, Visitor&, VoidPtrCV, apply_visitor_unrolled*, NBF, long)
|
||||
{
|
||||
// should never be here at runtime!
|
||||
typedef typename Visitor::result_type result_type;
|
||||
return ::boost::detail::variant::forced_return< result_type >();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) function template visitation_impl
|
||||
//
|
||||
// Invokes the given visitor on the type in the given variant storage.
|
||||
//
|
||||
|
||||
template <
|
||||
typename W, typename S
|
||||
, typename Visitor, typename VPCV
|
||||
, typename NBF
|
||||
>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
|
||||
visitation_impl(
|
||||
int, int, Visitor&, VPCV
|
||||
, mpl::true_ // is_apply_visitor_unrolled
|
||||
, NBF, W* = 0, S* = 0
|
||||
)
|
||||
{
|
||||
// should never be here at runtime!
|
||||
typedef typename Visitor::result_type result_type;
|
||||
return ::boost::detail::variant::forced_return< result_type >();
|
||||
}
|
||||
|
||||
template <
|
||||
typename Which, typename step0
|
||||
, typename Visitor, typename VoidPtrCV
|
||||
, typename NoBackupFlag
|
||||
>
|
||||
inline
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
|
||||
visitation_impl(
|
||||
const int internal_which, const int logical_which
|
||||
, Visitor& visitor, VoidPtrCV storage
|
||||
, mpl::false_ // is_apply_visitor_unrolled
|
||||
, NoBackupFlag no_backup_flag
|
||||
, Which* = 0, step0* = 0
|
||||
)
|
||||
{
|
||||
// Typedef apply_visitor_unrolled steps and associated types...
|
||||
# define BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_TYPEDEF(z, N, _) \
|
||||
typedef typename BOOST_PP_CAT(step,N)::type BOOST_PP_CAT(T,N); \
|
||||
typedef typename BOOST_PP_CAT(step,N)::next \
|
||||
BOOST_PP_CAT(step, BOOST_PP_INC(N)); \
|
||||
/**/
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_VARIANT_VISITATION_UNROLLING_LIMIT
|
||||
, BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_TYPEDEF
|
||||
, _
|
||||
)
|
||||
|
||||
# undef BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_TYPEDEF
|
||||
|
||||
// ...switch on the target which-index value...
|
||||
switch (logical_which)
|
||||
{
|
||||
|
||||
// ...applying the appropriate case:
|
||||
# define BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE(z, N, _) \
|
||||
case (Which::value + (N)): \
|
||||
return (visitation_impl_invoke)( \
|
||||
internal_which, visitor, storage \
|
||||
, static_cast<BOOST_PP_CAT(T,N)*>(0) \
|
||||
, no_backup_flag, 1L \
|
||||
); \
|
||||
/**/
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_VARIANT_VISITATION_UNROLLING_LIMIT
|
||||
, BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE
|
||||
, _
|
||||
)
|
||||
|
||||
# undef BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
// If not handled in this iteration, continue unrolling:
|
||||
typedef mpl::int_<
|
||||
Which::value + (BOOST_VARIANT_VISITATION_UNROLLING_LIMIT)
|
||||
> next_which;
|
||||
|
||||
typedef BOOST_PP_CAT(step, BOOST_VARIANT_VISITATION_UNROLLING_LIMIT)
|
||||
next_step;
|
||||
|
||||
typedef typename next_step::type next_type;
|
||||
typedef typename is_same< next_type,apply_visitor_unrolled >::type
|
||||
is_apply_visitor_unrolled;
|
||||
|
||||
return visitation_impl(
|
||||
internal_which, logical_which
|
||||
, visitor, storage
|
||||
, is_apply_visitor_unrolled()
|
||||
, no_backup_flag
|
||||
, static_cast<next_which*>(0), static_cast<next_step*>(0)
|
||||
);
|
||||
}
|
||||
|
||||
}} // namespace detail::variant
|
||||
} // namespace boost
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
|
162
boost/variant/get.hpp
Normal file
162
boost/variant/get.hpp
Normal file
|
@ -0,0 +1,162 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/get.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003
|
||||
// Eric Friedman, Itay Maman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_GET_HPP
|
||||
#define BOOST_VARIANT_GET_HPP
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
#include "boost/throw_exception.hpp"
|
||||
#include "boost/utility/addressof.hpp"
|
||||
#include "boost/variant/variant_fwd.hpp"
|
||||
|
||||
#include "boost/type_traits/add_reference.hpp"
|
||||
#include "boost/type_traits/add_pointer.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// class bad_get
|
||||
//
|
||||
// The exception thrown in the event of a failed get of a value.
|
||||
//
|
||||
class BOOST_SYMBOL_VISIBLE bad_get
|
||||
: public std::exception
|
||||
{
|
||||
public: // std::exception implementation
|
||||
|
||||
virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return "boost::bad_get: "
|
||||
"failed value get using boost::get";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// function template get<T>
|
||||
//
|
||||
// Retrieves content of given variant object if content is of type T.
|
||||
// Otherwise: pointer ver. returns 0; reference ver. throws bad_get.
|
||||
//
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
// (detail) class template get_visitor
|
||||
//
|
||||
// Generic static visitor that: if the value is of the specified type,
|
||||
// returns a pointer to the value it visits; else a null pointer.
|
||||
//
|
||||
template <typename T>
|
||||
struct get_visitor
|
||||
{
|
||||
private: // private typedefs
|
||||
|
||||
typedef typename add_pointer<T>::type pointer;
|
||||
typedef typename add_reference<T>::type reference;
|
||||
|
||||
public: // visitor typedefs
|
||||
|
||||
typedef pointer result_type;
|
||||
|
||||
public: // visitor interfaces
|
||||
|
||||
pointer operator()(reference operand) const BOOST_NOEXCEPT
|
||||
{
|
||||
return boost::addressof(operand);
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
pointer operator()(const U&) const BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<pointer>(0);
|
||||
}
|
||||
};
|
||||
|
||||
}} // namespace detail::variant
|
||||
|
||||
#ifndef BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE
|
||||
# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
|
||||
# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# else
|
||||
# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
|
||||
, t* = 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_pointer<U>::type
|
||||
get(
|
||||
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef typename add_pointer<U>::type U_ptr;
|
||||
if (!operand) return static_cast<U_ptr>(0);
|
||||
|
||||
detail::variant::get_visitor<U> v;
|
||||
return operand->apply_visitor(v);
|
||||
}
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_pointer<const U>::type
|
||||
get(
|
||||
const boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef typename add_pointer<const U>::type U_ptr;
|
||||
if (!operand) return static_cast<U_ptr>(0);
|
||||
|
||||
detail::variant::get_visitor<const U> v;
|
||||
return operand->apply_visitor(v);
|
||||
}
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_reference<U>::type
|
||||
get(
|
||||
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >& operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
)
|
||||
{
|
||||
typedef typename add_pointer<U>::type U_ptr;
|
||||
U_ptr result = get<U>(&operand);
|
||||
|
||||
if (!result)
|
||||
boost::throw_exception(bad_get());
|
||||
return *result;
|
||||
}
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_reference<const U>::type
|
||||
get(
|
||||
const boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >& operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
)
|
||||
{
|
||||
typedef typename add_pointer<const U>::type U_ptr;
|
||||
U_ptr result = get<const U>(&operand);
|
||||
|
||||
if (!result)
|
||||
boost::throw_exception(bad_get());
|
||||
return *result;
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_GET_HPP
|
143
boost/variant/multivisitors.hpp
Normal file
143
boost/variant/multivisitors.hpp
Normal file
|
@ -0,0 +1,143 @@
|
|||
// Boost.Varaint
|
||||
// Multivisitors defined here
|
||||
//
|
||||
// See http://www.boost.org for most recent version, including documentation.
|
||||
//
|
||||
// Copyright Antony Polukhin, 2013.
|
||||
//
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
#ifndef BOOST_VARIANT_MULTIVISITORS_HPP
|
||||
#define BOOST_VARIANT_MULTIVISITORS_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <boost/preprocessor/repetition.hpp>
|
||||
#include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
#include <boost/preprocessor/arithmetic/add.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
|
||||
#ifndef BOOST_VARAINT_MAX_MULTIVIZITOR_PARAMS
|
||||
# define BOOST_VARAINT_MAX_MULTIVIZITOR_PARAMS 4
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
template <class VisitorT, class Visitable1T, class Visitable2T>
|
||||
struct two_variables_holder {
|
||||
private:
|
||||
VisitorT& visitor_;
|
||||
Visitable1T& visitable1_;
|
||||
Visitable2T& visitable2_;
|
||||
|
||||
// required to supress warnings and enshure that we do not copy
|
||||
// this visitor
|
||||
two_variables_holder& operator=(const two_variables_holder&);
|
||||
|
||||
public:
|
||||
typedef BOOST_DEDUCED_TYPENAME VisitorT::result_type result_type;
|
||||
|
||||
explicit two_variables_holder(VisitorT& visitor, Visitable1T& visitable1, Visitable2T& visitable2) BOOST_NOEXCEPT
|
||||
: visitor_(visitor)
|
||||
, visitable1_(visitable1)
|
||||
, visitable2_(visitable2)
|
||||
{}
|
||||
|
||||
#define BOOST_VARIANT_OPERATOR_BEG() \
|
||||
return ::boost::apply_visitor( \
|
||||
::boost::bind<result_type>(boost::ref(visitor_), _1, _2 \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_OPERATOR_END() \
|
||||
), visitable1_, visitable2_); \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARANT_VISITORS_VARIABLES_PRINTER(z, n, data) \
|
||||
BOOST_PP_COMMA() boost::ref( BOOST_PP_CAT(vis, n) ) \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_VISIT(z, n, data) \
|
||||
template <BOOST_PP_ENUM_PARAMS(BOOST_PP_ADD(n, 1), class VisitableUnwrapped)> \
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) operator()( \
|
||||
BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ADD(n, 1), VisitableUnwrapped, & vis) \
|
||||
) const \
|
||||
{ \
|
||||
BOOST_VARIANT_OPERATOR_BEG() \
|
||||
BOOST_PP_REPEAT(BOOST_PP_ADD(n, 1), BOOST_VARANT_VISITORS_VARIABLES_PRINTER, ~) \
|
||||
BOOST_VARIANT_OPERATOR_END() \
|
||||
} \
|
||||
/**/
|
||||
|
||||
BOOST_PP_REPEAT( BOOST_PP_SUB(BOOST_VARAINT_MAX_MULTIVIZITOR_PARAMS, 2), BOOST_VARIANT_VISIT, ~)
|
||||
#undef BOOST_VARIANT_OPERATOR_BEG
|
||||
#undef BOOST_VARIANT_OPERATOR_END
|
||||
#undef BOOST_VARANT_VISITORS_VARIABLES_PRINTER
|
||||
#undef BOOST_VARIANT_VISIT
|
||||
|
||||
};
|
||||
|
||||
template <class VisitorT, class Visitable1T, class Visitable2T>
|
||||
inline two_variables_holder<VisitorT, Visitable1T, Visitable2T> make_two_variables_holder(
|
||||
VisitorT& visitor, Visitable1T& visitable1, Visitable2T& visitable2
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
return two_variables_holder<VisitorT, Visitable1T, Visitable2T>(visitor, visitable1, visitable2);
|
||||
}
|
||||
|
||||
template <class VisitorT, class Visitable1T, class Visitable2T>
|
||||
inline two_variables_holder<const VisitorT, Visitable1T, Visitable2T> make_two_variables_holder(
|
||||
const VisitorT& visitor, Visitable1T& visitable1, Visitable2T& visitable2
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
return two_variables_holder<const VisitorT, Visitable1T, Visitable2T>(visitor, visitable1, visitable2);
|
||||
}
|
||||
|
||||
}} // namespace detail::variant
|
||||
|
||||
#define BOOST_VARIANT_APPLY_VISITOR_BEG() \
|
||||
return ::boost::apply_visitor( \
|
||||
boost::detail::variant::make_two_variables_holder(visitor, var0 , var1), \
|
||||
var2 \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_APPLY_VISITOR_END() \
|
||||
); \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARANT_VISITORS_VARIABLES_PRINTER(z, n, data) \
|
||||
BOOST_PP_COMMA() BOOST_PP_CAT(var, BOOST_PP_ADD(n, 3)) \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_VISIT(z, n, data) \
|
||||
template <class Visitor BOOST_PP_COMMA() BOOST_PP_ENUM_PARAMS(BOOST_PP_ADD(n, 3), class T)> \
|
||||
inline BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(BOOST_DEDUCED_TYPENAME Visitor::result_type) apply_visitor( \
|
||||
data BOOST_PP_COMMA() BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ADD(n, 3), T, & var) \
|
||||
) \
|
||||
{ \
|
||||
BOOST_VARIANT_APPLY_VISITOR_BEG() \
|
||||
BOOST_PP_REPEAT(n, BOOST_VARANT_VISITORS_VARIABLES_PRINTER, ~) \
|
||||
BOOST_VARIANT_APPLY_VISITOR_END() \
|
||||
} \
|
||||
/**/
|
||||
|
||||
BOOST_PP_REPEAT( BOOST_PP_SUB(BOOST_VARAINT_MAX_MULTIVIZITOR_PARAMS, 2), BOOST_VARIANT_VISIT, const Visitor& visitor)
|
||||
BOOST_PP_REPEAT( BOOST_PP_SUB(BOOST_VARAINT_MAX_MULTIVIZITOR_PARAMS, 2), BOOST_VARIANT_VISIT, Visitor& visitor)
|
||||
|
||||
#undef BOOST_VARIANT_APPLY_VISITOR_BEG
|
||||
#undef BOOST_VARIANT_APPLY_VISITOR_END
|
||||
#undef BOOST_VARANT_VISITORS_VARIABLES_PRINTER
|
||||
#undef BOOST_VARIANT_VISIT
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_MULTIVISITORS_HPP
|
||||
|
170
boost/variant/polymorphic_get.hpp
Normal file
170
boost/variant/polymorphic_get.hpp
Normal file
|
@ -0,0 +1,170 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/polymorphic_get.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2013 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_POLYMORPHIC_GET_HPP
|
||||
#define BOOST_VARIANT_POLYMORPHIC_GET_HPP
|
||||
|
||||
#include <exception>
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
#include "boost/throw_exception.hpp"
|
||||
#include "boost/utility/addressof.hpp"
|
||||
#include "boost/variant/variant_fwd.hpp"
|
||||
#include "boost/variant/get.hpp"
|
||||
|
||||
#include "boost/type_traits/add_reference.hpp"
|
||||
#include "boost/type_traits/add_pointer.hpp"
|
||||
#include "boost/type_traits/is_base_of.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// class bad_polymorphic_get
|
||||
//
|
||||
// The exception thrown in the event of a failed get of a value.
|
||||
//
|
||||
class BOOST_SYMBOL_VISIBLE bad_polymorphic_get
|
||||
: public bad_get
|
||||
{
|
||||
public: // std::exception implementation
|
||||
|
||||
virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
return "boost::bad_polymorphic_get: "
|
||||
"failed value get using boost::polymorphic_get";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// function template get<T>
|
||||
//
|
||||
// Retrieves content of given variant object if content is of type T.
|
||||
// Otherwise: pointer ver. returns 0; reference ver. throws bad_get.
|
||||
//
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
// (detail) class template get_polymorphic_visitor
|
||||
//
|
||||
// Generic static visitor that: if the value is of the specified
|
||||
// type or of a type derived from specified, returns a pointer
|
||||
// to the value it visits; else a null pointer.
|
||||
//
|
||||
template <typename Base>
|
||||
struct get_polymorphic_visitor
|
||||
{
|
||||
private: // private typedefs
|
||||
typedef typename add_pointer<Base>::type pointer;
|
||||
typedef typename add_reference<Base>::type reference;
|
||||
|
||||
pointer get(reference operand, boost::true_type) const BOOST_NOEXCEPT
|
||||
{
|
||||
return boost::addressof(operand);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
pointer get(T&, boost::false_type) const BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<pointer>(0);
|
||||
}
|
||||
|
||||
public: // visitor interfaces
|
||||
typedef pointer result_type;
|
||||
|
||||
template <typename U>
|
||||
pointer operator()(U& operand) const BOOST_NOEXCEPT
|
||||
{
|
||||
typedef boost::integral_constant<
|
||||
bool,
|
||||
boost::is_base_of<Base, U>::value || boost::is_same<Base, U>::value
|
||||
> tag_t;
|
||||
return get(operand, tag_t());
|
||||
}
|
||||
};
|
||||
|
||||
}} // namespace detail::variant
|
||||
|
||||
#ifndef BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE
|
||||
# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
|
||||
# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# else
|
||||
# define BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(t) \
|
||||
, t* = 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_pointer<U>::type
|
||||
polymorphic_get(
|
||||
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef typename add_pointer<U>::type U_ptr;
|
||||
if (!operand) return static_cast<U_ptr>(0);
|
||||
|
||||
detail::variant::get_polymorphic_visitor<U> v;
|
||||
return operand->apply_visitor(v);
|
||||
}
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_pointer<const U>::type
|
||||
polymorphic_get(
|
||||
const boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >* operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef typename add_pointer<const U>::type U_ptr;
|
||||
if (!operand) return static_cast<U_ptr>(0);
|
||||
|
||||
detail::variant::get_polymorphic_visitor<const U> v;
|
||||
return operand->apply_visitor(v);
|
||||
}
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_reference<U>::type
|
||||
polymorphic_get(
|
||||
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >& operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
)
|
||||
{
|
||||
typedef typename add_pointer<U>::type U_ptr;
|
||||
U_ptr result = polymorphic_get<U>(&operand);
|
||||
|
||||
if (!result)
|
||||
boost::throw_exception(bad_polymorphic_get());
|
||||
return *result;
|
||||
}
|
||||
|
||||
template <typename U, BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
inline
|
||||
typename add_reference<const U>::type
|
||||
polymorphic_get(
|
||||
const boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >& operand
|
||||
BOOST_VARIANT_AUX_GET_EXPLICIT_TEMPLATE_TYPE(U)
|
||||
)
|
||||
{
|
||||
typedef typename add_pointer<const U>::type U_ptr;
|
||||
U_ptr result = polymorphic_get<const U>(&operand);
|
||||
|
||||
if (!result)
|
||||
boost::throw_exception(bad_polymorphic_get());
|
||||
return *result;
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_POLYMORPHIC_GET_HPP
|
209
boost/variant/recursive_variant.hpp
Normal file
209
boost/variant/recursive_variant.hpp
Normal file
|
@ -0,0 +1,209 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/recursive_variant.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003 Eric Friedman
|
||||
// Copyright (c) 2013 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_RECURSIVE_VARIANT_HPP
|
||||
#define BOOST_VARIANT_RECURSIVE_VARIANT_HPP
|
||||
|
||||
#include "boost/variant/variant_fwd.hpp"
|
||||
#include "boost/variant/detail/enable_recursive.hpp"
|
||||
#include "boost/variant/detail/substitute_fwd.hpp"
|
||||
#include "boost/variant/detail/make_variant_list.hpp"
|
||||
#include "boost/variant/detail/over_sequence.hpp"
|
||||
|
||||
#include "boost/mpl/aux_/lambda_arity_param.hpp"
|
||||
|
||||
#include "boost/mpl/equal.hpp"
|
||||
#include "boost/mpl/eval_if.hpp"
|
||||
#include "boost/mpl/identity.hpp"
|
||||
#include "boost/mpl/if.hpp"
|
||||
#include "boost/mpl/protect.hpp"
|
||||
#include "boost/mpl/transform.hpp"
|
||||
#include "boost/type_traits/is_same.hpp"
|
||||
#include "boost/preprocessor/cat.hpp"
|
||||
#include "boost/preprocessor/repeat.hpp"
|
||||
|
||||
#include "boost/mpl/bool.hpp"
|
||||
#include "boost/mpl/is_sequence.hpp"
|
||||
#include "boost/variant/variant.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) metafunction specialization substitute
|
||||
//
|
||||
// Handles embedded variant types when substituting for recursive_variant_.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
template <
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename T)
|
||||
, typename RecursiveVariant
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(typename Arity)
|
||||
>
|
||||
struct substitute<
|
||||
::boost::variant<
|
||||
recursive_flag< T0 >
|
||||
, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)
|
||||
>
|
||||
, RecursiveVariant
|
||||
, ::boost::recursive_variant_
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(Arity)
|
||||
>
|
||||
{
|
||||
typedef ::boost::variant<
|
||||
recursive_flag< T0 >
|
||||
, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)
|
||||
> type;
|
||||
};
|
||||
|
||||
template <
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename T)
|
||||
, typename RecursiveVariant
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(typename Arity)
|
||||
>
|
||||
struct substitute<
|
||||
::boost::variant<
|
||||
::boost::detail::variant::over_sequence< T0 >
|
||||
, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)
|
||||
>
|
||||
, RecursiveVariant
|
||||
, ::boost::recursive_variant_
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(Arity)
|
||||
>
|
||||
{
|
||||
private:
|
||||
|
||||
typedef T0 initial_types;
|
||||
|
||||
typedef typename mpl::transform<
|
||||
initial_types
|
||||
, mpl::protect< quoted_enable_recursive<RecursiveVariant,mpl::true_> >
|
||||
>::type types;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename mpl::if_<
|
||||
mpl::equal<initial_types, types, ::boost::is_same<mpl::_1, mpl::_2> >
|
||||
, ::boost::variant<
|
||||
::boost::detail::variant::over_sequence< T0 >
|
||||
, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)
|
||||
>
|
||||
, ::boost::variant< over_sequence<types> >
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template <
|
||||
BOOST_VARIANT_ENUM_PARAMS(typename T)
|
||||
, typename RecursiveVariant
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(typename Arity)
|
||||
>
|
||||
struct substitute<
|
||||
::boost::variant< BOOST_VARIANT_ENUM_PARAMS(T) >
|
||||
, RecursiveVariant
|
||||
, ::boost::recursive_variant_
|
||||
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(Arity)
|
||||
>
|
||||
{
|
||||
#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
typedef ::boost::variant<
|
||||
typename enable_recursive<
|
||||
T0
|
||||
, RecursiveVariant
|
||||
, mpl::true_
|
||||
>::type,
|
||||
typename enable_recursive<
|
||||
TN
|
||||
, RecursiveVariant
|
||||
, mpl::true_
|
||||
>::type...
|
||||
> type;
|
||||
|
||||
#else // defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
private: // helpers, for metafunction result (below)
|
||||
|
||||
#define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS(z,N,_) \
|
||||
typedef typename enable_recursive< \
|
||||
BOOST_PP_CAT(T,N) \
|
||||
, RecursiveVariant \
|
||||
, mpl::true_ \
|
||||
>::type BOOST_PP_CAT(wknd_T,N); \
|
||||
/**/
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_VARIANT_LIMIT_TYPES
|
||||
, BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS
|
||||
, _
|
||||
)
|
||||
|
||||
#undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS
|
||||
|
||||
public: // metafunction result
|
||||
|
||||
typedef ::boost::variant< BOOST_VARIANT_ENUM_PARAMS(wknd_T) > type;
|
||||
#endif // BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES workaround
|
||||
};
|
||||
|
||||
#else // defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
//
|
||||
// no specializations: embedded variants unsupported on these compilers!
|
||||
//
|
||||
|
||||
#endif // !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
|
||||
|
||||
}} // namespace detail::variant
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction make_recursive_variant
|
||||
//
|
||||
// See docs and boost/variant/variant_fwd.hpp for more information.
|
||||
//
|
||||
template < BOOST_VARIANT_ENUM_PARAMS(typename T) >
|
||||
struct make_recursive_variant
|
||||
{
|
||||
public: // metafunction result
|
||||
|
||||
typedef boost::variant<
|
||||
detail::variant::recursive_flag< T0 >
|
||||
, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)
|
||||
> type;
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction make_recursive_variant_over
|
||||
//
|
||||
// See docs and boost/variant/variant_fwd.hpp for more information.
|
||||
//
|
||||
template <typename Types>
|
||||
struct make_recursive_variant_over
|
||||
{
|
||||
private: // precondition assertions
|
||||
|
||||
BOOST_STATIC_ASSERT(( ::boost::mpl::is_sequence<Types>::value ));
|
||||
|
||||
public: // metafunction result
|
||||
|
||||
typedef typename make_recursive_variant<
|
||||
detail::variant::over_sequence< Types >
|
||||
>::type type;
|
||||
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_RECURSIVE_VARIANT_HPP
|
158
boost/variant/recursive_wrapper.hpp
Normal file
158
boost/variant/recursive_wrapper.hpp
Normal file
|
@ -0,0 +1,158 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/recursive_wrapper.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman, Itay Maman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_RECURSIVE_WRAPPER_HPP
|
||||
#define BOOST_VARIANT_RECURSIVE_WRAPPER_HPP
|
||||
|
||||
#include "boost/variant/recursive_wrapper_fwd.hpp"
|
||||
#include "boost/variant/detail/move.hpp"
|
||||
#include "boost/checked_delete.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// class template recursive_wrapper
|
||||
//
|
||||
// See docs and recursive_wrapper_fwd.hpp for more information.
|
||||
//
|
||||
|
||||
template <typename T>
|
||||
class recursive_wrapper
|
||||
{
|
||||
public: // typedefs
|
||||
|
||||
typedef T type;
|
||||
|
||||
private: // representation
|
||||
|
||||
T* p_;
|
||||
|
||||
public: // structors
|
||||
|
||||
~recursive_wrapper();
|
||||
recursive_wrapper();
|
||||
|
||||
recursive_wrapper(const recursive_wrapper& operand);
|
||||
recursive_wrapper(const T& operand);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
recursive_wrapper(recursive_wrapper&& operand);
|
||||
recursive_wrapper(T&& operand);
|
||||
#endif
|
||||
|
||||
private: // helpers, for modifiers (below)
|
||||
|
||||
void assign(const T& rhs);
|
||||
|
||||
public: // modifiers
|
||||
|
||||
recursive_wrapper& operator=(const recursive_wrapper& rhs)
|
||||
{
|
||||
assign( rhs.get() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
recursive_wrapper& operator=(const T& rhs)
|
||||
{
|
||||
assign( rhs );
|
||||
return *this;
|
||||
}
|
||||
|
||||
void swap(recursive_wrapper& operand) BOOST_NOEXCEPT
|
||||
{
|
||||
T* temp = operand.p_;
|
||||
operand.p_ = p_;
|
||||
p_ = temp;
|
||||
}
|
||||
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
recursive_wrapper& operator=(recursive_wrapper&& rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
swap(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
recursive_wrapper& operator=(T&& rhs)
|
||||
{
|
||||
get() = detail::variant::move(rhs);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
public: // queries
|
||||
|
||||
T& get() { return *get_pointer(); }
|
||||
const T& get() const { return *get_pointer(); }
|
||||
|
||||
T* get_pointer() { return p_; }
|
||||
const T* get_pointer() const { return p_; }
|
||||
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
recursive_wrapper<T>::~recursive_wrapper()
|
||||
{
|
||||
boost::checked_delete(p_);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
recursive_wrapper<T>::recursive_wrapper()
|
||||
: p_(new T)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
recursive_wrapper<T>::recursive_wrapper(const recursive_wrapper& operand)
|
||||
: p_(new T( operand.get() ))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
recursive_wrapper<T>::recursive_wrapper(const T& operand)
|
||||
: p_(new T(operand))
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <typename T>
|
||||
recursive_wrapper<T>::recursive_wrapper(recursive_wrapper&& operand)
|
||||
: p_(new T( detail::variant::move(operand.get()) ))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
recursive_wrapper<T>::recursive_wrapper(T&& operand)
|
||||
: p_(new T( detail::variant::move(operand) ))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
void recursive_wrapper<T>::assign(const T& rhs)
|
||||
{
|
||||
this->get() = rhs;
|
||||
}
|
||||
|
||||
// function template swap
|
||||
//
|
||||
// Swaps two recursive_wrapper<T> objects of the same type T.
|
||||
//
|
||||
template <typename T>
|
||||
inline void swap(recursive_wrapper<T>& lhs, recursive_wrapper<T>& rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_RECURSIVE_WRAPPER_HPP
|
103
boost/variant/recursive_wrapper_fwd.hpp
Normal file
103
boost/variant/recursive_wrapper_fwd.hpp
Normal file
|
@ -0,0 +1,103 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/recursive_wrapper_fwd.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002
|
||||
// Eric Friedman, Itay Maman
|
||||
//
|
||||
// Portions Copyright (C) 2002 David Abrahams
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
|
||||
#define BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
|
||||
|
||||
#include "boost/mpl/aux_/config/ctps.hpp"
|
||||
|
||||
#include "boost/mpl/aux_/lambda_support.hpp"
|
||||
|
||||
// should be the last #include
|
||||
#include "boost/type_traits/detail/bool_trait_def.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// class template recursive_wrapper
|
||||
//
|
||||
// Enables recursive types in templates by breaking cyclic dependencies.
|
||||
//
|
||||
// For example:
|
||||
//
|
||||
// class my;
|
||||
//
|
||||
// typedef variant< int, recursive_wrapper<my> > var;
|
||||
//
|
||||
// class my {
|
||||
// var var_;
|
||||
// ...
|
||||
// };
|
||||
//
|
||||
template <typename T> class recursive_wrapper;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction is_recursive_wrapper (modeled on code by David Abrahams)
|
||||
//
|
||||
// True iff specified type matches recursive_wrapper<T>.
|
||||
//
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct is_recursive_wrapper_impl
|
||||
: mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_recursive_wrapper_impl< recursive_wrapper<T> >
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(
|
||||
is_recursive_wrapper
|
||||
, T
|
||||
, (::boost::detail::is_recursive_wrapper_impl<T>::value)
|
||||
)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction unwrap_recursive
|
||||
//
|
||||
// If specified type T matches recursive_wrapper<U>, then U; else T.
|
||||
//
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct unwrap_recursive
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,unwrap_recursive,(T))
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct unwrap_recursive< recursive_wrapper<T> >
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,unwrap_recursive,(T))
|
||||
};
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include "boost/type_traits/detail/bool_trait_undef.hpp"
|
||||
|
||||
#endif // BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
|
96
boost/variant/static_visitor.hpp
Normal file
96
boost/variant/static_visitor.hpp
Normal file
|
@ -0,0 +1,96 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/static_visitor.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_STATIC_VISITOR_HPP
|
||||
#define BOOST_VARIANT_STATIC_VISITOR_HPP
|
||||
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/detail/workaround.hpp"
|
||||
|
||||
#include "boost/mpl/if.hpp"
|
||||
#include "boost/type_traits/is_base_and_derived.hpp"
|
||||
|
||||
// should be the last #include
|
||||
#include "boost/type_traits/detail/bool_trait_def.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// class template static_visitor
|
||||
//
|
||||
// An empty base class that typedefs the return type of a deriving static
|
||||
// visitor. The class is analogous to std::unary_function in this role.
|
||||
//
|
||||
|
||||
namespace detail {
|
||||
|
||||
struct is_static_visitor_tag { };
|
||||
|
||||
typedef void static_visitor_default_return;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename R = ::boost::detail::static_visitor_default_return>
|
||||
class static_visitor
|
||||
: public detail::is_static_visitor_tag
|
||||
{
|
||||
public: // typedefs
|
||||
|
||||
typedef R result_type;
|
||||
|
||||
protected: // for use as base class only
|
||||
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
|
||||
static_visitor() = default;
|
||||
~static_visitor() = default;
|
||||
#else
|
||||
static_visitor() BOOST_NOEXCEPT { }
|
||||
~static_visitor() BOOST_NOEXCEPT { }
|
||||
#endif
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// metafunction is_static_visitor
|
||||
//
|
||||
// Value metafunction indicates whether the specified type derives from
|
||||
// static_visitor<...>.
|
||||
//
|
||||
// NOTE #1: This metafunction does NOT check whether the specified type
|
||||
// fulfills the requirements of the StaticVisitor concept.
|
||||
//
|
||||
// NOTE #2: This template never needs to be specialized!
|
||||
//
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
struct is_static_visitor_impl
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
(::boost::is_base_and_derived<
|
||||
detail::is_static_visitor_tag,
|
||||
T
|
||||
>::value));
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_BOOL_TRAIT_DEF1(
|
||||
is_static_visitor
|
||||
, T
|
||||
, (::boost::detail::is_static_visitor_impl<T>::value)
|
||||
)
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include "boost/type_traits/detail/bool_trait_undef.hpp"
|
||||
|
||||
#endif // BOOST_VARIANT_STATIC_VISITOR_HPP
|
2328
boost/variant/variant.hpp
Normal file
2328
boost/variant/variant.hpp
Normal file
File diff suppressed because it is too large
Load diff
331
boost/variant/variant_fwd.hpp
Normal file
331
boost/variant/variant_fwd.hpp
Normal file
|
@ -0,0 +1,331 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/variant_fwd.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2003 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2013 Antony Polukhin
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_VARIANT_FWD_HPP
|
||||
#define BOOST_VARIANT_VARIANT_FWD_HPP
|
||||
|
||||
#include "boost/variant/detail/config.hpp"
|
||||
|
||||
#include "boost/blank_fwd.hpp"
|
||||
#include "boost/mpl/arg.hpp"
|
||||
#include "boost/mpl/limits/arity.hpp"
|
||||
#include "boost/mpl/aux_/na.hpp"
|
||||
#include "boost/preprocessor/cat.hpp"
|
||||
#include "boost/preprocessor/enum.hpp"
|
||||
#include "boost/preprocessor/enum_params.hpp"
|
||||
#include "boost/preprocessor/enum_shifted_params.hpp"
|
||||
#include "boost/preprocessor/repeat.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_NO_REFERENCE_SUPPORT
|
||||
//
|
||||
// Defined if variant does not support references as bounded types.
|
||||
//
|
||||
#if defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING) \
|
||||
&& !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) \
|
||||
&& !defined(BOOST_VARIANT_NO_REFERENCE_SUPPORT)
|
||||
# define BOOST_VARIANT_NO_REFERENCE_SUPPORT
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
|
||||
//
|
||||
// Defined if variant does not support make_variant_over (see below).
|
||||
//
|
||||
#if defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
# define BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT
|
||||
//
|
||||
// Defined if make_recursive_variant cannot be supported as documented.
|
||||
//
|
||||
// Note: Currently, MPL lambda facility is used as workaround if defined, and
|
||||
// so only types declared w/ MPL lambda workarounds will work.
|
||||
//
|
||||
|
||||
#include "boost/variant/detail/substitute_fwd.hpp"
|
||||
|
||||
#if defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE) \
|
||||
&& !defined(BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT)
|
||||
# define BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT
|
||||
#endif
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
|
||||
//
|
||||
|
||||
/*
|
||||
GCC before 4.0 had no variadic tempaltes;
|
||||
GCC 4.6 has incomplete implementation of variadic templates.
|
||||
|
||||
MSVC2013 has variadic templates, but they have issues.
|
||||
*/
|
||||
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \
|
||||
|| (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7)) \
|
||||
|| (defined(_MSC_VER) && (_MSC_VER <= 1800)) \
|
||||
|| defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE) \
|
||||
|| defined (BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT)
|
||||
|
||||
#ifndef BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
|
||||
# define BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
#include <boost/preprocessor/seq/size.hpp>
|
||||
|
||||
#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_class class)(
|
||||
#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_typename typename)(
|
||||
|
||||
#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_VARIADIC_class class...
|
||||
#define BOOST_VARIANT_CLASS_OR_TYPENAME_TO_VARIADIC_typename typename...
|
||||
|
||||
#define ARGS_VARIADER_1(x) x ## N...
|
||||
#define ARGS_VARIADER_2(x) BOOST_VARIANT_CLASS_OR_TYPENAME_TO_VARIADIC_ ## x ## N
|
||||
|
||||
#define BOOST_VARIANT_MAKE_VARIADIC(sequence, x) BOOST_VARIANT_MAKE_VARIADIC_I(BOOST_PP_SEQ_SIZE(sequence), x)
|
||||
#define BOOST_VARIANT_MAKE_VARIADIC_I(argscount, x) BOOST_VARIANT_MAKE_VARIADIC_II(argscount, x)
|
||||
#define BOOST_VARIANT_MAKE_VARIADIC_II(argscount, orig) ARGS_VARIADER_ ## argscount(orig)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// BOOST_VARIANT_ENUM_PARAMS and BOOST_VARIANT_ENUM_SHIFTED_PARAMS
|
||||
//
|
||||
// Convenience macro for enumeration of variant params.
|
||||
// When variadic templates are available expands:
|
||||
// BOOST_VARIANT_ENUM_PARAMS(class Something) => class Something0, class... SomethingN
|
||||
// BOOST_VARIANT_ENUM_PARAMS(typename Something) => typename Something0, typename... SomethingN
|
||||
// BOOST_VARIANT_ENUM_PARAMS(Something) => Something0, SomethingN...
|
||||
// BOOST_VARIANT_ENUM_PARAMS(Something) => Something0, SomethingN...
|
||||
// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(class Something) => class... SomethingN
|
||||
// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(typename Something) => typename... SomethingN
|
||||
// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(Something) => SomethingN...
|
||||
// BOOST_VARIANT_ENUM_SHIFTED_PARAMS(Something) => SomethingN...
|
||||
//
|
||||
// Rationale: Cleaner, simpler code for clients of variant library. Minimal
|
||||
// code modifications to move from C++03 to C++11.
|
||||
//
|
||||
// With BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES defined
|
||||
// will be used BOOST_VARIANT_ENUM_PARAMS and BOOST_VARIANT_ENUM_SHIFTED_PARAMS from below `#else`
|
||||
//
|
||||
|
||||
#define BOOST_VARIANT_ENUM_PARAMS(x) \
|
||||
x ## 0, \
|
||||
BOOST_VARIANT_MAKE_VARIADIC( (BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_ ## x), x) \
|
||||
/**/
|
||||
|
||||
#define BOOST_VARIANT_ENUM_SHIFTED_PARAMS(x) \
|
||||
BOOST_VARIANT_MAKE_VARIADIC( (BOOST_VARIANT_CLASS_OR_TYPENAME_TO_SEQ_ ## x), x) \
|
||||
/**/
|
||||
|
||||
#else // defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_LIMIT_TYPES
|
||||
//
|
||||
// Implementation-defined preprocessor symbol describing the actual
|
||||
// length of variant's pseudo-variadic template parameter list.
|
||||
//
|
||||
#include "boost/mpl/limits/list.hpp"
|
||||
#define BOOST_VARIANT_LIMIT_TYPES \
|
||||
BOOST_MPL_LIMIT_LIST_SIZE
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_RECURSIVE_VARIANT_MAX_ARITY
|
||||
//
|
||||
// Exposes maximum allowed arity of class templates with recursive_variant
|
||||
// arguments. That is,
|
||||
// make_recursive_variant< ..., T<[1], recursive_variant_, ... [N]> >.
|
||||
//
|
||||
#include "boost/mpl/limits/arity.hpp"
|
||||
#define BOOST_VARIANT_RECURSIVE_VARIANT_MAX_ARITY \
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_ENUM_PARAMS
|
||||
//
|
||||
// Convenience macro for enumeration of BOOST_VARIANT_LIMIT_TYPES params.
|
||||
//
|
||||
// Rationale: Cleaner, simpler code for clients of variant library.
|
||||
//
|
||||
#define BOOST_VARIANT_ENUM_PARAMS( param ) \
|
||||
BOOST_PP_ENUM_PARAMS(BOOST_VARIANT_LIMIT_TYPES, param)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// macro BOOST_VARIANT_ENUM_SHIFTED_PARAMS
|
||||
//
|
||||
// Convenience macro for enumeration of BOOST_VARIANT_LIMIT_TYPES-1 params.
|
||||
//
|
||||
#define BOOST_VARIANT_ENUM_SHIFTED_PARAMS( param ) \
|
||||
BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_VARIANT_LIMIT_TYPES, param)
|
||||
|
||||
#endif // BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES workaround
|
||||
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail { namespace variant {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) class void_ and class template convert_void
|
||||
//
|
||||
// Provides the mechanism by which void(NN) types are converted to
|
||||
// mpl::void_ (and thus can be passed to mpl::list).
|
||||
//
|
||||
// Rationale: This is particularly needed for the using-declarations
|
||||
// workaround (below), but also to avoid associating mpl namespace with
|
||||
// variant in argument dependent lookups (which used to happen because of
|
||||
// defaulting of template parameters to mpl::void_).
|
||||
//
|
||||
|
||||
struct void_;
|
||||
|
||||
template <typename T>
|
||||
struct convert_void
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct convert_void< void_ >
|
||||
{
|
||||
typedef mpl::na type;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (workaround) BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
//
|
||||
// Needed to work around compilers that don't support using-declaration
|
||||
// overloads. (See the variant::initializer workarounds below.)
|
||||
//
|
||||
|
||||
#if defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
// (detail) tags voidNN -- NN defined on [0, BOOST_VARIANT_LIMIT_TYPES)
|
||||
//
|
||||
// Defines void types that are each unique and specializations of
|
||||
// convert_void that yields mpl::na for each voidNN type.
|
||||
//
|
||||
|
||||
#define BOOST_VARIANT_DETAIL_DEFINE_VOID_N(z,N,_) \
|
||||
struct BOOST_PP_CAT(void,N); \
|
||||
\
|
||||
template <> \
|
||||
struct convert_void< BOOST_PP_CAT(void,N) > \
|
||||
{ \
|
||||
typedef mpl::na type; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_VARIANT_LIMIT_TYPES
|
||||
, BOOST_VARIANT_DETAIL_DEFINE_VOID_N
|
||||
, _
|
||||
)
|
||||
|
||||
#undef BOOST_VARIANT_DETAIL_DEFINE_VOID_N
|
||||
|
||||
#endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
|
||||
|
||||
}} // namespace detail::variant
|
||||
|
||||
#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
# define BOOST_VARIANT_AUX_DECLARE_PARAMS BOOST_VARIANT_ENUM_PARAMS(typename T)
|
||||
#else // defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// (detail) macro BOOST_VARIANT_AUX_DECLARE_PARAM
|
||||
//
|
||||
// Template parameter list for variant and recursive_variant declarations.
|
||||
//
|
||||
|
||||
#if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
|
||||
# define BOOST_VARIANT_AUX_DECLARE_PARAMS_IMPL(z, N, T) \
|
||||
typename BOOST_PP_CAT(T,N) = detail::variant::void_ \
|
||||
/**/
|
||||
|
||||
#else // defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
|
||||
|
||||
# define BOOST_VARIANT_AUX_DECLARE_PARAMS_IMPL(z, N, T) \
|
||||
typename BOOST_PP_CAT(T,N) = BOOST_PP_CAT(detail::variant::void,N) \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE workaround
|
||||
|
||||
#define BOOST_VARIANT_AUX_DECLARE_PARAMS \
|
||||
BOOST_PP_ENUM( \
|
||||
BOOST_VARIANT_LIMIT_TYPES \
|
||||
, BOOST_VARIANT_AUX_DECLARE_PARAMS_IMPL \
|
||||
, T \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES workaround
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class template variant (concept inspired by Andrei Alexandrescu)
|
||||
//
|
||||
// Efficient, type-safe bounded discriminated union.
|
||||
//
|
||||
// Preconditions:
|
||||
// - Each type must be unique.
|
||||
// - No type may be const-qualified.
|
||||
//
|
||||
// Proper declaration form:
|
||||
// variant<types> (where types is a type-sequence)
|
||||
// or
|
||||
// variant<T0,T1,...,Tn> (where T0 is NOT a type-sequence)
|
||||
//
|
||||
template < BOOST_VARIANT_AUX_DECLARE_PARAMS > class variant;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction make_recursive_variant
|
||||
//
|
||||
// Exposes a boost::variant with recursive_variant_ tags (below) substituted
|
||||
// with the variant itself (wrapped as needed with boost::recursive_wrapper).
|
||||
//
|
||||
template < BOOST_VARIANT_AUX_DECLARE_PARAMS > struct make_recursive_variant;
|
||||
|
||||
#undef BOOST_VARIANT_AUX_DECLARE_PARAMS_IMPL
|
||||
#undef BOOST_VARIANT_AUX_DECLARE_PARAMS
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// type recursive_variant_
|
||||
//
|
||||
// Tag type indicates where recursive variant substitution should occur.
|
||||
//
|
||||
#if !defined(BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT)
|
||||
struct recursive_variant_ {};
|
||||
#else
|
||||
typedef mpl::arg<1> recursive_variant_;
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction make_variant_over
|
||||
//
|
||||
// Result is a variant w/ types of the specified type sequence.
|
||||
//
|
||||
template <typename Types> struct make_variant_over;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction make_recursive_variant_over
|
||||
//
|
||||
// Result is a recursive variant w/ types of the specified type sequence.
|
||||
//
|
||||
template <typename Types> struct make_recursive_variant_over;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_VARIANT_FWD_HPP
|
117
boost/variant/visitor_ptr.hpp
Normal file
117
boost/variant/visitor_ptr.hpp
Normal file
|
@ -0,0 +1,117 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// boost variant/visitor_ptr.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002-2003
|
||||
// Eric Friedman
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_VARIANT_VISITOR_PTR_HPP
|
||||
#define BOOST_VARIANT_VISITOR_PTR_HPP
|
||||
|
||||
#include "boost/variant/bad_visit.hpp"
|
||||
#include "boost/variant/static_visitor.hpp"
|
||||
|
||||
#include "boost/mpl/eval_if.hpp"
|
||||
#include "boost/mpl/identity.hpp"
|
||||
#include "boost/throw_exception.hpp"
|
||||
#include "boost/type_traits/add_reference.hpp"
|
||||
#include "boost/type_traits/is_reference.hpp"
|
||||
#include "boost/type_traits/is_void.hpp"
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// function template visitor_ptr
|
||||
//
|
||||
// Adapts a function pointer for use as visitor capable of handling
|
||||
// values of a single type. Throws bad_visit if inappropriately applied.
|
||||
//
|
||||
template <typename T, typename R>
|
||||
class visitor_ptr_t
|
||||
: public static_visitor<R>
|
||||
{
|
||||
private: // representation
|
||||
|
||||
typedef R (*visitor_t)(T);
|
||||
|
||||
visitor_t visitor_;
|
||||
|
||||
public: // typedefs
|
||||
|
||||
typedef R result_type;
|
||||
|
||||
private: // private typedefs
|
||||
|
||||
typedef typename mpl::eval_if<
|
||||
is_reference<T>
|
||||
, mpl::identity<T>
|
||||
, add_reference<const T>
|
||||
>::type argument_fwd_type;
|
||||
|
||||
public: // structors
|
||||
|
||||
explicit visitor_ptr_t(visitor_t visitor) BOOST_NOEXCEPT
|
||||
: visitor_(visitor)
|
||||
{
|
||||
}
|
||||
|
||||
public: // static visitor interfaces
|
||||
|
||||
template <typename U>
|
||||
result_type operator()(const U&) const
|
||||
{
|
||||
boost::throw_exception(bad_visit());
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_VOID_RETURNS)
|
||||
|
||||
public: // static visitor interfaces, cont.
|
||||
|
||||
result_type operator()(argument_fwd_type operand) const
|
||||
{
|
||||
return visitor_(operand);
|
||||
}
|
||||
|
||||
#else // defined(BOOST_NO_VOID_RETURNS)
|
||||
|
||||
private: // helpers, for static visitor interfaces (below)
|
||||
|
||||
result_type execute_impl(argument_fwd_type operand, mpl::false_) const
|
||||
{
|
||||
return visitor_(operand);
|
||||
}
|
||||
|
||||
BOOST_VARIANT_AUX_RETURN_VOID_TYPE
|
||||
execute_impl(argument_fwd_type operand, mpl::true_) const
|
||||
{
|
||||
visitor_(operand);
|
||||
BOOST_VARIANT_AUX_RETURN_VOID;
|
||||
}
|
||||
|
||||
public: // static visitor interfaces, cont.
|
||||
|
||||
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
|
||||
operator()(argument_fwd_type operand) const
|
||||
{
|
||||
typedef typename is_void<result_type>::type has_void_result;
|
||||
return execute_impl(operand, has_void_result());
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_VOID_RETURNS workaround
|
||||
|
||||
};
|
||||
|
||||
template <typename R, typename T>
|
||||
inline visitor_ptr_t<T,R> visitor_ptr(R (*visitor)(T))
|
||||
{
|
||||
return visitor_ptr_t<T,R>(visitor);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif// BOOST_VISITOR_VISITOR_PTR_HPP
|
Loading…
Reference in a new issue