Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61870 - in branches/release: boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/karma/string boost/spirit/home/phoenix/statement boost/spirit/home/phoenix/statement/detail boost/spirit/home/qi/nonterminal boost/spirit/home/support libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi
From: dgregor_at_[hidden]
Date: 2010-05-08 21:58:34


Author: dgregor
Date: 2010-05-08 21:58:32 EDT (Sat, 08 May 2010)
New Revision: 61870
URL: http://svn.boost.org/trac/boost/changeset/61870

Log:
Merge standards-conformance fixes for Boost.Spirit to trunk
Properties modified:
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (props changed)
   branches/release/libs/spirit/ (props changed)
   branches/release/libs/spirit/classic/example/ (props changed)
   branches/release/libs/spirit/doc/ (props changed)
   branches/release/libs/spirit/example/ (props changed)
   branches/release/libs/spirit/phoenix/ (props changed)
   branches/release/libs/spirit/test/ (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp (props changed)
Text files modified:
   branches/release/boost/spirit/home/karma/string/symbols.hpp | 4 ++--
   branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp | 7 +------
   branches/release/boost/spirit/home/phoenix/statement/switch.hpp | 13 +++++++++++++
   branches/release/boost/spirit/home/qi/nonterminal/debug_handler.hpp | 16 +++++++++++++++-
   4 files changed, 31 insertions(+), 9 deletions(-)

Modified: branches/release/boost/spirit/home/karma/string/symbols.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/string/symbols.hpp (original)
+++ branches/release/boost/spirit/home/karma/string/symbols.hpp 2010-05-08 21:58:32 EDT (Sat, 08 May 2010)
@@ -404,14 +404,14 @@
         }
 
         template <typename Attr>
- value_type* find(Attr const& attr)
+ value_type find(Attr const& attr)
         {
             typename Lookup::iterator it = lookup->find(attr);
             return (it != lookup->end()) ? &unused : 0;
         }
 
         template <typename Attr>
- value_type& at(Attr const& attr)
+ value_type at(Attr const& attr)
         {
             typename Lookup::iterator it = lookup->find(attr);
             if (it == lookup->end())

Modified: branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp (original)
+++ branches/release/boost/spirit/home/phoenix/statement/detail/switch.hpp 2010-05-08 21:58:32 EDT (Sat, 08 May 2010)
@@ -119,12 +119,7 @@
             type;
 
             static type
- eval(Cases const& cases, mpl::false_)
- {
- actor<default_case<actor<null_actor> > > default_
- = default_case<actor<null_actor> >(nothing);
- return fusion::push_front(cases, default_);
- }
+ eval(Cases const& cases, mpl::false_);
 
             static type
             eval(Cases const& cases, mpl::true_)

Modified: branches/release/boost/spirit/home/phoenix/statement/switch.hpp
==============================================================================
--- branches/release/boost/spirit/home/phoenix/statement/switch.hpp (original)
+++ branches/release/boost/spirit/home/phoenix/statement/switch.hpp 2010-05-08 21:58:32 EDT (Sat, 08 May 2010)
@@ -146,6 +146,19 @@
         return detail::compose_case_b<Seq, D>::eval(
             seq, static_cast<D const&>(case_));
     }
+
+ // Implementation of routines in detail/switch.hpp that depend on
+ // the completeness of default_case.
+ namespace detail {
+ template <typename Cases>
+ typename ensure_default<Cases>::type
+ ensure_default<Cases>::eval(Cases const& cases, mpl::false_)
+ {
+ actor<default_case<actor<null_actor> > > default_
+ = default_case<actor<null_actor> >(nothing);
+ return fusion::push_front(cases, default_);
+ }
+ }
 }}
 
 #endif

Modified: branches/release/boost/spirit/home/qi/nonterminal/debug_handler.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/nonterminal/debug_handler.hpp (original)
+++ branches/release/boost/spirit/home/qi/nonterminal/debug_handler.hpp 2010-05-08 21:58:32 EDT (Sat, 08 May 2010)
@@ -97,6 +97,18 @@
 
     struct simple_trace;
 
+ namespace detail {
+ // This class provides an extra level of indirection through a
+ // template to produce the simple_trace type. This way, the use
+ // of simple_trace below is hidden behind a dependent type, so
+ // that compilers eagerly type-checking template definitions
+ // won't complain that simple_trace is incomplete.
+ template<typename T>
+ struct get_simple_trace {
+ typedef simple_trace type;
+ };
+ }
+
     template <typename Iterator, typename T0, typename T1, typename T2>
     void debug(rule<Iterator, T0, T1, T2>& r)
     {
@@ -109,7 +121,9 @@
               , typename rule_type::skipper_type
               , simple_trace>
         debug_handler;
- r.f = debug_handler(r.f, simple_trace(), r.name());
+
+ typedef typename qi::detail::get_simple_trace<Iterator>::type trace;
+ r.f = debug_handler(r.f, trace(), r.name());
     }
 
 }}}


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