Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72258 - in sandbox/conversion/boost/conversion: . boost
From: vicente.botet_at_[hidden]
Date: 2011-05-29 04:25:21


Author: viboes
Date: 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
New Revision: 72258
URL: http://svn.boost.org/trac/boost/changeset/72258

Log:
Conversion: move dummy to conversion namespace
Text files modified:
   sandbox/conversion/boost/conversion/assign_to.hpp | 14 +++---
   sandbox/conversion/boost/conversion/boost/array.hpp | 4 +-
   sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp | 10 ++--
   sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp | 8 ++--
   sandbox/conversion/boost/conversion/boost/interval.hpp | 4 +-
   sandbox/conversion/boost/conversion/boost/optional.hpp | 6 +-
   sandbox/conversion/boost/conversion/boost/rational.hpp | 4 +-
   sandbox/conversion/boost/conversion/boost/tuple.hpp | 12 +++---
   sandbox/conversion/boost/conversion/ca_wrapper.hpp | 16 ++++----
   sandbox/conversion/boost/conversion/convert_to.hpp | 73 +++++++++++++++++++--------------------
   sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp | 14 +++---
   sandbox/conversion/boost/conversion/pack.hpp | 4 +-
   sandbox/conversion/boost/conversion/try_assign_to.hpp | 26 +++++++-------
   sandbox/conversion/boost/conversion/try_convert_to.hpp | 10 ++--
   14 files changed, 102 insertions(+), 103 deletions(-)

