Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68865 - in trunk/boost/spirit/home: karma/detail qi/detail support
From: hartmut.kaiser_at_[hidden]
Date: 2011-02-14 11:54:11


Author: hkaiser
Date: 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
New Revision: 68865
URL: http://svn.boost.org/trac/boost/changeset/68865

Log:
Spirit: disambiguated boost::optional
Text files modified:
   trunk/boost/spirit/home/karma/detail/extract_from.hpp | 8 ++++----
   trunk/boost/spirit/home/karma/detail/pass_container.hpp | 6 +++---
   trunk/boost/spirit/home/qi/detail/assign_to.hpp | 8 ++++----
   trunk/boost/spirit/home/qi/detail/attributes.hpp | 10 +++++-----
   trunk/boost/spirit/home/qi/detail/pass_container.hpp | 6 +++---
   trunk/boost/spirit/home/support/attributes.hpp | 10 +++++-----
   trunk/boost/spirit/home/support/container.hpp | 16 ++++++++--------
   7 files changed, 32 insertions(+), 32 deletions(-)

Modified: trunk/boost/spirit/home/karma/detail/extract_from.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/extract_from.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/extract_from.hpp 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
@@ -80,24 +80,24 @@
 
     // This handles optional attributes.
     template <typename Attribute, typename Exposed>
- struct extract_from_attribute<optional<Attribute>, Exposed>
+ struct extract_from_attribute<boost::optional<Attribute>, Exposed>
     {
         typedef Attribute const& type;
 
         template <typename Context>
- static type call(optional<Attribute> const& attr, Context& ctx)
+ static type call(boost::optional<Attribute> const& attr, Context& ctx)
         {
             return extract_from<Exposed>(boost::get<Attribute>(attr), ctx);
         }
     };
 
     template <typename Attribute, typename Exposed>
- struct extract_from_attribute<optional<Attribute const>, Exposed>
+ struct extract_from_attribute<boost::optional<Attribute const>, Exposed>
     {
         typedef Attribute const& type;
 
         template <typename Context>
- static type call(optional<Attribute const> const& attr, Context& ctx)
+ static type call(boost::optional<Attribute const> const& attr, Context& ctx)
         {
             return extract_from<Exposed>(boost::get<Attribute const>(attr), ctx);
         }

Modified: trunk/boost/spirit/home/karma/detail/pass_container.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/pass_container.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/pass_container.hpp 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
@@ -44,15 +44,15 @@
> {};
 
     template <typename RHS, typename T>
- struct has_same_elements<RHS, optional<T>, false, false>
+ struct has_same_elements<RHS, boost::optional<T>, false, false>
       : has_same_elements<RHS, T> {};
 
     template <typename RHS, typename T>
- struct has_same_elements<RHS, optional<T>, true, false>
+ struct has_same_elements<RHS, boost::optional<T>, true, false>
       : has_same_elements<RHS, T> {};
 
     template <typename RHS, typename T>
- struct has_same_elements<RHS, optional<T>, false, true>
+ struct has_same_elements<RHS, boost::optional<T>, false, true>
       : has_same_elements<RHS, T> {};
 
 #define BOOST_SPIRIT_IS_CONVERTIBLE(z, N, data) \

Modified: trunk/boost/spirit/home/qi/detail/assign_to.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/assign_to.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/assign_to.hpp 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
@@ -149,10 +149,10 @@
     };
 
     template <typename Attribute>
- struct assign_to_attribute_from_value<optional<Attribute>, unused_type>
+ struct assign_to_attribute_from_value<boost::optional<Attribute>, unused_type>
     {
         static void
- call(unused_type, optional<Attribute> const&)
+ call(unused_type, boost::optional<Attribute> const&)
         {
         }
     };
@@ -231,10 +231,10 @@
     };
 
     template <typename Attribute>
- struct assign_to_container_from_value<optional<Attribute>, unused_type>
+ struct assign_to_container_from_value<boost::optional<Attribute>, unused_type>
     {
         static void
- call(unused_type, optional<Attribute> const&)
+ call(unused_type, boost::optional<Attribute> const&)
         {
         }
     };

Modified: trunk/boost/spirit/home/qi/detail/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/attributes.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/attributes.hpp 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
@@ -77,18 +77,18 @@
     {};
 
     template <typename Exposed, typename Transformed>
