|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52946 - in trunk/boost/spirit/home: qi/char support
From: hartmut.kaiser_at_[hidden]
Date: 2009-05-12 17:39:50
Author: hkaiser
Date: 2009-05-12 17:39:50 EDT (Tue, 12 May 2009)
New Revision: 52946
URL: http://svn.boost.org/trac/boost/changeset/52946
Log:
Spirit: reverting recent changes
Text files modified:
trunk/boost/spirit/home/qi/char/char.hpp | 8 +-------
trunk/boost/spirit/home/support/attributes.hpp | 31 +++++++------------------------
2 files changed, 8 insertions(+), 31 deletions(-)
Modified: trunk/boost/spirit/home/qi/char/char.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/char/char.hpp (original)
+++ trunk/boost/spirit/home/qi/char/char.hpp 2009-05-12 17:39:50 EDT (Tue, 12 May 2009)
@@ -436,17 +436,11 @@
, tag::char_code<tag::no_case, CharEncoding>
>::value;
- static bool const no_attr =
- !has_modifier<
- Modifiers
- , tag::lazy_eval
- >::value;
-
typedef typename
mpl::if_<
traits::is_string<A0>
, char_set<CharEncoding, no_case>
- , literal_char<CharEncoding, no_attr, no_case>
+ , literal_char<CharEncoding, false, no_case>
>::type
result_type;
Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2009-05-12 17:39:50 EDT (Tue, 12 May 2009)
@@ -23,7 +23,6 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/end.hpp>
-#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/find_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/variant.hpp>
@@ -256,17 +255,15 @@
filter_unused_attributes<Sequence>::type
filtered_attributes;
- typedef has_no_unused<Sequence> has_no_unused_type;
-
// If the original attribute list does not contain any unused
// attributes, it is used, otherwise a single unused_type is
// pushed to the front of the list. This is to make sure that if
// there is an unused_type in the list, it is the first one.
typedef typename
mpl::eval_if<
- has_no_unused_type
- , mpl::identity<Sequence>
- , fusion::result_of::push_front<filtered_attributes, unused_type>
+ has_no_unused<Sequence>,
+ mpl::identity<Sequence>,
+ fusion::result_of::push_front<filtered_attributes, unused_type>
>::type
attribute_sequence;
@@ -281,27 +278,13 @@
>::type
new_sequence;
- // If there is only an unused_type and one other type in the list of
- // types we strip off the variant. IOTW, we collapse single element
- // variants, variant<unused_type, T> to T.
- typedef typename
- mpl::eval_if<
- mpl::and_<
- mpl::equal_to<mpl::size<new_sequence>, mpl::int_<2> >
- , mpl::not_<has_no_unused_type> >
- , fusion::result_of::pop_front<new_sequence>
- , mpl::identity<new_sequence>
- >::type
- shortened_type;
-
// If there is only one type in the list of types we strip off the
- // variant as well. IOTW, we collapse single element variants,
- // variant<T> to T.
+ // variant. IOTW, collapse single element variants, variant<T> to T.
typedef typename
mpl::eval_if<
- mpl::equal_to<mpl::size<shortened_type>, mpl::int_<1> >,
- mpl::front<shortened_type>,
- spirit::detail::as_variant<shortened_type>
+ mpl::equal_to<mpl::size<new_sequence>, mpl::int_<1> >,
+ mpl::deref<mpl::front<attribute_sequence> >,
+ spirit::detail::as_variant<new_sequence>
>::type
type;
};
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