summaryrefslogtreecommitdiff
path: root/boost/spirit/home/lex/lexer/lexer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/spirit/home/lex/lexer/lexer.hpp')
-rw-r--r--boost/spirit/home/lex/lexer/lexer.hpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/boost/spirit/home/lex/lexer/lexer.hpp b/boost/spirit/home/lex/lexer/lexer.hpp
index 2406a51be1..c1a9e6ffbf 100644
--- a/boost/spirit/home/lex/lexer/lexer.hpp
+++ b/boost/spirit/home/lex/lexer/lexer.hpp
@@ -34,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<
@@ -182,9 +186,6 @@ namespace boost { namespace spirit { namespace lex
// }
lexer_def_& def;
-
- // silence MSVC warning C4512: assignment operator could not be generated
- BOOST_DELETED_FUNCTION(adder& operator= (adder const&))
};
friend struct adder;
@@ -203,9 +204,6 @@ namespace boost { namespace spirit { namespace lex
}
lexer_def_& def;
-
- // silence MSVC warning C4512: assignment operator could not be generated
- BOOST_DELETED_FUNCTION(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,10 +277,10 @@ namespace boost { namespace spirit { namespace lex
LexerDef& def;
string_type state;
string_type targetstate;
-
- // silence MSVC warning C4512: assignment operator could not be generated
- BOOST_DELETED_FUNCTION(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