- struct transform_attribute<optional<Exposed>, Transformed
- , typename disable_if<is_same<optional<Exposed>, Transformed> >::type>
+ struct transform_attribute<boost::optional<Exposed>, Transformed
+ , typename disable_if<is_same<boost::optional<Exposed>, Transformed> >::type>
     {
         typedef Transformed& type;
- static Transformed& pre(optional<Exposed>& val)
+ static Transformed& pre(boost::optional<Exposed>& val)
         {
             if (!val)
                 val = Transformed();
             return boost::get<Transformed>(val);
         }
- static void post(optional<Exposed>&, Transformed const&) {}
- static void fail(optional<Exposed>& val)
+ static void post(boost::optional<Exposed>&, Transformed const&) {}
+ static void fail(boost::optional<Exposed>& val)
         {
              val = none_t(); // leave optional uninitialized if rhs failed
         }

Modified: trunk/boost/spirit/home/qi/detail/pass_container.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/pass_container.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/pass_container.hpp 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
@@ -39,15 +39,15 @@
       : is_convertible<typename RHSAttribute::value_type, LHS> {};
 
     template <typename LHS, typename T>
- struct has_same_elements<LHS, optional<T>, false, false>
+ struct has_same_elements<LHS, boost::optional<T>, false, false>
       : has_same_elements<LHS, T> {};
 
     template <typename LHS, typename T>
- struct has_same_elements<LHS, optional<T>, true, false>
+ struct has_same_elements<LHS, boost::optional<T>, true, false>
       : has_same_elements<LHS, T> {};
 
     template <typename LHS, typename T>
- struct has_same_elements<LHS, optional<T>, false, true>
+ struct has_same_elements<LHS, boost::optional<T>, false, true>
       : has_same_elements<LHS, T> {};
 
 #define BOOST_SPIRIT_IS_CONVERTIBLE(z, N, data) \

Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
@@ -396,7 +396,7 @@
     template <typename T>
     struct build_optional
     {
- typedef optional<T> type;
+ typedef boost::optional<T> type;
     };
 
     template <>
@@ -574,7 +574,7 @@
         template <typename Sequence, int size>
         struct build_collapsed_variant<Sequence, false, size>
         {
- typedef optional<
+ typedef boost::optional<
                 typename spirit::detail::as_variant<
                     typename fusion::result_of::pop_front<Sequence>::type
>::type
@@ -600,7 +600,7 @@
         template <typename Sequence>
         struct build_collapsed_variant<Sequence, false, 2>
         {
- typedef optional<
+ typedef boost::optional<
                 typename mpl::deref<
                     typename mpl::next<
                         typename mpl::begin<Sequence>::type
@@ -895,9 +895,9 @@
 
     // optionals
     template <typename T>
- struct clear_value<optional<T> >
+ struct clear_value<boost::optional<T> >
     {
- static void call(optional<T>& val)
+ static void call(boost::optional<T>& val)
         {
             if (val)
                 val = none_t(); // leave optional uninitialized

Modified: trunk/boost/spirit/home/support/container.hpp
==============================================================================
--- trunk/boost/spirit/home/support/container.hpp (original)
+++ trunk/boost/spirit/home/support/container.hpp 2011-02-14 11:54:05 EST (Mon, 14 Feb 2011)
@@ -55,7 +55,7 @@
     {};
 
     template <typename T>
- struct is_container<optional<T> >
+ struct is_container<boost::optional<T> >
       : is_container<T>
     {};
 
@@ -119,7 +119,7 @@
 
     // this will be instantiated if the optional holds a container
     template <typename T>
- struct container_value<optional<T> >
+ struct container_value<boost::optional<T> >
       : container_value<T>
     {};
 
@@ -211,16 +211,16 @@
     };
 
     template <typename T>
- struct optional_attribute<optional<T> >
+ struct optional_attribute<boost::optional<T> >
     {
         typedef T const& type;
 
- static type call(optional<T> const& val)
+ static type call(boost::optional<T> const& val)
         {
             return boost::get<T>(val);
         }
 
- static bool is_valid(optional<T> const& val)
+ static bool is_valid(boost::optional<T> const& val)
         {
             return val;
         }
@@ -268,7 +268,7 @@
     template <typename Container, typename T>
     struct push_back_container<optional<Container>, T>
     {
- static bool call(optional<Container>& c, T const& val)
+ static bool call(boost::optional<Container>& c, T const& val)
         {
             if (!c)
                 c = Container();
@@ -509,13 +509,13 @@
     };
 
     template <typename T>
- struct optional_value<optional<T> >
+ struct optional_value<boost::optional<T> >
     {
         typedef T type;
     };
 
     template <typename T>
- struct optional_value<optional<T> const>
+ struct optional_value<boost::optional<T> const>
     {
         typedef T const 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