Modified: sandbox/conversion/boost/conversion/assign_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/assign_to.hpp (original)
+++ sandbox/conversion/boost/conversion/assign_to.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -41,7 +41,7 @@
       template < typename To, typename From >
       struct assign_to
       {
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
         //! @Throws Whatever the underlying the assignment operator of the @c To class throws..
         inline static To& apply(To& to, const From& from)
         {
@@ -52,7 +52,7 @@
       template < typename To, typename From, std::size_t N >
       struct assign_to<To[N],From[N]>
       {
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator on each one of the array elements.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator on each one of the array elements.
         //! @Throws Whatever the underlying the assignment operator of the @c To class throws..
         inline static To*& apply(To(&to)[N], const From(& from)[N])
         {
@@ -70,9 +70,9 @@
 
       //! @brief Default @c assign_to overload, used when ADL fails.
       //!
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
       //! @Throws Whatever the underlying the assignment operator of the @c To class throws..
- //! Forwards the call to the overload workarround, which can yet be specialized by the user for standard C++ types.
+ //! Forwards the call to the overload workaround, which can yet be specialized by the user for standard C++ types.
       template < typename To, typename From >
       To& assign_to(To& to, const From& from, dummy::type_tag<To> const&)
       {
@@ -86,16 +86,16 @@
       {
         using namespace boost::conversion::impl_2;
         //use boost::conversion::assign_to if ADL fails
- return assign_to(to, from, boost::dummy::type_tag<Target>());
+ return assign_to(to, from, dummy::type_tag<Target>());
       }
     }
 #endif
 
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
     //! @Throws Whatever the underlying the assignment operator of the @c To class throws..
     //! This function can be partially specialized on compilers supporting it.
     template <typename Target, typename Source>
- Target& assign_to(Target& to, const Source& from, boost::dummy::base_tag<Target> const& p =boost::dummy::base_tag<Target>())
+ Target& assign_to(Target& to, const Source& from, dummy::base_tag<Target> const& p =dummy::base_tag<Target>())
     {
       (void)p;
       return boost::conversion::impl::assign_to_impl<Target, Source>(to, from);

Modified: sandbox/conversion/boost/conversion/boost/array.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/array.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/array.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -58,7 +58,7 @@
   //! @Returns the array having as elements the conversion from the source array.
   template < typename T1, typename T2, std::size_t N>
   inline array<T1,N> convert_to(array<T2,N> const & from
- , boost::dummy::type_tag<array<T1,N> > const&
+ , conversion::dummy::type_tag<array<T1,N> > const&
   )
   {
     array<T1,N> to;
@@ -72,7 +72,7 @@
   //! @Returns The @c to parameter reference.
   template < typename T1, typename T2, std::size_t N>
   inline array<T1,N>& assign_to(array<T1,N>& to, array<T2,N> const & from
- , boost::dummy::type_tag<array<T1,N> > const&
+ , conversion::dummy::type_tag<array<T1,N> > const&
   )
   {
     for (unsigned int i =0; i<N; ++i)

Modified: sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -72,7 +72,7 @@
     }}
   template < class Rep, class Period>
   inline time_duration& assign_to(time_duration& to, const chrono::duration<Rep, Period>& from
- , boost::dummy::type_tag<posix_time::time_duration> const&
+ , conversion::dummy::type_tag<posix_time::time_duration> const&
   )
   {
       to = boost::conversion::convert_to<time_duration>(from);
@@ -86,7 +86,7 @@
 
     template < class Rep, class Period>
     inline posix_time::time_duration convert_to(chrono::duration<Rep, Period> const & from
- , boost::dummy::type_tag<posix_time::time_duration> const&)
+ , conversion::dummy::type_tag<posix_time::time_duration> const&)
     {
         typedef duration<Rep, Period> src_duration_t;
         typedef nanoseconds duration_t;
@@ -108,7 +108,7 @@
 
     template < class Rep, class Period>
     inline chrono::duration<Rep, Period> & assign_to(chrono::duration<Rep, Period> & to, const posix_time::time_duration& from
- , boost::dummy::type_tag<chrono::duration<Rep, Period> > const&
+ , conversion::dummy::type_tag<chrono::duration<Rep, Period> > const&
     )
 
     {
@@ -124,7 +124,7 @@
 
     template < class Duration>
     inline Duration convert_to(time_duration const & from
- , boost::dummy::type_tag<Duration> const&)
+ , conversion::dummy::type_tag<Duration> const&)
     {
         return chrono::duration_cast<Duration>(chrono::nanoseconds(from.total_nanoseconds()));
     }
@@ -135,7 +135,7 @@
     //! @Returns The @c to parameter reference.
     template < class Rep, class Period>
     inline time_duration& assign_to(time_duration& to, const chrono::duration<Rep, Period>& from
- , boost::dummy::type_tag<posix_time::time_duration> const&
+ , conversion::dummy::type_tag<posix_time::time_duration> const&
     )
     {
         to = boost::conversion::convert_to<time_duration>(from);

Modified: sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -79,7 +79,7 @@
     namespace chrono {
         template < class Clock, class Duration>
         inline posix_time::ptime convert_to(const chrono::time_point<Clock, Duration>& from
- , boost::dummy::type_tag<posix_time::ptime> const&)
+ , conversion::dummy::type_tag<posix_time::ptime> const&)
         {
                 typedef chrono::time_point<Clock, Duration> time_point_t;
                 typedef chrono::nanoseconds duration_t;
@@ -99,7 +99,7 @@
 
         template < class Clock, class Duration>
         inline chrono::time_point<Clock, Duration>& assign_to(chrono::time_point<Clock, Duration>& to, const posix_time::ptime& from
- , boost::dummy::type_tag<chrono::time_point<Clock, Duration> > const&
+ , conversion::dummy::type_tag<chrono::time_point<Clock, Duration> > const&
         )
         {
             to = boost::conversion::convert_to<chrono::time_point<Clock, Duration> >(from);
@@ -111,7 +111,7 @@
     namespace posix_time {
         template < class TP>
         inline TP convert_to(const ptime& from
- , boost::dummy::type_tag<TP > const&)
+ , conversion::dummy::type_tag<TP > const&)
         {
             time_duration const time_since_epoch=from-from_time_t(0);
             TP t=chrono::system_clock::from_time_t(time_since_epoch.total_seconds());
@@ -122,7 +122,7 @@
 
         template < class Clock, class Duration>
         inline ptime& assign_to(ptime& to, const chrono::time_point<Clock, Duration>& from
- , boost::dummy::type_tag<posix_time::ptime> const&
+ , conversion::dummy::type_tag<posix_time::ptime> const&
         )
         {
             to = boost::conversion::convert_to<ptime>(from);

Modified: sandbox/conversion/boost/conversion/boost/interval.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/interval.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/interval.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -49,13 +49,13 @@
       //! @Returns the target interval having as extremes the conversion from the source interval extremes.
         template < class T, class PT, class U, class PU>
         inline interval<T,PT> convert_to(interval<U,PU> const & from
- , boost::dummy::type_tag<interval<T,PT> > const&)
+ , conversion::dummy::type_tag<interval<T,PT> > const&)
         {
             return interval<T,PT>(boost::conversion::convert_to<T>(from.lower()), boost::conversion::convert_to<U>(from.upper()));
         }
         template < class T, class PT, class U, class PU>
         inline interval<T,PT>& assign_to(interval<T,PT>& to, const interval<U,PU>& from
- , boost::dummy::type_tag<interval<T,PT> > const&
+ , conversion::dummy::type_tag<interval<T,PT> > const&
                     )
         {
             to.assign(boost::conversion::convert_to<T>(from.lower()),boost::conversion::convert_to<U>(from.upper()));

Modified: sandbox/conversion/boost/conversion/boost/optional.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/optional.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/optional.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -74,7 +74,7 @@
   //! Uninitialized @c boost::optional<Target otherwise.
   template < class Target, class Source>
   inline optional<Target> convert_to(optional<Source> const & from
- , boost::dummy::type_tag<optional<Target> > const&)
+ , conversion::dummy::type_tag<optional<Target> > const&)
   {
     return (from?optional<Target>(boost::conversion::convert_to<Target>(from.get())):optional<Target>());
   }
@@ -86,7 +86,7 @@
   //! Uninitialized @c boost::optional<Target otherwise.
   template < class Target, class Source>
   inline optional<Target> convert_to(Source const & from
- , boost::dummy::type_tag<optional<Target> > const&)
+ , conversion::dummy::type_tag<optional<Target> > const&)
   {
     try
     {
@@ -104,7 +104,7 @@
   //! @Returns The @c to parameter reference.
   template < class Target, class Source>
   inline optional<Target>& assign_to(optional<Target>& to, const optional<Source>& from
- , boost::dummy::type_tag<optional<Target> > const&
+ , conversion::dummy::type_tag<optional<Target> > const&
                                      )
   {
     to = boost::conversion::convert_to<optional<Target> >(from);

Modified: sandbox/conversion/boost/conversion/boost/rational.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/rational.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/rational.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -49,14 +49,14 @@
     //! @Returns the target rational having as numerator and denominator the conversion from the numerator and denominator of the source rational.
     template < class T, class U>
     inline rational<T> convert_to(rational<U> const & from
- , boost::dummy::type_tag<rational<T> > const&)
+ , conversion::dummy::type_tag<rational<T> > const&)
     {
         return rational<T>(boost::conversion::convert_to<T>(from.numerator()), boost::conversion::convert_to<T>(from.denominator()));
     }
 
     template < class T, class U>
     inline rational<T>& assign_to(rational<T>& to, const rational<U>& from
- , boost::dummy::type_tag<rational<T> > const&
+ , conversion::dummy::type_tag<rational<T> > const&
     )
     {
         to.assign(boost::conversion::convert_to<T>(from.numerator()), boost::conversion::convert_to<T>(from.denominator()));

Modified: sandbox/conversion/boost/conversion/boost/tuple.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/tuple.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/tuple.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -69,15 +69,15 @@
 #if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
       template < class Target..., class Source...>
       inline tuple<...Target> convert_to(tuple<...Source> const & from
- , boost::dummy::type_tag<tuple<...Target> > const&);
+ , conversion::dummy::type_tag<tuple<...Target> > const&);
       template < class Target..., class Source...>
       inline tuple<...Target>& assign_to(tuple<...Target>& to, tuple<...Source> const & from
- , boost::dummy::type_tag<tuple<...Target> > const&
+ , conversion::dummy::type_tag<tuple<...Target> > const&
       )
 #else
     template < class T1, class T2, class U1, class U2>
     inline tuple<T1,T2> convert_to(tuple<U1,U2> const & from
- , boost::dummy::type_tag<tuple<T1,T2> > const&)
+ , conversion::dummy::type_tag<tuple<T1,T2> > const&)
     {
         return tuple<T1,T2>(
             boost::conversion::convert_to<T1>(boost::fusion::get<0>(from))
@@ -87,7 +87,7 @@
 
     template < class T1, class T2, class U1, class U2>
     inline tuple<T1,T2>& assign_to(tuple<T1,T2>& to, tuple<U1,U2> const & from
- , boost::dummy::type_tag<tuple<T1,T2> > const&
+ , conversion::dummy::type_tag<tuple<T1,T2> > const&
     )
     {
         to = boost::conversion::convert_to<boost::fusion::tuple<T1,T2> >(from);
@@ -96,7 +96,7 @@
 
     template < class T1, class T2, class T3, class U1, class U2, class U3>
     inline tuple<T1,T2,T3> convert_to(tuple<U1,U2,U3> const & from
- , boost::dummy::type_tag<tuple<T1,T2,T3> > const&
+ , conversion::dummy::type_tag<tuple<T1,T2,T3> > const&
     )
     {
         return boost::fusion::tuple<T1,T2, T3>(
@@ -108,7 +108,7 @@
 
     template < class T1, class T2, class T3, class U1, class U2, class U3>
     inline tuple<T1,T2,T3> assign_to(tuple<T1,T2,T3>& to, boost::fusion::tuple<U1,U2,U3> const & from
- , boost::dummy::type_tag<tuple<T1,T2,T3> > const&
+ , conversion::dummy::type_tag<tuple<T1,T2,T3> > const&
     )
     {
         to = boost::conversion::convert_to<boost::fusion::tuple<T1,T2> >(from);

Modified: sandbox/conversion/boost/conversion/ca_wrapper.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/ca_wrapper.hpp (original)
+++ sandbox/conversion/boost/conversion/ca_wrapper.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -22,7 +22,7 @@
 namespace boost {
   namespace conversion {
 
- //! wrapper providing assignement and conversion operations from a reference.
+ //! wrapper providing assignment and conversion operations from a reference.
 
     template <typename T>
     class ca_wrapper {
@@ -45,19 +45,19 @@
         return boost::conversion::convert_to<U>(ref_);
       }
 
- //! Assignement.
+ //! Assignment.
       //!
- //! @Effect Forwards the assignement to the reference.
+ //! @Effect Forwards the assignment to the reference.
       //! @Returns @c *this
- //! @Throws Whatever @c T aasignement can throws.
+ //! @Throws Whatever @c T assignment can throws.
       ca_wrapper& operator =(ca_wrapper<T> const& u) {
         ref_ = u.ref_;
         return *this;
       }
 
- //! Assignement from a converter assigner wrapping a type U convertible to T.
+ //! Assignment from a converter assigner wrapping a type U convertible to T.
       //!
- //! @Effect Forwards the assignement to the reference using assign_to.
+ //! @Effect Forwards the assignment to the reference using assign_to.
       //! @Returns @c *this
       //! @Throws Whatever @c assign_to throws.
       template <typename U>
@@ -66,9 +66,9 @@
         return *this;
       }
 
- //! Assignement from a type U convertible to T.
+ //! Assignment from a type U convertible to T.
       //!
- //! @Effect Forwards the assignement to the reference using assign_to
+ //! @Effect Forwards the assignment to the reference using assign_to
       //! @Returns @c *this
       //! @Throws Whatever @c assign_to throws.
       template <typename U>

Modified: sandbox/conversion/boost/conversion/convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convert_to.hpp (original)
+++ sandbox/conversion/boost/conversion/convert_to.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -7,25 +7,24 @@
 // See http://www.boost.org/libs/conversion for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-/*!
- \file
- \brief
- Defines the free function @c convert_to.
-
- The @c convert_to function converts the @c from parameter to a @c To type.
- The default implementation applies the conversion @c To operator of the @c From class or
- the copy constructor of the @c To class.
- Of course if both exist the conversion is ambiguous.
- A user adapting another type could need to overload the @c convert_to free function if the default behavior is not satisfactory.
-
-The user can add the @c convert_to overloading on any namespace found by ADL from the @c Source or the @c Target.
-A trick is used to overload on the return type by adding a dummy parameter having the Target.
-
-But sometimes, as it is the case for the standard classes,
-we can not add new functions on the @c std namespace, so we need a different technique.
-
-Instead of calling directly to the conversion operator, @c convert_to calls to the static operation apply on a class with the same name in the namespace @c boost::conversion::overload_workaround.
-Thus the user can specialize partially this class.
+/**
+ * @file
+ * @brief Defines the free function @c convert_to.
+ *
+ * The @c convert_to function converts the @c from parameter to a @c To type.
+ * The default implementation applies the conversion @c To operator of the @c From class or
+ * the copy constructor of the @c To class.
+ * Of course if both exist the conversion is ambiguous.
+ *
+ * A user adapting another type could need to overload the @c convert_to free function
+ * if the default behavior is not satisfactory.
+ * The user can add the @c convert_to overloading on any namespace found by ADL from the @c Source or the @c Target.
+ * A trick is used to overload on the return type by adding a dummy parameter having the Target.
+ *
+ * But sometimes, as it is the case for the standard classes,
+ * we can not add new functions on the @c std namespace, so we need a different technique.
+ * In this case the user can partially specialize the @c boost::conversion::overload_workaround::convert_to struct.
+ *
  */
 
 #ifndef BOOST_CONVERSION_CONVERT_TO_HPP
@@ -35,21 +34,22 @@
 #include <boost/utility/enable_if.hpp>
 
 namespace boost {
- namespace dummy {
- //! base tag used to overload a function returning T.
- template <typename T>
- struct base_tag {
- typedef T type;
- };
- //! tag used to overload a function returning T that takes precedence respect to &c base_tag<T>.
- //!
- //! Users overloading the @c convert_to function must use this tag.
- template <typename T>
- struct type_tag : public base_tag<T> {
- typedef T type;
- };
- }
   namespace conversion {
+ namespace dummy {
+ //! base tag used to overload a function returning T.
+ template <typename T>
+ struct base_tag {
+ typedef T type;
+ };
+ //! tag used to overload a function returning T that takes precedence respect to &c base_tag<T>.
+ //!
+ //! Users overloading the @c convert_to function must use this tag.
+ template <typename T>
+ struct type_tag : public base_tag<T> {
+ typedef T type;
+ };
+ }
+
     //! meta-function to state if the parameter is a place_holder
     //!
     //! The nested type @c type is a mpl boolean which default to @c mpl::false_. Specific specialization would make this meta-function to be @c mpl::true_.
@@ -58,7 +58,6 @@
 
     namespace overload_workaround {
       //! struct used when overloading of @c convert_to function can not be applied.
-
       template < typename To, typename From >
       struct convert_to {
         //! @Effects Converts the @c from parameter to an instance of the @c To type, using by default the conversion operator or copy constructor.
@@ -88,7 +87,7 @@
       Target convert_to_impl(Source const& from) {
         using namespace boost::conversion::impl_2;
         //use boost::conversion::convert_to if ADL fails
- return convert_to(from, boost::dummy::type_tag<Target>());
+ return convert_to(from, dummy::type_tag<Target>());
       }
     }
 #endif
@@ -108,8 +107,8 @@
 #else
     Target
 #endif
- convert_to(Source const& from, boost::dummy::base_tag<Target> const& p=boost::dummy::base_tag<Target>()) {
- (void)p;
+ convert_to(Source const& from, dummy::base_tag<Target> const& p=dummy::base_tag<Target>()) {
+ (void)p; // warning removal
 
       return boost::conversion::impl::convert_to_impl<Target>(from);
     }

Modified: sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp (original)
+++ sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -15,7 +15,7 @@
  The @c convert_to_or_fallback function converts the @c from parameter to a @c To type. If the conversion fails the fallback value is used to construct a To @c instance.
  
  The default implementation applies the conversion @c To operator of the @c From class or
- the copy constructor of the @c To class. When an exception is thrown the falback is returned.
+ the copy constructor of the @c To class. When an exception is thrown the fallback is returned.
  Of course if both exist the conversion is ambiguous.
  A user adapting another type could need to specialize the @c convert_to_or_fallback free function if the default behavior is not satisfactory.
 
@@ -45,7 +45,7 @@
       struct convert_to_or_fallback {
         //!
         //! @Effects Converts the @c from parameter to an instance of the @c To type, using by default the conversion operator or copy constructor.
- //! @Returns the converted value if the conversion suceeds or the fallback.
+ //! @Returns the converted value if the conversion succeeds or the fallback.
         //! @NoThows
         inline static To apply(const From& val, Fallback const& fallback)
         {
@@ -67,9 +67,9 @@
       //! @brief Default @c convert_to_or_fallback overload, used when ADL fails.
       //!
       //! @Effects Converts the @c from parameter to an instance of the @c To type, using by default the conversion operator or copy constructor.
- //! @Returns the converted value if the conversion suceeds or the fallback.
+ //! @Returns the converted value if the conversion succeeds or the fallback.
       //! @NoThows
- //! Forwards the call to the overload workarround, which can yet be specialized by the user for standard C++ types.
+ //! Forwards the call to the overload workaround, which can yet be specialized by the user for standard C++ types.
       template < typename To, typename From, typename Fallback >
       To convert_to_or_fallback(const From& val, Fallback const& fallback, dummy::type_tag<To> const&) {
         return conversion::overload_workaround::convert_to_or_fallback<To,From,Fallback>::apply(val, fallback);
@@ -81,20 +81,20 @@
       Target convert_to_or_fallback_impl(Source const& from, Fallback const& fallback) {
         using namespace boost::conversion::impl_2;
         //use boost::conversion::convert_to_or_fallback if ADL fails
- return convert_to_or_fallback(from, fallback, boost::dummy::type_tag<Target>());
+ return convert_to_or_fallback(from, fallback, dummy::type_tag<Target>());
       }
     }
     #endif
 
     //!
     //! @Effects Converts the @c from parameter to an instance of the @c To type, using by default the conversion operator or copy constructor.
- //! @Returns the converted value if the conversion suceeds or the fallback.
+ //! @Returns the converted value if the conversion succeeds or the fallback.
     //! @NoThows
     //!
     //! This function can be partially specialized on compilers supporting it.
     //! A trick is used to partially specialize on the return type by adding a dummy parameter.
     template <typename Target, typename Source, typename Fallback>
- Target convert_to_or_fallback(Source const& from, Fallback const& fallback, boost::dummy::base_tag<Target> const& p=boost::dummy::base_tag<Target>()) {
+ Target convert_to_or_fallback(Source const& from, Fallback const& fallback, dummy::base_tag<Target> const& p=dummy::base_tag<Target>()) {
       (void)p;
       return conversion::impl::convert_to_or_fallback_impl<Target>(from, fallback);
     }

Modified: sandbox/conversion/boost/conversion/pack.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/pack.hpp (original)
+++ sandbox/conversion/boost/conversion/pack.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -32,7 +32,7 @@
   namespace conversion {
     namespace result_of {
 
- //! metafunction getting a @c std::pair of @c boost::reference_warpper's.
+ //! meta-function getting a @c std::pair of @c boost::reference_warpper's.
       //!
       template <typename T1, typename T2> struct pack2 {
           typedef
@@ -42,7 +42,7 @@
           , boost::reference_wrapper<T2>
> type;
       };
- //! metafunction getting a fusion sequence of @c boost::reference_warpper's.
+ //! meta-function getting a fusion sequence of @c boost::reference_warpper's.
       //!
       template <typename T1, typename T2, typename T3=fusion::void_> struct pack3 {
           typedef fusion::tuple<

Modified: sandbox/conversion/boost/conversion/try_assign_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/try_assign_to.hpp (original)
+++ sandbox/conversion/boost/conversion/try_assign_to.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -43,9 +43,9 @@
       template < typename To, typename From >
       struct try_assign_to
       {
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
         //! @NoThrows
- //! @Return the converted value if sucess or the fallback when conversion fails.
+ //! @Return the converted value if success or the fallback when conversion fails.
         inline static bool apply(To& to, const From& from)
         {
           To rollback = to;
@@ -64,13 +64,13 @@
       template < typename To, typename From, std::size_t N >
       struct try_assign_to<To[N],From[N]>
       {
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator on each vector element.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator on each vector element.
         //! @NoThrows
- //! @Return the converted value if sucess or the fallback when conversion fails.
+ //! @Return the converted value if success or the fallback when conversion fails.
         inline static bool apply(To(&to)[N], const From(& from)[N])
         {
           To rollback[N];
- boost::conversion::assign_to<To>(to, rollback);
+ boost::conversion::assign_to<To>(rollback, to);
           try
           {
             for (std::size_t i = 0; i < N; ++i)
@@ -81,7 +81,7 @@
           }
           catch (...)
           {
- boost::conversion::assign_to<To>(rollback,to);
+ boost::conversion::assign_to<To>(to, rollback);
             return false;
           }
         }
@@ -93,10 +93,10 @@
     namespace impl_2 {
       //! @brief Default @c try_assign_to overload, used when ADL fails.
       //!
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
       //! @NoThrows
- //! @Return the converted value if sucess or the fallback when conversion fails.
- //! Forwards the call to the overload workarround, which can yet be specialized by the user for standard C++ types.
+ //! @Return the converted value if success or the fallback when conversion fails.
+ //! Forwards the call to the overload workaround, which can yet be specialized by the user for standard C++ types.
       template < typename To, typename From >
       bool try_assign_to(To& to, const From& from, dummy::type_tag<To> const&)
       {
@@ -110,18 +110,18 @@
       {
         using namespace boost::conversion::impl_2;
         //use boost::conversion::try_assign_to if ADL fails
- return try_assign_to(to, from, boost::dummy::type_tag<Target>());
+ return try_assign_to(to, from, dummy::type_tag<Target>());
       }
     }
 #endif
 
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assigment operator.
+ //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
     //! @NoThrows
- //! @Return the converted value if sucess or the fallback when conversion fails.
+ //! @Return the converted value if success or the fallback when conversion fails.
     //!
     //! This function can be partially specialized on compilers supporting it.
     template <typename Target, typename Source>
- bool try_assign_to(Target& to, const Source& from, boost::dummy::base_tag<Target> const& p=boost::dummy::base_tag<Target>()
+ bool try_assign_to(Target& to, const Source& from, dummy::base_tag<Target> const& p=dummy::base_tag<Target>()
     )
     {
       (void)p;

Modified: sandbox/conversion/boost/conversion/try_convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/try_convert_to.hpp (original)
+++ sandbox/conversion/boost/conversion/try_convert_to.hpp 2011-05-29 04:25:17 EDT (Sun, 29 May 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Vicente J. Botet Escriba 2009. Distributed under the Boost
+// (C) Copyright Vicente J. Botet Escriba 2011. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -15,7 +15,7 @@
  The @c try_convert_to function converts the @c from parameter to a @c To type and returns an optional<To>, uninitialized if conversion fails.
  
  The default implementation applies the conversion @c To operator of the @c From class or
- the copy constructor of the @c To class on a try-catch block and returns optional with the converted value if suceeds and an uninitialized optional otherwise.
+ the copy constructor of the @c To class on a try-catch block and returns optional with the converted value if succeeds and an uninitialized optional otherwise.
  Of course if both exist the conversion is ambiguous.
  A user adapting specific types could need to specialize the @c try_convert_to free function if the default behavior is not satisfactory or if the specialization can perform better.
 
@@ -69,7 +69,7 @@
     //! @Effects Converts the @c from parameter to an instance of the @c To type, using by default the conversion operator or copy constructor.
     //! @NoThrow
     //! @Returns A optional<Target> uninitialized when conversion fails.
- //! Forwards the call to the overload workarround, which can yet be specialized by the user for standard C++ types.
+ //! Forwards the call to the overload workaround, which can yet be specialized by the user for standard C++ types.
     template < typename To, typename From >
     optional<To> try_convert_to(const From& val, dummy::type_tag<To> const&) {
       return conversion::overload_workaround::try_convert_to<To,From>::apply(val);
@@ -80,7 +80,7 @@
     optional<Target> try_convert_to_impl(Source const& from) {
       using namespace boost::conversion::impl_2;
       //use boost::conversion::try_convert_to if ADL fails
- return try_convert_to(from, boost::dummy::type_tag<Target>());
+ return try_convert_to(from, dummy::type_tag<Target>());
     }
   }
 #endif
@@ -94,7 +94,7 @@
   //! This function can be overloaded by the user for specific types.
   //! A trick is used to partially specialize on the return type by adding a dummy parameter.
   template <typename Target, typename Source>
- optional<Target> try_convert_to(Source const& from, boost::dummy::base_tag<Target> const& p=boost::dummy::base_tag<Target>()) {
+ optional<Target> try_convert_to(Source const& from, dummy::base_tag<Target> const& p=dummy::base_tag<Target>()) {
     (void)p;
     return boost::conversion::impl::try_convert_to_impl<Target>(from);
   }


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