|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61698 - in trunk/boost/spirit/home/phoenix/statement: . detail
From: dgregor_at_[hidden]
Date: 2010-04-30 03:02:55
Author: dgregor
Date: 2010-04-30 03:02:54 EDT (Fri, 30 Apr 2010)
New Revision: 61698
URL: http://svn.boost.org/trac/boost/changeset/61698
Log:
Move the implementation of
boost::phoenix::detail::ensure_default<Cases>::eval for the default
case so that it comes *after* the definition of the default_case
template.
Text files modified:
trunk/boost/spirit/home/phoenix/statement/detail/switch.hpp | 7 +------
trunk/boost/spirit/home/phoenix/statement/switch.hpp | 13 +++++++++++++
2 files changed, 14 insertions(+), 6 deletions(-)
Modified: trunk/boost/spirit/home/phoenix/statement/detail/switch.hpp
==============================================================================
--- trunk/boost/spirit/home/phoenix/statement/detail/switch.hpp (original)
+++ trunk/boost/spirit/home/phoenix/statement/detail/switch.hpp 2010-04-30 03:02:54 EDT (Fri, 30 Apr 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: trunk/boost/spirit/home/phoenix/statement/switch.hpp
==============================================================================
--- trunk/boost/spirit/home/phoenix/statement/switch.hpp (original)
+++ trunk/boost/spirit/home/phoenix/statement/switch.hpp 2010-04-30 03:02:54 EDT (Fri, 30 Apr 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
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