|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58492 - trunk/boost/spirit/home/support/nonterminal
From: hartmut.kaiser_at_[hidden]
Date: 2009-12-22 11:07:07
Author: hkaiser
Date: 2009-12-22 11:07:06 EST (Tue, 22 Dec 2009)
New Revision: 58492
URL: http://svn.boost.org/trac/boost/changeset/58492
Log:
Spirit: expanded the quick hack to include strings
Text files modified:
trunk/boost/spirit/home/support/nonterminal/expand_arg.hpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Modified: trunk/boost/spirit/home/support/nonterminal/expand_arg.hpp
==============================================================================
--- trunk/boost/spirit/home/support/nonterminal/expand_arg.hpp (original)
+++ trunk/boost/spirit/home/support/nonterminal/expand_arg.hpp 2009-12-22 11:07:06 EST (Tue, 22 Dec 2009)
@@ -12,10 +12,12 @@
#endif
#include <boost/mpl/bool.hpp>
+#include <boost/mpl/or.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/type_traits/is_scalar.hpp>
+#include <boost/spirit/home/support/string_traits.hpp>
namespace boost { namespace spirit { namespace detail
{
@@ -30,7 +32,7 @@
// can be called given unused context.
typedef typename
mpl::eval_if<
- is_scalar<T>
+ mpl::or_<is_scalar<T>, traits::is_string<T> >
, mpl::identity<T const &>
, boost::result_of<T(unused_type, Context)>
>::type
@@ -71,7 +73,7 @@
typename result_type<T>::type
operator()(T const& x) const
{
- return call(x, is_scalar<T>());
+ return call(x, mpl::or_<is_scalar<T>, traits::is_string<T> >());
}
Context& context;
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