|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2008-08-26 20:18:20
Author: hkaiser
Date: 2008-08-26 20:18:19 EDT (Tue, 26 Aug 2008)
New Revision: 48400
URL: http://svn.boost.org/trac/boost/changeset/48400
Log:
Spirit.Lex: Fixed a problem with in_state()
Text files modified:
trunk/boost/spirit/home/lex/qi/state/in_state.hpp | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
Modified: trunk/boost/spirit/home/lex/qi/state/in_state.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/qi/state/in_state.hpp (original)
+++ trunk/boost/spirit/home/lex/qi/state/in_state.hpp 2008-08-26 20:18:19 EDT (Tue, 26 Aug 2008)
@@ -22,7 +22,7 @@
{
String name;
};
-
+
///////////////////////////////////////////////////////////////////////////
// These are the different overloads allowed for the in_state(...)
// construct
@@ -33,23 +33,26 @@
proto::terminal<in_state_tag<char const*> >::type that = {{s}};
return that;
}
-
+
inline proto::terminal<in_state_tag<wchar_t const*> >::type
in_state(wchar_t const *s)
{
proto::terminal<in_state_tag<wchar_t const*> >::type that = {{s}};
return that;
}
-
+
template <typename Char, typename Traits, typename Allocator>
- inline proto::terminal<in_state_tag<char const*> >::type
+ inline typename proto::terminal<in_state_tag<Char const*> >::type
in_state(std::basic_string<Char, Traits, Allocator> const& s)
{
- typename proto::terminal<in_state_tag<Char const*> >::type that =
- {{s.c_str()}};
+ typedef std::basic_string<Char, Traits, Allocator> string_type;
+
+ typename proto::terminal<in_state_tag<string_type> >::type that;
+ that.s = s;
+
return that;
}
-
+
///////////////////////////////////////////////////////////////////////////
// The following is a helper template allowing to use the in_state()[] as
// a skip parser
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk