update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -3,8 +3,8 @@
// 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)
#if !defined(SPIRIT_LEX_ACTION_NOV_18_2007_0743PM)
#define SPIRIT_LEX_ACTION_NOV_18_2007_0743PM
#ifndef BOOST_SPIRIT_LEX_LEXER_ACTION_HPP
#define BOOST_SPIRIT_LEX_LEXER_ACTION_HPP
#if defined(_MSC_VER)
#pragma once
@@ -50,10 +50,6 @@ namespace boost { namespace spirit { namespace lex
Subject subject;
Action f;
private:
// silence MSVC warning C4512: assignment operator could not be generated
action& operator= (action const&);
};
}}}

View File

@@ -22,7 +22,9 @@
#include <boost/noncopyable.hpp>
#include <boost/fusion/include/vector.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/proto/extends.hpp>
#include <boost/proto/traits.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <iterator> // for std::iterator_traits
#include <string>
@@ -32,6 +34,10 @@ namespace boost { namespace spirit { namespace lex
namespace detail
{
///////////////////////////////////////////////////////////////////////
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated.
#endif
template <typename LexerDef>
struct lexer_def_
: proto::extends<
@@ -180,10 +186,6 @@ namespace boost { namespace spirit { namespace lex
// }
lexer_def_& def;
private:
// silence MSVC warning C4512: assignment operator could not be generated
adder& operator= (adder const&);
};
friend struct adder;
@@ -202,10 +204,6 @@ namespace boost { namespace spirit { namespace lex
}
lexer_def_& def;
private:
// silence MSVC warning C4512: assignment operator could not be generated
pattern_adder& operator= (pattern_adder const&);
};
friend struct pattern_adder;
@@ -235,19 +233,19 @@ namespace boost { namespace spirit { namespace lex
{}
// allow to switch states
lexer_def_ operator()(char_type const* state) const
lexer_def_ operator()(char_type const* state_) const
{
return lexer_def_(def, state);
return lexer_def_(def, state_);
}
lexer_def_ operator()(char_type const* state
, char_type const* targetstate) const
lexer_def_ operator()(char_type const* state_
, char_type const* targetstate_) const
{
return lexer_def_(def, state, targetstate);
return lexer_def_(def, state_, targetstate_);
}
lexer_def_ operator()(string_type const& state
, string_type const& targetstate = string_type()) const
lexer_def_ operator()(string_type const& state_
, string_type const& targetstate_ = string_type()) const
{
return lexer_def_(def, state, targetstate);
return lexer_def_(def, state_, targetstate_);
}
// allow to assign a token definition expression
@@ -267,9 +265,9 @@ namespace boost { namespace spirit { namespace lex
// explicitly tell the lexer that the given state will be defined
// (useful in conjunction with "*")
std::size_t add_state(char_type const* state = 0)
std::size_t add_state(char_type const* state_ = 0)
{
return def.add_state(state ? state : def.initial_state().c_str());
return def.add_state(state_ ? state_ : def.initial_state().c_str());
}
adder add;
@@ -279,11 +277,10 @@ namespace boost { namespace spirit { namespace lex
LexerDef& def;
string_type state;
string_type targetstate;
private:
// silence MSVC warning C4512: assignment operator could not be generated
lexer_def_& operator= (lexer_def_ const&);
};
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
// allow to assign a token definition expression

View File

@@ -77,6 +77,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
friend class FunctorData<Iterator, SupportsActors, SupportsState
, token_value_type>;
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated.
#endif
// Helper template allowing to assign a value on exit
template <typename T>
struct assign_on_exit
@@ -91,11 +95,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
T& dst_;
T const& src_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
assign_on_exit& operator= (assign_on_exit const&);
};
#ifdef _MSC_VER
# pragma warning(pop)
#endif
public:
functor() {}

View File

@@ -17,10 +17,15 @@
#include <boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp>
#include <boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp>
#include <boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp>
#include <boost/spirit/home/support/assert_msg.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/optional.hpp>
#include <iterator> // for std::iterator_traits
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace spirit { namespace lex { namespace lexertl
{
namespace detail
@@ -66,15 +71,12 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
template <typename Char>
void set_state_name (Char const*)
{
// some (random) versions of gcc instantiate this function even if it's not
// needed leading to false static asserts
#if !defined(__GNUC__)
// If you see a compile time assertion below you're probably
// using a token type not supporting lexer states (the 3rd
// template parameter of the token is mpl::false_), but your
// code uses state changes anyways.
BOOST_STATIC_ASSERT(false);
#endif
BOOST_SPIRIT_ASSERT_FAIL(Char,
tried_to_set_state_of_stateless_token, ());
}
char_type const* get_state_name() const { return rules_.initial(); }
std::size_t get_state_id (char_type const*) const
@@ -192,10 +194,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
boost::lexer::basic_rules<char_type> const& rules_;
bool bol_; // helper storing whether last character was \n
private:
// silence MSVC warning C4512: assignment operator could not be generated
data& operator= (data const&);
};
///////////////////////////////////////////////////////////////////////
@@ -265,10 +263,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
protected:
std::size_t state_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
data& operator= (data const&);
};
///////////////////////////////////////////////////////////////////////
@@ -300,7 +294,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
template <typename IterData>
data (IterData const& data_, Iterator& first, Iterator const& last)
: base_type(data_, first, last)
, actions_(data_.actions_), hold_()
, actions_(data_.actions_), hold_(), end_()
, value_(iterator_range<Iterator>(last, last))
, has_value_(false), has_hold_(false) {}
@@ -401,10 +395,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
mutable TokenValue value_; // token value to use
mutable bool has_value_; // 'true' if value_ is valid
bool has_hold_; // 'true' if hold_ is valid
private:
// silence MSVC warning C4512: assignment operator could not be generated
data& operator= (data const&);
};
///////////////////////////////////////////////////////////////////////
@@ -541,13 +531,12 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
mutable token_value_type value_; // token value to use
mutable bool has_value_; // 'true' if value_ is valid
bool has_hold_; // 'true' if hold_ is valid
private:
// silence MSVC warning C4512: assignment operator could not be generated
data& operator= (data const&);
};
}
}}}}
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#endif

View File

@@ -18,8 +18,9 @@
#include <boost/spirit/home/support/detail/lexer/state_machine.hpp>
#include <boost/spirit/home/support/detail/lexer/debug.hpp>
#include <boost/spirit/home/lex/lexer/lexertl/static_version.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/scoped_array.hpp>
#include <cstring>
#include <locale>
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace lex { namespace lexertl
@@ -755,7 +756,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
for (/**/; t_ < transitions_; ++t_)
{
Char const *ptr_ = iter_->token._charset.c_str();
Char const *end_ = ptr_ + iter_->token._charset.size();
Char const *end2_ = ptr_ + iter_->token._charset.size();
Char start_char_ = 0;
Char curr_char_ = 0;
bool range_ = false;
@@ -763,7 +764,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
os_ << "\n if (";
while (ptr_ != end_)
while (ptr_ != end2_)
{
curr_char_ = *ptr_++;
@@ -903,7 +904,14 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
guard.replace(p, 1, L<Char>("_"));
p = guard.find_first_of(L<Char>(": "), p);
}
boost::to_upper(guard);
{ // to_upper(guard)
typedef std::ctype<Char> facet_t;
facet_t const& facet = std::use_facet<facet_t>(std::locale());
typedef typename std::basic_string<Char>::iterator iter_t;
for (iter_t iter = guard.begin(),
last = guard.end(); iter != last; ++iter)
*iter = facet.toupper(*iter);
}
os_ << "#if !defined(BOOST_SPIRIT_LEXER_NEXT_TOKEN_" << guard << ")\n";
os_ << "#define BOOST_SPIRIT_LEXER_NEXT_TOKEN_" << guard << "\n\n";

View File

@@ -101,7 +101,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
return unique_functor_type::set_state(*this, state);
}
// get the curent state for the underlying lexer object
// get the current state for the underlying lexer object
std::size_t get_state()
{
return unique_functor_type::get_state(*this);

View File

@@ -25,8 +25,6 @@
#include <boost/spirit/home/support/detail/lexer/debug.hpp>
#endif
#include <boost/foreach.hpp>
#include <iterator> // for std::iterator_traits
namespace boost { namespace spirit { namespace lex { namespace lexertl
@@ -172,6 +170,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
typedef iterator<Functor> iterator_type;
private:
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated.
#endif
// this type is purely used for the iterator_type construction below
struct iterator_data_type
{
@@ -187,11 +189,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
boost::lexer::basic_state_machine<char_type> const& state_machine_;
boost::lexer::basic_rules<char_type> const& rules_;
semantic_actions_type const& actions_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
iterator_data_type& operator= (iterator_data_type const&);
};
#ifdef _MSC_VER
# pragma warning(pop)
#endif
public:
// Return the start iterator usable for iterating over the generated
@@ -303,13 +304,14 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
if (state == all_states_id) {
// add the action to all known states
typedef typename
basic_rules_type::string_size_t_map::value_type
state_type;
basic_rules_type::string_size_t_map::const_iterator
state_iterator;
std::size_t states = rules_.statemap().size();
BOOST_FOREACH(state_type const& s, rules_.statemap()) {
for (state_iterator it = rules_.statemap().begin(),
end = rules_.statemap().end(); it != end; ++it) {
for (std::size_t j = 0; j < states; ++j)
actions_.add_action(unique_id + j, s.second, wrapper_type::call(act));
actions_.add_action(unique_id + j, it->second, wrapper_type::call(act));
}
}
else {

View File

@@ -33,7 +33,7 @@
#include <boost/mpl/if.hpp>
#include <boost/mpl/or.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/static_assert.hpp>
#if defined(BOOST_SPIRIT_DEBUG)
@@ -858,8 +858,8 @@ namespace boost { namespace spirit { namespace traits
, lex::lexertl::position_token<Iterator, lex::omit, HasState, Idtype> >
{
static void
call(lex::lexertl::position_token<Iterator, lex::omit, HasState, Idtype> const& t
, Attribute& attr)
call(lex::lexertl::position_token<Iterator, lex::omit, HasState, Idtype> const&
, Attribute&)
{
// do nothing
}

View File

@@ -16,22 +16,35 @@
#include <boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp>
#include <boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp>
#include <boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp>
#include <boost/spirit/home/support/assert_msg.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <iterator> // for std::iterator_traits
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated.
#endif
namespace boost { namespace spirit { namespace lex { namespace lexertl
{
namespace detail
{
///////////////////////////////////////////////////////////////////////
template <typename Char>
inline bool zstr_compare(Char const* s1, Char const* s2)
{
for (; *s1 || *s2; ++s1, ++s2)
if (*s1 != *s2)
return false;
return true;
}
template <typename Char, typename F>
inline std::size_t get_state_id(Char const* state, F f
, std::size_t numstates)
{
for (std::size_t i = 0; i < numstates; ++i)
{
if (boost::algorithm::equals(f(i), state))
if (zstr_compare(f(i), state))
return i;
}
return boost::lexer::npos;
@@ -80,15 +93,12 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
template <typename Char>
void set_state_name (Char const*)
{
// some (random) versions of gcc instantiate this function even if it's not
// needed leading to false static asserts
#if !defined(__GNUC__)
// If you see a compile time assertion below you're probably
// using a token type not supporting lexer states (the 3rd
// template parameter of the token is mpl::false_), but your
// code uses state changes anyways.
BOOST_STATIC_ASSERT(false);
#endif
BOOST_SPIRIT_ASSERT_FAIL(Char,
tried_to_set_state_of_stateless_token, ());
}
char_type const* get_state_name() const
{
@@ -185,7 +195,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
std::size_t get_state() const { return 0; }
void set_state(std::size_t) {}
void set_end(Iterator const& it) {}
void set_end(Iterator const&) {}
Iterator& get_first() { return first_; }
Iterator const& get_first() const { return first_; }
@@ -208,10 +218,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
get_state_name_type get_state_name_;
bool bol_; // helper storing whether last character was \n
private:
// silence MSVC warning C4512: assignment operator could not be generated
static_data& operator= (static_data const&);
};
///////////////////////////////////////////////////////////////////////
@@ -283,10 +289,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
protected:
std::size_t state_;
std::size_t num_states_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
static_data& operator= (static_data const&);
};
///////////////////////////////////////////////////////////////////////
@@ -422,10 +424,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
mutable TokenValue value_; // token value to use
mutable bool has_value_; // 'true' if value_ is valid
bool has_hold_; // 'true' if hold_ is valid
private:
// silence MSVC warning C4512: assignment operator could not be generated
static_data& operator= (static_data const&);
};
///////////////////////////////////////////////////////////////////////
@@ -562,12 +560,11 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
mutable token_value_type value_; // token value to use
mutable bool has_value_; // 'true' if value_ is valid
bool has_hold_; // 'true' if hold_ is valid
private:
// silence MSVC warning C4512: assignment operator could not be generated
static_data& operator= (static_data const&);
};
}
}}}}
#ifdef _MSC_VER
# pragma warning(pop)
#endif
#endif

View File

@@ -130,6 +130,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
typedef iterator<Functor> iterator_type;
private:
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated.
#endif
// this type is purely used for the iterator_type construction below
struct iterator_data_type
{
@@ -150,11 +154,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
get_state_name_type get_state_name_;
std::size_t num_states_;
bool bol_;
private:
// silence MSVC warning C4512: assignment operator could not be generated
iterator_data_type& operator= (iterator_data_type const&);
};
#ifdef _MSC_VER
# pragma warning(pop)
#endif
typedef LexerTables tables_type;
@@ -230,7 +233,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
actions_.add_action(unique_id, state, wrapper_type::call(act));
}
bool init_dfa(bool minimize = false) const { return true; }
bool init_dfa(bool /*minimize*/ = false) const { return true; }
private:
typename Functor::semantic_actions_type actions_;

View File

@@ -32,9 +32,9 @@
#include <boost/mpl/vector.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/or.hpp>
#include <boost/type_traits/integral_promotion.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/type_traits/make_unsigned.hpp>
#include <boost/static_assert.hpp>
#if defined(BOOST_SPIRIT_DEBUG)
@@ -127,12 +127,13 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
typedef mpl::false_ has_state;
typedef Idtype id_type;
typedef unused_type token_value_type;
typedef typename make_unsigned<id_type>::type uid_type;
// default constructed tokens correspond to EOI tokens
token() : id_(id_type(boost::lexer::npos)) {}
token() : id_(boost::lexer::npos) {}
// construct an invalid token
explicit token(int) : id_(id_type(0)) {}
explicit token(int) : id_(0) {}
token(id_type id, std::size_t) : id_(id) {}
@@ -155,17 +156,17 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
// this default conversion operator is needed to allow the direct
// usage of tokens in conjunction with the primitive parsers defined
// in Qi
operator id_type() const { return static_cast<id_type>(id_); }
operator id_type() const { return id_type(uid_type(id_)); }
// Retrieve or set the token id of this token instance.
id_type id() const { return static_cast<id_type>(id_); }
void id(id_type newid) { id_ = newid; }
id_type id() const { return id_type(uid_type(id_)); }
void id(id_type newid) { id_ = uid_type(newid); }
std::size_t state() const { return 0; } // always '0' (INITIAL state)
bool is_valid() const
{
return 0 != id_ && id_type(boost::lexer::npos) != id_;
return 0 != id_ && boost::lexer::npos != id_;
}
#if defined(BOOST_SPIRIT_DEBUG)
@@ -187,7 +188,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl
#endif
protected:
typename boost::integral_promotion<id_type>::type id_; // token id, 0 if nothing has been matched
std::size_t id_; // token id, 0 if nothing has been matched
};
#if defined(BOOST_SPIRIT_DEBUG)
@@ -579,8 +580,8 @@ namespace boost { namespace spirit { namespace traits
, lex::lexertl::token<Iterator, lex::omit, HasState, Idtype> >
{
static void
call(lex::lexertl::token<Iterator, lex::omit, HasState, Idtype> const& t
, Attribute& attr)
call(lex::lexertl::token<Iterator, lex::omit, HasState, Idtype> const&
, Attribute&)
{
// do nothing
}

View File

@@ -13,12 +13,10 @@
#pragma once
#endif
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_bind.hpp>
#include <boost/spirit/include/phoenix_scope.hpp>
#include <boost/spirit/home/support/attributes.hpp>
#include <boost/spirit/home/lex/lexer/pass_flags.hpp>
#include <boost/phoenix/core/argument.hpp>
#include <boost/phoenix/bind.hpp>
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace lex { namespace lexertl

View File

@@ -3,8 +3,8 @@
// 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)
#if !defined(SPIRIT_LEX_SEQUENCE_MAR_28_2007_0610PM)
#define SPIRIT_LEX_SEQUENCE_MAR_28_2007_0610PM
#ifndef BOOST_SPIRIT_LEX_LEXER_SEQUENCE_HPP
#define BOOST_SPIRIT_LEX_LEXER_SEQUENCE_HPP
#if defined(_MSC_VER)
#pragma once
@@ -15,6 +15,8 @@
#include <boost/spirit/home/lex/meta_compiler.hpp>
#include <boost/spirit/home/lex/detail/sequence_function.hpp>
#include <boost/fusion/include/any.hpp>
#include <boost/proto/operators.hpp>
#include <boost/proto/tags.hpp>
namespace boost { namespace spirit
{

View File

@@ -3,18 +3,19 @@
// 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)
#if !defined(SPIRIT_LEX_SUPPORT_FUNCTIONS_JUN_08_2009_0211PM)
#define SPIRIT_LEX_SUPPORT_FUNCTIONS_JUN_08_2009_0211PM
#ifndef BOOST_SPIRIT_LEX_LEXER_SUPPORT_FUNCTIONS_HPP
#define BOOST_SPIRIT_LEX_LEXER_SUPPORT_FUNCTIONS_HPP
#if defined(_MSC_VER)
#pragma once
#endif
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp>
#include <boost/spirit/home/lex/lexer/pass_flags.hpp>
#include <boost/spirit/home/lex/lexer/support_functions_expression.hpp>
#include <boost/phoenix/core/actor.hpp>
#include <boost/phoenix/core/as_actor.hpp>
#include <boost/phoenix/core/value.hpp> // includes as_actor specialization
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace spirit { namespace lex

View File

@@ -4,14 +4,16 @@
// 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)
#if !defined(SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM)
#define SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM
#ifndef BOOST_SPIRIT_LEX_LEXER_SUPPORT_FUNCTIONS_EXPRESSION_HPP
#define BOOST_SPIRIT_LEX_LEXER_SUPPORT_FUNCTIONS_EXPRESSION_HPP
#if defined(_MSC_VER)
#pragma once
#endif
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/phoenix/core/expression.hpp>
#include <boost/phoenix/core/v2_eval.hpp>
#include <boost/proto/proto_fwd.hpp> // for transform placeholders
namespace boost { namespace spirit { namespace lex
{

View File

@@ -24,6 +24,8 @@
#include <boost/fusion/include/vector.hpp>
#include <boost/mpl/if.hpp>
#include <boost/proto/extends.hpp>
#include <boost/proto/traits.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/variant.hpp>