|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61254 - in trunk/boost/spirit/home: karma/detail qi/detail support
From: hartmut.kaiser_at_[hidden]
Date: 2010-04-13 14:50:50
Author: hkaiser
Date: 2010-04-13 14:50:50 EDT (Tue, 13 Apr 2010)
New Revision: 61254
URL: http://svn.boost.org/trac/boost/changeset/61254
Log:
Spirit: refined not_is_variant and not_is_optional
Text files modified:
trunk/boost/spirit/home/karma/detail/alternative_function.hpp | 8 ++++----
trunk/boost/spirit/home/qi/detail/alternative_function.hpp | 4 ++--
trunk/boost/spirit/home/support/attributes.hpp | 34 +++++++++++++++++-----------------
3 files changed, 23 insertions(+), 23 deletions(-)
Modified: trunk/boost/spirit/home/karma/detail/alternative_function.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/alternative_function.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/alternative_function.hpp 2010-04-13 14:50:50 EDT (Tue, 13 Apr 2010)
@@ -77,7 +77,7 @@
template <typename Component, typename Attribute, typename Expected>
struct alternative_generate<Component, Attribute, Expected
, typename enable_if<
- traits::compute_compatible_component<Expected, Attribute> >::type>
+ traits::compute_compatible_component<Expected, Attribute, karma::domain> >::type>
{
template <typename OutputIterator, typename Context, typename Delimiter>
static bool
@@ -88,7 +88,7 @@
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
#endif
return call(component, sink, ctx, d, attr
- , spirit::traits::not_is_variant<Attribute>());
+ , spirit::traits::not_is_variant<Attribute, karma::domain>());
}
template <typename OutputIterator, typename Context, typename Delimiter>
@@ -111,7 +111,7 @@
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
#endif
typedef
- traits::compute_compatible_component<Expected, Attribute>
+ traits::compute_compatible_component<Expected, Attribute, domain>
component_type;
typedef typename component_type::distance distance_type;
@@ -195,4 +195,4 @@
}}}}
-#endif
+#endif
\ No newline at end of file
Modified: trunk/boost/spirit/home/qi/detail/alternative_function.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/alternative_function.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/alternative_function.hpp 2010-04-13 14:50:50 EDT (Tue, 13 Apr 2010)
@@ -59,8 +59,8 @@
// return true if the parser succeeds
return call(component,
mpl::and_<
- spirit::traits::not_is_variant<Attribute>,
- spirit::traits::not_is_optional<Attribute>
+ spirit::traits::not_is_variant<Attribute, qi::domain>,
+ spirit::traits::not_is_optional<Attribute, qi::domain>
>());
}
Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2010-04-13 14:50:50 EDT (Tue, 13 Apr 2010)
@@ -67,19 +67,19 @@
>::type>
: mpl::true_ {};
- template <typename T>
+ template <typename T, typename Domain>
struct not_is_variant
: mpl::true_
{};
- template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
- struct not_is_variant<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
+ template <BOOST_VARIANT_ENUM_PARAMS(typename T), typename Domain>
+ struct not_is_variant<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Domain>
: mpl::false_
{};
- template <typename T>
- struct not_is_variant<boost::optional<T> >
- : not_is_variant<T>
+ template <typename T, typename Domain>
+ struct not_is_variant<boost::optional<T>, Domain>
+ : not_is_variant<T, Domain>
{};
// we treat every type as if it where the variant (as this meta function is
@@ -153,31 +153,31 @@
compatible_type;
};
- template <typename Expected, typename Attribute>
+ template <typename Expected, typename Attribute, typename Domain>
struct compute_compatible_component
: compute_compatible_component_variant<Expected, Attribute
- , typename spirit::traits::not_is_variant<Attribute>::type> {};
+ , typename spirit::traits::not_is_variant<Attribute, Domain>::type> {};
- template <typename Expected>
- struct compute_compatible_component<Expected, unused_type>
+ template <typename Expected, typename Domain>
+ struct compute_compatible_component<Expected, unused_type, Domain>
: mpl::false_ {};
- template <typename Attribute>
- struct compute_compatible_component<unused_type, Attribute>
+ template <typename Attribute, typename Domain>
+ struct compute_compatible_component<unused_type, Attribute, Domain>
: mpl::false_ {};
- template <>
- struct compute_compatible_component<unused_type, unused_type>
+ template <typename Domain>
+ struct compute_compatible_component<unused_type, unused_type, Domain>
: mpl::false_ {};
///////////////////////////////////////////////////////////////////////////
- template <typename T>
+ template <typename T, typename Domain>
struct not_is_optional
: mpl::true_
{};
- template <typename T>
- struct not_is_optional<boost::optional<T> >
+ template <typename T, typename Domain>
+ struct not_is_optional<boost::optional<T>, Domain>
: mpl::false_
{};
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