|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55401 - trunk/boost/spirit/home/karma/operator
From: hartmut.kaiser_at_[hidden]
Date: 2009-08-04 09:12:37
Author: hkaiser
Date: 2009-08-04 09:12:35 EDT (Tue, 04 Aug 2009)
New Revision: 55401
URL: http://svn.boost.org/trac/boost/changeset/55401
Log:
Spirit: reverted latest experimental change to optional
Text files modified:
trunk/boost/spirit/home/karma/operator/optional.hpp | 25 ++-----------------------
1 files changed, 2 insertions(+), 23 deletions(-)
Modified: trunk/boost/spirit/home/karma/operator/optional.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/operator/optional.hpp (original)
+++ trunk/boost/spirit/home/karma/operator/optional.hpp 2009-08-04 09:12:35 EDT (Tue, 04 Aug 2009)
@@ -76,25 +76,6 @@
{
return unused;
}
-
- ///////////////////////////////////////////////////////////////////////
- template <
- typename OutputIterator, typename Context, typename Delimiter
- , typename Attribute, typename Subject>
- void generate_optional(OutputIterator& sink, Context& ctx
- , Delimiter const& d, Attribute const& attr, Subject const& subject
- , mpl::true_)
- {
- if (optional_is_valid(attr))
- subject.generate(sink, ctx, d, detail::optional_get(attr));
- }
-
- template <
- typename OutputIterator, typename Context, typename Delimiter
- , typename Attribute, typename Subject>
- void generate_optional(OutputIterator&, Context&, Delimiter const&
- , Attribute const&, Subject const&, mpl::false_)
- {}
}
///////////////////////////////////////////////////////////////////////////
@@ -126,10 +107,8 @@
bool generate(OutputIterator& sink, Context& ctx
, Delimiter const& d, Attribute const& attr) const
{
- typedef is_convertible<Attribute
- , typename attribute<Context>::type> predicate;
-
- detail::generate_optional(sink, ctx, d, attr, subject, predicate());
+ if (detail::optional_is_valid(attr))
+ subject.generate(sink, ctx, d, detail::optional_get(attr));
return sink_is_good(sink);
}
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