Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57175 - in sandbox/conversion: boost/conversion boost/conversion/boost boost/conversion/std libs/conversion/doc libs/conversion/doc/html libs/conversion/doc/html/boost/conversion libs/conversion/doc/html/boost/conversion/appendices libs/conversion/doc/html/boost/conversion/examples libs/conversion/doc/html/boost/conversion/overview libs/conversion/doc/html/boost/conversion/reference libs/conversion/doc/html/boost/conversion/users_guide libs/conversion/test
From: vicente.botet_at_[hidden]
Date: 2009-10-27 10:48:00


Author: viboes
Date: 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
New Revision: 57175
URL: http://svn.boost.org/trac/boost/changeset/57175

Log:
TBoost.conversion: v0.4 Coming back to boost::convert_to and use ADL
Text files modified:
   sandbox/conversion/boost/conversion/assign_to.hpp | 21 -
   sandbox/conversion/boost/conversion/boost/array.hpp | 18
   sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp | 41 +-
   sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp | 54 ++--
   sandbox/conversion/boost/conversion/boost/interval.hpp | 16
   sandbox/conversion/boost/conversion/boost/optional.hpp | 20
   sandbox/conversion/boost/conversion/boost/rational.hpp | 20
   sandbox/conversion/boost/conversion/boost/tuple.hpp | 67 ++--
   sandbox/conversion/boost/conversion/ca_wrapper.hpp | 41 +-
   sandbox/conversion/boost/conversion/convert_to.hpp | 27 -
   sandbox/conversion/boost/conversion/convert_to_via.hpp | 2
   sandbox/conversion/boost/conversion/std/complex.hpp | 10
   sandbox/conversion/boost/conversion/std/pair.hpp | 8
   sandbox/conversion/libs/conversion/doc/conversion.qbk | 510 ++++++++++++++++++++++++++-------------
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices.html | 10
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/acknowledgements.html | 3
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/appendix_e__tests.html | 36 +-
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/history.html | 57 +++
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/implementation.html | 6
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/rationale.html | 109 +++++++
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/todo.html | 35 +
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/boost__optional.html | 20 +
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/chrono__time_point_and_posix_time__ptime.html | 71 ++++
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/std__pair.html | 9
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview.html | 29 +
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview/motivation.html | 187 ++++++++------
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/boost_classes_specializations.html | 24 +
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/c___standard_classes_specializations.html | 9
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/conversion_hpp.html | 4
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/core.html | 237 ++++++++++--------
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide.html | 12
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/ext_references.html | 2
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/getting_started.html | 24 -
   sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/tutorial.html | 101 ++++++-
   sandbox/conversion/libs/conversion/doc/html/index.html | 4
   sandbox/conversion/libs/conversion/test/Jamfile.v2 | 14
   sandbox/conversion/libs/conversion/test/array.cpp | 10
   sandbox/conversion/libs/conversion/test/builtins.cpp | 238 +++++++++---------
   sandbox/conversion/libs/conversion/test/chrono_posix_time_duration.cpp | 10
   sandbox/conversion/libs/conversion/test/chrono_posix_time_time.cpp | 10
   sandbox/conversion/libs/conversion/test/complex.cpp | 12
   sandbox/conversion/libs/conversion/test/extrinsec.cpp | 20
   sandbox/conversion/libs/conversion/test/helper.hpp | 13
   sandbox/conversion/libs/conversion/test/interval.cpp | 10
   sandbox/conversion/libs/conversion/test/intrinsec.cpp | 34 +-
   sandbox/conversion/libs/conversion/test/optional.cpp | 10
   sandbox/conversion/libs/conversion/test/pair.cpp | 16
   sandbox/conversion/libs/conversion/test/rational.cpp | 12
   sandbox/conversion/libs/conversion/test/tuple.cpp | 16
   49 files changed, 1392 insertions(+), 877 deletions(-)

Modified: sandbox/conversion/boost/conversion/assign_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/assign_to.hpp (original)
+++ sandbox/conversion/boost/conversion/assign_to.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -13,9 +13,8 @@
 
 #include <cstddef> //for std::size_t
 #include <boost/conversion/convert_to.hpp>
-#include <boost/swap.hpp>
 
-namespace boost {
+namespace boost {
     namespace conversion {
         namespace partial_specialization_workaround {
             template < typename To, typename From >
@@ -32,17 +31,15 @@
                 {
                     for (std::size_t i = 0; i < N; ++i)
                     {
- to[i] = boost::conversion::convert_to(from[i], boost::dummy::type_tag<To>());
+ to[i] = boost::convert_to<To>(from[i]);
                     }
                     return to;
                 }
             };
         }
- }
 
- namespace conversion_default {
         template < typename To, typename From >
- To& assign_to(To& to, const From& from) {
+ To& assign_to(To& to, const From& from, dummy::type_tag<To> const&) {
             return conversion::partial_specialization_workaround::assign_to<To,From>::apply(to, from);
         }
     }
@@ -50,17 +47,15 @@
     namespace conversion_impl {
         template <typename Target, typename Source>
         Target& assign_to_impl(Target& to, const Source& from) {
- using namespace boost::conversion_default;
+ using namespace boost::conversion;
             //use boost::conversion::assign_to if ADL fails
- return assign_to(to, from);
+ return assign_to(to, from, boost::dummy::type_tag<Target>());
         }
     }
 
- namespace conversion {
- template <typename Target, typename Source>
- Target& assign_to(Target& to, const Source& from) {
- return conversion_impl::assign_to_impl<Target, Source>(to, from);
- }
+ 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>()) {
+ return 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 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -17,27 +17,25 @@
 #include <algorithm>
 #include <boost/config.hpp>
 
-//#define BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING 1
-
 namespace boost {
 
- #ifdef BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING
+ #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     namespace conversion { namespace partial_specialization_workaround {
         template < typename T1, typename T2, std::size_t N>
         struct convert_to< array<T1,N>, array<T2,N> > {
             inline static array<T1,N> apply(array<T2,N> const & from)
             {
                 array<T1,N> to;
- conversion::assign_to(to, from);
+ boost::assign_to(to, from);
                 return to;
             }
         };
         template < typename T1, typename T2, std::size_t N>
- struct assign_to< array<T1,N>, array<T2,N> > {
+ struct assign_to< array<T1,N>, array<T2,N> > {
             inline static array<T1,N>& apply(array<T1,N>& to, array<T2,N> const & from)
             {
                 for (unsigned int i =0; i<N; ++i) {
- to[i]=conversion::convert_to<T1>(from[i]);
+ to[i]=boost::convert_to<T1>(from[i]);
                 }
                 return to;
             }
@@ -46,18 +44,18 @@
     #else
     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> >)
+ , boost::dummy::type_tag<array<T1,N> > const&)
     {
         array<T1,N> to;
- conversion::assign_to(to, from);
+ boost::assign_to(to, from);
         return to;
     }
 
     template < typename T1, typename T2, std::size_t N>
- inline array<T1,N>& assign_to(array<T1,N>& to, array<T2,N> const & from)
+ inline array<T1,N>& assign_to(array<T1,N>& to, array<T2,N> const & from, boost::dummy::type_tag<array<T1,N> > const&)
     {
         for (unsigned int i =0; i<N; ++i) {
- to[i]=conversion::convert_to<T1>(from[i]);
+ to[i]=boost::convert_to<T1>(from[i]);
         }
         return to;
     }

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 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -17,10 +17,8 @@
 #include <boost/conversion/assign_to.hpp>
 #include <boost/config.hpp>
 
-//#define BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING 1
-
 namespace boost {
- #ifdef BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING
+ #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     namespace conversion { namespace partial_specialization_workaround {
         template < class Rep, class Period>
         struct convert_to<posix_time::time_duration, chrono::duration<Rep, Period> > {
@@ -32,19 +30,19 @@
                 rep_t d = chrono::duration_cast<duration_t>(from).count();
                 rep_t sec = d/1000000000;
                 rep_t nsec = d%1000000000;
- return boost::posix_time::seconds(static_cast<long>(sec))+
+ return posix_time::seconds(static_cast<long>(sec))+
 #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
- boost::posix_time::nanoseconds(nsec);
+ posix_time::nanoseconds(nsec);
 #else
- boost::posix_time::microseconds((nsec+500)/1000);
+ posix_time::microseconds((nsec+500)/1000);
 #endif
             }
         };
         template < class Rep, class Period>
- struct assign_to<posix_time::time_duration, chrono::duration<Rep, Period> > {
+ struct assign_to<posix_time::time_duration, chrono::duration<Rep, Period> > {
             inline static posix_time::time_duration& apply(posix_time::time_duration& to, const chrono::duration<Rep, Period>& from)
             {
- to = conversion::convert_to<posix_time::time_duration>(from);
+ to = boost::convert_to<posix_time::time_duration>(from);
                 return to;
             }
         };
@@ -60,7 +58,7 @@
         struct assign_to<chrono::duration<Rep, Period>, posix_time::time_duration> {
             inline static chrono::duration<Rep, Period> & apply(chrono::duration<Rep, Period> & to, const posix_time::time_duration& from)
             {
- to = conversion::convert_to<chrono::duration<Rep, Period> >(from);
+ to = boost::convert_to<chrono::duration<Rep, Period> >(from);
                 return to;
             }
         };
@@ -69,7 +67,7 @@
     namespace chrono {
         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>)
+ , boost::dummy::type_tag<posix_time::time_duration> const&)
         {
             typedef duration<Rep, Period> src_duration_t;
             typedef nanoseconds duration_t;
@@ -77,34 +75,37 @@
             rep_t d = chrono::duration_cast<duration_t>(from).count();
             rep_t sec = d/1000000000;
             rep_t nsec = d%1000000000;
- return boost::posix_time::seconds(static_cast<long>(sec))+
+ return posix_time::seconds(static_cast<long>(sec))+
 #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
- boost::posix_time::nanoseconds(nsec);
+ posix_time::nanoseconds(nsec);
 #else
- boost::posix_time::microseconds((nsec+500)/1000);
+ posix_time::microseconds((nsec+500)/1000);
 #endif
         }
 
         template < class Rep, class Period>
- inline chrono::duration<Rep, Period> & assign_to(chrono::duration<Rep, Period> & to, const posix_time::time_duration& from)
+ 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&)
+
         {
- to = conversion::convert_to<duration<Rep, Period> >(from);
+ to = boost::convert_to<duration<Rep, Period> >(from);
             return to;
         }
     }
-
+
     namespace posix_time {
         template < class Rep, class Period>
         inline chrono::duration<Rep, Period> convert_to(time_duration const & from
- , boost::dummy::type_tag<chrono::duration<Rep, Period> >)
+ , boost::dummy::type_tag<chrono::duration<Rep, Period> > const&)
         {
             return chrono::duration_cast<chrono::duration<Rep, Period> >(chrono::nanoseconds(from.total_nanoseconds()));
         }
-
+
         template < class Rep, class Period>
- inline time_duration& assign_to(time_duration& to, const chrono::duration<Rep, Period>& from)
+ inline time_duration& assign_to(time_duration& to, const chrono::duration<Rep, Period>& from
+ , boost::dummy::type_tag<posix_time::time_duration> const&)
         {
- to = conversion::convert_to<time_duration>(from);
+ to = boost::convert_to<time_duration>(from);
             return to;
         }
     }

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 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -19,10 +19,8 @@
 #include <boost/conversion/assign_to.hpp>
 #include <boost/config.hpp>
 
-//#define BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING 1
-
 namespace boost {
- #ifdef BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING
+ #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     namespace conversion { namespace partial_specialization_workaround {
         template < class Clock, class Duration>
         struct convert_to<posix_time::ptime, chrono::time_point<Clock, Duration> > {
@@ -34,12 +32,12 @@
                 rep_t d = chrono::duration_cast<duration_t>(from.time_since_epoch()).count();
                 rep_t sec = d/1000000000;
                 rep_t nsec = d%1000000000;
- return boost::posix_time::from_time_t(0)+
- boost::posix_time::seconds(static_cast<long>(sec))+
+ return posix_time::from_time_t(0)+
+ posix_time::seconds(static_cast<long>(sec))+
 #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
- boost::posix_time::nanoseconds(nsec);
+ posix_time::nanoseconds(nsec);
 #else
- boost::posix_time::microseconds((nsec+500)/1000);
+ posix_time::microseconds((nsec+500)/1000);
 #endif
             }
         };
@@ -47,27 +45,27 @@
         struct assign_to<posix_time::ptime, chrono::time_point<Clock, Duration> > {
             inline static posix_time::ptime& apply(posix_time::ptime& to, const chrono::time_point<Clock, Duration>& from)
             {
- to = conversion::convert_to<posix_time::ptime>(from);
+ to = boost::convert_to<posix_time::ptime>(from);
                 return to;
             }
         };
-
+
         template < class Clock, class Duration>
         struct convert_to<chrono::time_point<Clock, Duration>, posix_time::ptime> {
             inline static chrono::time_point<Clock, Duration> apply(const posix_time::ptime& from)
             {
- boost::posix_time::time_duration const time_since_epoch=from-boost::posix_time::from_time_t(0);
+ posix_time::time_duration const time_since_epoch=from-posix_time::from_time_t(0);
                 chrono::time_point<Clock, Duration> t=chrono::system_clock::from_time_t(time_since_epoch.total_seconds());
                 long nsec=time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second());
                 return t+chrono::nanoseconds(nsec);
-
+
             }
         };
         template < class Clock, class Duration>
         struct assign_to<chrono::time_point<Clock, Duration>, posix_time::ptime> {
             inline static chrono::time_point<Clock, Duration>& apply(chrono::time_point<Clock, Duration>& to, const posix_time::ptime& from)
             {
- to = conversion::convert_to<chrono::time_point<Clock, Duration> >(from);
+ to = boost::convert_to<chrono::time_point<Clock, Duration> >(from);
                 return to;
             }
         };
@@ -76,7 +74,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>)
+ , boost::dummy::type_tag<posix_time::ptime> const&)
         {
                 typedef chrono::time_point<Clock, Duration> time_point_t;
                 typedef chrono::nanoseconds duration_t;
@@ -84,42 +82,44 @@
                 rep_t d = chrono::duration_cast<duration_t>(from.time_since_epoch()).count();
                 rep_t sec = d/1000000000;
                 rep_t nsec = d%1000000000;
- return boost::posix_time::from_time_t(0)+
- boost::posix_time::seconds(static_cast<long>(sec))+
+ return posix_time::from_time_t(0)+
+ posix_time::seconds(static_cast<long>(sec))+
 #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
- boost::posix_time::nanoseconds(nsec);
+ posix_time::nanoseconds(nsec);
 #else
- boost::posix_time::microseconds((nsec+500)/1000);
+ posix_time::microseconds((nsec+500)/1000);
 #endif
         }
-
-
+
+
         template < class Clock, class Duration>
- inline chrono::time_point<Clock, Duration>& assign_to(chrono::time_point<Clock, Duration>& to, const posix_time::ptime& from)
+ 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&)
         {
- to = conversion::convert_to<chrono::time_point<Clock, Duration> >(from);
+ to = boost::convert_to<chrono::time_point<Clock, Duration> >(from);
             return to;
         }
-
+
     }
     namespace posix_time {
         template < class Clock, class Duration>
         inline chrono::time_point<Clock, Duration> convert_to(const ptime& from
- , boost::dummy::type_tag<chrono::time_point<Clock, Duration> >)
+ , boost::dummy::type_tag<chrono::time_point<Clock, Duration> > const&)
         {
             time_duration const time_since_epoch=from-from_time_t(0);
             chrono::time_point<Clock, Duration> t=chrono::system_clock::from_time_t(time_since_epoch.total_seconds());
             long nsec=time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second());
             return t+chrono::nanoseconds(nsec);
         }
-
+
         template < class Clock, class Duration>
- inline ptime& assign_to(ptime& to, const chrono::time_point<Clock, Duration>& from)
+ inline ptime& assign_to(ptime& to, const chrono::time_point<Clock, Duration>& from
+ , boost::dummy::type_tag<posix_time::ptime> const&)
         {
- to = conversion::convert_to<ptime>(from);
+ to = boost::convert_to<ptime>(from);
             return to;
         }
-
+
     }
     #endif
 }

Modified: sandbox/conversion/boost/conversion/boost/interval.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/interval.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/interval.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -17,20 +17,20 @@
 
 namespace boost {
 
- #if 0
+ #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     namespace conversion { namespace partial_specialization_workaround {
         template < class T, class PT, class U, class PU>
         struct convert_to< numeric::interval<T,PT>, numeric::interval<U,PU> > {
             inline static numeric::interval<T,PT> apply(numeric::interval<U,PU> const & from)
             {
- return numeric::interval<T,PT>(conversion::convert_to<T>(from.lower()), conversion::convert_to<U>(from.upper()));
+ return numeric::interval<T,PT>(boost::convert_to<T>(from.lower()), boost::convert_to<U>(from.upper()));
             }
         };
         template < class T, class PT, class U, class PU>
         struct assign_to< numeric::interval<T,PT>, numeric::interval<U,PU> > {
             inline static numeric::interval<T,PT>& apply(numeric::interval<T,PT>& to, const numeric::interval<U,PU>& from)
             {
- to.assign(conversion::convert_to<T>(from.lower()), conversion::convert_to<U>(from.upper()));
+ to.assign(boost::convert_to<T>(from.lower()), boost::convert_to<U>(from.upper()));
                 return to;
             }
         };
@@ -39,14 +39,16 @@
     #else
     namespace numeric {
         template < class T, class PT, class U, class PU>
- inline static interval<T,PT> convert_to(interval<U,PU> const & from, boost::dummy::type_tag<interval<T,PT> >)
+ inline interval<T,PT> convert_to(interval<U,PU> const & from
+ , boost::dummy::type_tag<interval<T,PT> > const&)
         {
- return interval<T,PT>(conversion::convert_to<T>(from.lower()), conversion::convert_to<U>(from.upper()));
+ return interval<T,PT>(boost::convert_to<T>(from.lower()), boost::convert_to<U>(from.upper()));
         }
         template < class T, class PT, class U, class PU>
- inline static interval<T,PT>& assign_to(interval<T,PT>& to, const interval<U,PU>& from)
+ inline interval<T,PT>& assign_to(interval<T,PT>& to, const interval<U,PU>& from
+ , boost::dummy::type_tag<interval<T,PT> > const&)
         {
- to.assign(conversion::convert_to<T>(from.lower()),conversion::convert_to<U>(from.upper()));
+ to.assign(boost::convert_to<T>(from.lower()),boost::convert_to<U>(from.upper()));
             return to;
         }
     }

Modified: sandbox/conversion/boost/conversion/boost/optional.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/optional.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/optional.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -18,24 +18,22 @@
 #include <boost/conversion/assign_to.hpp>
 #include <boost/config.hpp>
 
-//#define BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING 1
-
 namespace boost {
-
- #ifdef BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING
+
+ #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     namespace conversion { namespace partial_specialization_workaround {
         template < class Target, class Source>
         struct convert_to< optional<Target>, optional<Source> > {
             inline static optional<Target> apply(optional<Source> const & from)
             {
- return (from?optional<Target>(conversion::convert_to<Target>(from.get())):optional<Target>());
+ return (from?optional<Target>(boost::convert_to<Target>(from.get())):optional<Target>());
             }
         };
         template < class Target, class Source>
         struct assign_to< optional<Target>, optional<Source> > {
             inline static optional<Target>& apply(optional<Target>& to, const optional<Source>& from)
             {
- to = from?conversion::convert_to<Target>(from.get()):optional<Target>();
+ to = from?boost::convert_to<Target>(from.get()):optional<Target>();
                 return to;
             }
         };
@@ -43,15 +41,17 @@
     }}
     #else
     template < class Target, class Source>
- inline optional<Target> convert_to(optional<Source> const & from, boost::dummy::type_tag<optional<Target> >)
+ inline optional<Target> convert_to(optional<Source> const & from
+ , boost::dummy::type_tag<optional<Target> > const&)
     {
- return (from?optional<Target>(conversion::convert_to<Target>(from.get())):optional<Target>());
+ return (from?optional<Target>(boost::convert_to<Target>(from.get())):optional<Target>());
     }
 
     template < class Target, class Source>
- inline optional<Target>& assign_to(optional<Target>& to, const optional<Source>& from)
+ inline optional<Target>& assign_to(optional<Target>& to, const optional<Source>& from
+ , boost::dummy::type_tag<optional<Target> > const&)
     {
- to = from?conversion::convert_to<Target>(from.get()):optional<Target>();
+ to = from?boost::convert_to<Target>(from.get()):optional<Target>();
         return to;
     }
     #endif

Modified: sandbox/conversion/boost/conversion/boost/rational.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/rational.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/rational.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -16,24 +16,22 @@
 #include <boost/conversion/assign_to.hpp>
 #include <boost/config.hpp>
 
-//#define BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING 1
-
 namespace boost {
 
- #ifdef BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING
+ #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     namespace conversion { namespace partial_specialization_workaround {
         template < class T, class U>
         struct convert_to< rational<T>, rational<U> > {
             inline static rational<T> apply(rational<U> const & from)
             {
- return rational<T>(conversion::convert_to<T>(from.numerator()), conversion::convert_to<T>(from.denominator()));
+ return rational<T>(boost::convert_to<T>(from.numerator()), boost::convert_to<T>(from.denominator()));
             }
         };
         template < class T, class U>
         struct assign_to< rational<T>, rational<U> > {
             inline static rational<T>& apply(rational<T>& to, const rational<U>& from)
             {
- to.assign(conversion::convert_to<T>(from.numerator()), conversion::convert_to<T>(from.denominator()));
+ to.assign(boost::convert_to<T>(from.numerator()), boost::convert_to<T>(from.denominator()));
                 return to;
             }
         };
@@ -41,15 +39,17 @@
     }}
     #else
     template < class T, class U>
- inline static rational<T> convert_to(rational<U> const & from, boost::dummy::type_tag<rational<T> >)
+ inline rational<T> convert_to(rational<U> const & from
+ , boost::dummy::type_tag<rational<T> > const&)
     {
- return rational<T>(conversion::convert_to<T>(from.numerator()), conversion::convert_to<T>(from.denominator()));
+ return rational<T>(boost::convert_to<T>(from.numerator()), boost::convert_to<T>(from.denominator()));
     }
-
+
     template < class T, class U>
- inline static rational<T>& assign_to(rational<T>& to, const rational<U>& from)
+ inline rational<T>& assign_to(rational<T>& to, const rational<U>& from
+ , boost::dummy::type_tag<rational<T> > const&)
     {
- to.assign(conversion::convert_to<T>(from.numerator()), conversion::convert_to<T>(from.denominator()));
+ to.assign(boost::convert_to<T>(from.numerator()), boost::convert_to<T>(from.denominator()));
         return to;
     }
     #endif

Modified: sandbox/conversion/boost/conversion/boost/tuple.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/tuple.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/tuple.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -14,47 +14,46 @@
 #include <boost/fusion/tuple.hpp>
 #include <boost/conversion/convert_to.hpp>
 #include <boost/conversion/assign_to.hpp>
-
-//#define BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING 1
+#include <boost/config.hpp>
 
 namespace boost {
 
- #ifdef BOOST_CONVERSION_NO_FUNCTION_TEMPLATE_ORDERING
+ #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     namespace conversion { namespace partial_specialization_workaround {
         template < class T1, class T2, class U1, class U2>
- struct convert_to< boost::fusion::tuple<T1,T2>, boost::fusion::tuple<U1,U2> > {
- inline static boost::fusion::tuple<T1,T2> apply(boost::fusion::tuple<U1,U2> const & from)
+ struct convert_to< fusion::tuple<T1,T2>, fusion::tuple<U1,U2> > {
+ inline static fusion::tuple<T1,T2> apply(fusion::tuple<U1,U2> const & from)
             {
- return boost::fusion::tuple<T1,T2>(
- conversion::convert_to<T1>(boost::fusion::get<0>(from))
- , conversion::convert_to<T2>(boost::fusion::get<1>(from))
+ return fusion::tuple<T1,T2>(
+ boost::convert_to<T1>(fusion::get<0>(from))
+ , boost::convert_to<T2>(fusion::get<1>(from))
                 );
             }
         };
         template < class T1, class T2, class U1, class U2>
- struct assign_to< boost::fusion::tuple<T1,T2>, boost::fusion::tuple<U1,U2> > {
- inline static boost::fusion::tuple<T1,T2>& apply(boost::fusion::tuple<T1,T2>& to, boost::fusion::tuple<U1,U2> const & from)
+ struct assign_to< fusion::tuple<T1,T2>, fusion::tuple<U1,U2> > {
+ inline static fusion::tuple<T1,T2>& apply(fusion::tuple<T1,T2>& to, fusion::tuple<U1,U2> const & from)
             {
- to = conversion::convert_to<boost::fusion::tuple<T1,T2> >(from);
+ to = boost::convert_to<fusion::tuple<T1,T2> >(from);
                 return to;
             }
         };
         template < class T1, class T2, class T3, class U1, class U2, class U3>
- struct convert_to< boost::fusion::tuple<T1,T2,T3>, boost::fusion::tuple<U1,U2,U3> > {
- inline static boost::fusion::tuple<T1,T2,T3> apply(boost::fusion::tuple<U1,U2,U3> const & from)
+ struct convert_to< fusion::tuple<T1,T2,T3>, fusion::tuple<U1,U2,U3> > {
+ inline static fusion::tuple<T1,T2,T3> apply(fusion::tuple<U1,U2,U3> const & from)
             {
- return boost::fusion::tuple<T1,T2, T3>(
- conversion::convert_to<T1>(boost::fusion::get<0>(from))
- , conversion::convert_to<T2>(boost::fusion::get<1>(from))
- , conversion::convert_to<T3>(boost::fusion::get<2>(from))
+ return fusion::tuple<T1,T2, T3>(
+ boost::convert_to<T1>(fusion::get<0>(from))
+ , boost::convert_to<T2>(fusion::get<1>(from))
+ , boost::convert_to<T3>(fusion::get<2>(from))
                 );
             }
         };
         template < class T1, class T2, class T3, class U1, class U2, class U3>
- struct assign_to< boost::fusion::tuple<T1,T2,T3>, boost::fusion::tuple<U1,U2,U3> > {
- inline static boost::fusion::tuple<T1,T2,T3> apply(boost::fusion::tuple<T1,T2,T3>& to, boost::fusion::tuple<U1,U2,U3> const & from)
+ struct assign_to< fusion::tuple<T1,T2,T3>, fusion::tuple<U1,U2,U3> > {
+ inline static fusion::tuple<T1,T2,T3> apply(fusion::tuple<T1,T2,T3>& to, fusion::tuple<U1,U2,U3> const & from)
             {
- to = conversion::convert_to<boost::fusion::tuple<T1,T2> >(from);
+ to = boost::convert_to<fusion::tuple<T1,T2> >(from);
                 return to;
             }
         };
@@ -63,37 +62,39 @@
     #else
     namespace fusion {
     template < class T1, class T2, class U1, class U2>
- inline static tuple<T1,T2> convert_to(tuple<U1,U2> const & from
- , boost::dummy::type_tag<tuple<T1,T2> >)
+ inline tuple<T1,T2> convert_to(tuple<U1,U2> const & from
+ , boost::dummy::type_tag<tuple<T1,T2> > const&)
     {
         return tuple<T1,T2>(
- conversion::convert_to<T1>(boost::fusion::get<0>(from))
- , conversion::convert_to<T2>(boost::fusion::get<1>(from))
+ boost::convert_to<T1>(boost::fusion::get<0>(from))
+ , boost::convert_to<T2>(boost::fusion::get<1>(from))
         );
     }
 
     template < class T1, class T2, class U1, class U2>
- inline static tuple<T1,T2>& assign_to(tuple<T1,T2>& to, tuple<U1,U2> const & from)
+ inline tuple<T1,T2>& assign_to(tuple<T1,T2>& to, tuple<U1,U2> const & from
+ , boost::dummy::type_tag<tuple<T1,T2> > const&)
     {
- to = conversion::convert_to<boost::fusion::tuple<T1,T2> >(from);
+ to = boost::convert_to<boost::fusion::tuple<T1,T2> >(from);
         return to;
     }
 
     template < class T1, class T2, class T3, class U1, class U2, class U3>
- inline static tuple<T1,T2,T3> convert_to(tuple<U1,U2,U3> const & from
- , boost::dummy::type_tag<tuple<T1,T2,T3> >)
+ inline tuple<T1,T2,T3> convert_to(tuple<U1,U2,U3> const & from
+ , boost::dummy::type_tag<tuple<T1,T2,T3> > const&)
     {
         return boost::fusion::tuple<T1,T2, T3>(
- conversion::convert_to<T1>(boost::fusion::get<0>(from))
- , conversion::convert_to<T2>(boost::fusion::get<1>(from))
- , conversion::convert_to<T3>(boost::fusion::get<2>(from))
+ boost::convert_to<T1>(boost::fusion::get<0>(from))
+ , boost::convert_to<T2>(boost::fusion::get<1>(from))
+ , boost::convert_to<T3>(boost::fusion::get<2>(from))
         );
     }
 
     template < class T1, class T2, class T3, class U1, class U2, class U3>
- inline static tuple<T1,T2,T3> assign_to(tuple<T1,T2,T3>& to, boost::fusion::tuple<U1,U2,U3> const & from)
+ 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&)
     {
- to = conversion::convert_to<boost::fusion::tuple<T1,T2> >(from);
+ to = boost::convert_to<boost::fusion::tuple<T1,T2> >(from);
         return to;
     }
     }

Modified: sandbox/conversion/boost/conversion/ca_wrapper.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/ca_wrapper.hpp (original)
+++ sandbox/conversion/boost/conversion/ca_wrapper.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -14,29 +14,30 @@
 #include <boost/conversion/convert_to.hpp>
 #include <boost/conversion/assign_to.hpp>
 
-namespace boost { namespace conversion {
-
- template <typename T>
- class ca_wrapper {
- T& ref_;
- public:
- ca_wrapper(T& r) : ref_(r) {}
- template <typename U>
- operator U() {
- return boost::conversion::convert_to<U>(ref_);
- }
- template <typename U>
- T& operator =(U const& u) {
- return boost::conversion::assign_to(ref_, u);
- }
- };
+namespace boost {
+ namespace conversion {
 
+ template <typename T>
+ class ca_wrapper {
+ T& ref_;
+ public:
+ ca_wrapper(T& r) : ref_(r) {}
+ template <typename U>
+ operator U() {
+ return boost::convert_to<U>(ref_);
+ }
+ template <typename U>
+ T& operator =(U const& u) {
+ return boost::assign_to(ref_, u);
+ }
+ };
+ }
     template <typename T>
- ca_wrapper<T> mca(T& r) {
- return ca_wrapper<T>(r);
+ conversion::ca_wrapper<T> mca(T& r) {
+ return conversion::ca_wrapper<T>(r);
     }
-
-}}
+
+}
 
 #endif
 

Modified: sandbox/conversion/boost/conversion/convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convert_to.hpp (original)
+++ sandbox/conversion/boost/conversion/convert_to.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -13,11 +13,11 @@
 
 #include <cstddef> //for std::size_t
 
-namespace boost {
+namespace boost {
     namespace dummy {
- template <typename T>
- struct type_tag {};
- }
+ template <typename T> struct base_tag {};
+ template <typename T> struct type_tag : public base_tag<T> {};
+ }
     namespace conversion {
         namespace partial_specialization_workaround {
             template < typename To, typename From >
@@ -28,28 +28,25 @@
                 }
             };
         }
- }
- namespace conversion_default {
+
         template < typename To, typename From >
- To convert_to(const From& val, dummy::type_tag<To>) {
+ To convert_to(const From& val, dummy::type_tag<To> const&) {
             return conversion::partial_specialization_workaround::convert_to<To,From>::apply(val);
         }
     }
     namespace conversion_impl {
             template <typename Target, typename Source>
             Target convert_to_impl(Source const& from) {
- using namespace boost::conversion_default;
+ using namespace boost::conversion;
                 //use boost::conversion::convert_to if ADL fails
                 return convert_to(from, boost::dummy::type_tag<Target>());
             }
     }
- namespace conversion {
- template <typename Target, typename Source>
- Target convert_to(Source const& from, boost::dummy::type_tag<Target> p=boost::dummy::type_tag<Target>()) {
- return conversion_impl::convert_to_impl<Target>(from);
- }
-
- }
+ template <typename Target, typename Source>
+ Target convert_to(Source const& from, boost::dummy::base_tag<Target> const& p=boost::dummy::base_tag<Target>()) {
+ return conversion_impl::convert_to_impl<Target>(from);
+ }
+
 }
 
 #endif

Modified: sandbox/conversion/boost/conversion/convert_to_via.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convert_to_via.hpp (original)
+++ sandbox/conversion/boost/conversion/convert_to_via.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -17,7 +17,7 @@
 
     template < typename To, typename Via, typename From >
     To convert_to_via(const From& val) {
- boost::convert_to<To>(boost::convert_to<Via>(val));
+ boost::convert_to<To>(boost::convert_to<Via>(val));
     }
 }}
 

Modified: sandbox/conversion/boost/conversion/std/complex.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/complex.hpp (original)
+++ sandbox/conversion/boost/conversion/std/complex.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -8,8 +8,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#ifndef BOOST_CONVERT_TO_PAIR__HPP
-#define BOOST_CONVERT_TO_PAIR__HPP
+#ifndef BOOST_CONVERT_TO_COMPLEX__HPP
+#define BOOST_CONVERT_TO_COMPLEX__HPP
 
 #include <complex>
 #include <boost/conversion/convert_to.hpp>
@@ -23,15 +23,15 @@
         struct convert_to< std::complex<T>, std::complex<U> > {
             inline static std::complex<T> apply(std::complex<U> const & from)
             {
- return std::complex<T>(conversion::convert_to<T>(from.real()), conversion::convert_to<T>(from.imag()));
+ return std::complex<T>(boost::convert_to<T>(from.real()), boost::convert_to<T>(from.imag()));
             }
         };
         template < class T, class U>
         struct assign_to< std::complex<T>, std::complex<U> > {
             inline static std::complex<T>& apply(std::complex<T>& to, const std::complex<U>& from)
             {
- to.real() = conversion::convert_to<T>(from.real());
- to.imag() = conversion::convert_to<T>(from.imag());
+ to.real() = boost::convert_to<T>(from.real());
+ to.imag() = boost::convert_to<T>(from.imag());
                 return to;
             }
         };

Modified: sandbox/conversion/boost/conversion/std/pair.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/pair.hpp (original)
+++ sandbox/conversion/boost/conversion/std/pair.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -17,21 +17,21 @@
 #include <boost/conversion/assign_to.hpp>
 
 namespace boost { namespace conversion {
-
+
     namespace partial_specialization_workaround {
         template < class T1, class T2, class U1, class U2>
         struct convert_to< std::pair<T1,T2>, std::pair<U1,U2> > {
             inline static std::pair<T1,T2> apply(std::pair<U1,U2> const & from)
             {
- return std::pair<T1,T2>(conversion::convert_to<T1>(from.first), conversion::convert_to<T2>(from.second));
+ return std::pair<T1,T2>(boost::convert_to<T1>(from.first), boost::convert_to<T2>(from.second));
             }
         };
         template < class T1, class T2, class U1, class U2>
         struct assign_to< std::pair<T1,T2>, std::pair<U1,U2> > {
             inline static std::pair<T1,T2>& apply(std::pair<T1,T2>& to, const std::pair<U1,U2>& from)
             {
- to.first = conversion::convert_to<T1>(from.first);
- to.second = conversion::convert_to<T2>(from.second);
+ to.first = boost::convert_to<T1>(from.first);
+ to.second = boost::convert_to<T2>(from.second);
                 return to;
             }
         };

Modified: sandbox/conversion/libs/conversion/doc/conversion.qbk
==============================================================================
--- sandbox/conversion/libs/conversion/doc/conversion.qbk (original)
+++ sandbox/conversion/libs/conversion/doc/conversion.qbk 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -50,15 +50,19 @@
 [heading Description]
 [/==================]
 
-Generic explict conversion between unrelated types.
+Generic explicit conversion between unrelated types.
 
-The main source of inspiration of this library were Boost.StringConvert.
+The template function __convert_to__ allows to convert a source type to a target type, using argument dependent lookup to select a specialized `convert_to` function if available. If no specialized `convert_to` function is available, `boost::conversion::convert_to` is used.
+
+The generic __convert_to__ function requires that the elements to be converted are assignable and copy constructible. It is implemented using the Target copy construction from a Source or the Source conversion operator Target - this is sometimes unavailable.
+
+For standard types, we can not add a specialized `convert_to` function on the namespace std. The alternative to using argument dependent lookup in this situation is to provide a template specialization of boost::conversion::convert_to for every pair of standard types that requires a specialized __convert_to__.
 
 [*Boost.Conversion] provides:
 
-* a generic __convert_to__ function which can be specialized by the user to make explict conversion between unrelated types.
-* a generic __assign_to__ function which can be specialized by the user to make explict assignation between unrelated types.
-* a generic `mca` function returning a wrapper which replace assignments by a call to `assign_to` and conversion operators by a call `convert_to`.
+* a generic __convert_to__ function which can be specialized by the user to make explicit conversion between unrelated types.
+* a generic __assign_to__ function which can be specialized by the user to make explicit assignation between unrelated types.
+* a generic `mca` function returning a wrapper which replace assignments by a call to __assign_to__ and conversion operators by a call __convert_to__.
 * a generic `convert_to_via` function which convert a type `From` to another `To` using a temporary one `Via`.
 * conversion between `std::complex` of explicitly convertible types.
 * conversion between `std::pair` of explicitly convertible types.
@@ -66,7 +70,7 @@
 * conversion between `boost::rational` of explicitly convertible types.
 * conversion between `boost::interval` of explicitly convertible types.
 * conversion between `boost::chrono::time_point` and `boost::ptime`.
-* conversion between `boost::chrono::duration` and `boost::time_duration`.
+* conversion between `boost::chrono::duration` and `boost::time_duration`.
 * conversion between `boost::array` of explicitly convertible types.
 * conversion between Boost.Fusion sequences of explicitly convertible types.
 
@@ -91,82 +95,110 @@
 
     // Include all of the core Conversion files
     #include <boost/conversion.hpp>
-
+
     using namespace boost;
 
 [section Motivation]
 
-Imagine you need to convert unrelated types `Source` and `Target`. You can get it by defining a specific function such as
+I've needed recently to convert from boost::chrono::time_point<Clock, Duration> to boost::posix_time::ptime and from boost::chrono::duration<Rep, Period> to boost::posix_time::time_duration. This kind of conversions are needed quite often when you use code from two different libraries that have implemented the same concept using of course different representations and have hard coded the library interface to its own implementation. Well this is a normal situation we can't avoid. Life is life.
+
+Quite often we need to convert unrelated types `Source` and `Target`. As these classes are unrelated, neither of them offers conversion operators to the other. Usually we get it by defining a specific function such as
 
- Target SourceToTarget(Source& v);
+ Target ConvertToTarget(Source& v);
 
-Imagine now that you need to convert a `std::pair<Source, Source>` to a `std::pair<Target, Target>`. Well you can again define a specific function
+In my case I started by defining
+
+ template <typename Rep, typename Period>
+ boost::posix_time::time_duration convert_to_posix_time_time_duration(
+ const boost::chrono::duration<Rep, Period>& from);
+
+ template <typename Clock, typename Duration>
+ posix_time::ptime convert_to_posix_time_ptime(const chrono::time_point<Clock, Duration>& from);
+
+Imagine now that you need to convert a `std::pair<Source, Source>` to a `std::pair<Target, Target>`. The standard defines conversions of pairs if the related types are C++ convertible:
+
+ template <typename T1, typename T2>
+ struct pair {
+ ...
+ template<class U, class V>
+ //requires Constructible<T1, const U&> && Constructible<T2, const V&>
+ std::pair(const pair<U, V>& p);
+
+ template<class U , class V>
+ //requires HasAssign<T1, const U&> && HasAssign<T2, const V&>
+ std::pair& operator=(const std::pair<U , V>& p);
+ ...
+ };
 
- std::pair<Target,Target> PairOfSourceToPairOfTarget(std::pair<Source,Source>& v) {
- return std::make_pair(SourceToTarget(v.fisrt), SourceToTarget(v.second));
+But as the types `Target` and `Source` are not C++ convertible other than using a specific function.
+
+Well we can again define a specific function
+
+ std::pair<Target,Target> ConvertToPairOfTarget(std::pair<Source,Source>& v) {
+ return std::make_pair(ConvertToTarget(v.fisrt), ConvertToTarget(v.second));
     }
 
-While the `SourceToTarget` could be specific, the `PairOfSourceToPairOfTarget` sould be generic
+While the `ConvertToTarget` could be specific, the `ConvertToPairOfTarget` should be generic
 
     template <typename Target1, typename Target2, typename Source1, typename Source2)
- std::pair<Target1,Target2> ConvertPair(std::pair<Source1,Source2>& v);
+ std::pair<Target1,Target2> ConvertToPair(std::pair<Source1,Source2>& v);
 
 In order to do that we need that the pair template parameters define a common function, let it call `convert_to`,
 
     template <typename Target, typename Source)
     Target convert_to(Source& v);
 
-so `ConvertPair` can be defined as
+so `ConvertToPair` can be defined as
 
     template <typename Target1, typename Target2, typename Source1, typename Source2)
- std::pair<Target1,Target2> ConvertPair(std::pair<Source1,Source2>& v) {
- return std::make_pair(convert_to(v.fisrt), convert_to(v.second));
+ std::pair<Target1,Target2> ConvertToPair(std::pair<Source1,Source2>& v) {
+ return std::make_pair(convert_to<Target1>(v.fisrt), convert_to<Target2>(v.second));
     }
 
-The issue is that we need to specialize the `convert_to` function for the classes `Source` and `Target`. We can do it as follows
+We need to specialize the `convert_to` function for the specific classes `Source` and `Target`. We can do it as follows
 
- template <>
- Target convert_to<Target, Source>(Source& v) {return SourceToTarget(v);}
+ Target convert_to(Source& v) {return ConvertToTarget(v);}
 
-What about converting `std::pair<Source,std::pair<Source,Source> >` to `std::pair<Target,std::pair<Target,Target> >`? The issue now is that `convert_to(std::make_pair<to, std::make_pair<to,to> >)` do not compiles because the conversion of `std::pair` is named `ConvertPair`. So we need to specialize the function `convert_to` for pairs. There is no major problem with compilers supporting partial specialization of function templates. If this is not the case, we need to use a trick; as it allows partial specialization of classes we can define __convert_to__ by as relying to a specific function of a class, as follows:
+In my case I needed
 
- namespace partial_specialization_workaround {
- template < typename Target, typename Source >
- struct convert_to {
- static Target apply(const Source& val);
- };
- }
+ template <typename Rep, typename Period>
+ boost::posix_time::time_duration convert_to(const boost::chrono::duration<Rep, Period>& from)
+ {
+ return convert_to_posix_time_time_duration(from);
+ }
 
- template < typename Target, typename Source >
- Target convert_to(const Source& val) {
- return partial_specialization_workaround::convert_to<Target,Source>::apply(val);
- }
+ template <typename Clock, typename Duration>
+ boost::posix_time::ptime convert_to(const boost::chrono::time_point<Clock, Duration>& from)
+ {
+ return convert_to_posix_time_ptime(from);
+ }
 
-So now we can specialize `partial_specialization_workaround::convert_to` for pairs as follows:
+So now I can convert
 
- namespace partial_specialization_workaround {
- template <typename Target1, typename Target2, typename Source1, typename Source2)
- struct convert_to< std::pair<Target1,Target2>, std::pair<Source1,Source2> > {
- inline static std::pair<Target1,Target2> apply(std::pair<Source1,Source2>& v) {
- {
- return std::pair<T1,T2>(convert_to<T1>(from.first), convert_to<T2>(from.second));
- }
- };
+ std::pair<chrono::time_point<Clock, Duration>, boost::chrono::duration<Rep, Period> >
 
- }
+to
 
-There is one more issue. The preceding design works well with unrelated classes, but what about classes that already define some kind of conversion, unisng a constructor or a conversion operator. Do we need to make specialization for these conversion? The answer is no. We need just to define the default implementation of the partial_specialization_workaround::convert_to::apply function to just return the explicit conversion.
+ std::pair<boost::posix_time::ptime, boost::posix_time::time_duration>
 
- namespace partial_specialization_work_around {
- template < typename T, typename U>
- struct convert_to {
- inline static T apply(const U& val)
- {
- return T(val);
- }
- };
+using the `ConvertToPair` function.
+
+What about converting `std::pair<Source,std::pair<Source,Source> >` to `std::pair<Target,std::pair<Target,Target> >`? The issue now is that `convert_to(std::make_pair<to, std::make_pair<to,to> >)` do not compiles because the conversion of `std::pair` is named `ConvertToPair`. So we need to specialize the function `convert_to` for pairs.
+
+
+ template <typename T1, typename T2, typename S1, typename S2)
+ static std::pair<T1,T2> convert_to(std::pair<Source1,Source2>& from) {
+ {
+ return std::pair<T1,T2>(convert_to<T1>(from.first), convert_to<T2>(from.second));
     }
 
+There is still a last point. The preceding design works well with unrelated classes, but what about classes that already define some kind of conversion, using a constructor or a conversion operator. Do we need to make specialization for these conversion? The answer is no. We need just to define the default implementation of convert_to function to just return the explicit conversion.
+
+ template < typename Target, typename Source>
+ Target convert_to(const Source& from)
+ {
+ return Target(from);
+ }
 
 What have we learned? Classes or algorithms relying on a conversion by copy-construction or by the conversion operator can be made more generic by relaying in a function that explicitly states this conversion. Thus, instead of requiring
 
@@ -184,21 +216,13 @@
 
     assign_to(to, from);
 
-The default implementation of __assign_to__ relies on the assignement operator
+The default implementation of __assign_to__ relies on the assignment operator
 
- namespace partial_specialization_workaround {
- template < typename Target, typename Source >
- struct assign_to {
- inline static To& apply(Target& to, const Source& from)
- {
- to = from;
- return to;
- }
- };
- }
     template < typename Target, typename Source >
- To& assign_to(Target& to, const Source& from) {
- return partial_specialization_workaround::assign_to<Target,Source>::apply(to, from);
+ To& assign_to(Target& to, const Source& from)
+ {
+ to = from;
+ return to;
     }
 
 For classes that are explicitly convertible and having a self assignment operator it is easy to make a specialization of __assign_to__ as follows.
@@ -207,29 +231,30 @@
 
 The rationale is that if there was not a copy constructor from a Source seems reasonable to think that there will not be an assignment operator. So in most of the cases, once we have specialized the convert_to function we recover a reasonable implementation for the __assign_to__ function.
 
-When doing multiple assignements we use to do
+When doing multiple assignments we use to do
 
     a = b = c;
-
-With __assign_to__ we could do
+
+With __assign_to__ we could do
 
     assign_to(a, assign_to(b, c));
 
-and if we find this not really readable we can try with
+and if we find this not really readable we can try with
 
     mca(a) = mca(b) = c;
-
+
 The behavior of mca recall the tie function of Boost.Tuple, but instead of allowing multiple assignations, allows a single assign_to call.
 
 We can even generalize this, so classes or algorithms relying on a member function can be made more generic by relaying on a function. The default function implementation could just to call to the member function with the equivalent prototype, but this is out of the scope of this library.
 
-So one of the advantages of using this common functions is uniformity. The other is that now we are able to find all the explicit conversions to one type, as we can do with explict casts.
+So one of the advantages of using this common functions is uniformity. The other is that now we are able to find all the explicit conversions to one type, as we can do with explicit casts.
+
 
 [endsect]
 [endsect]
 
 [/==============================]
-[section:users_guide Users'Guide]
+[section:users_guide Users' Guide]
 [/==============================]
 
 [/======================================]
@@ -261,7 +286,7 @@
 [heading Requirements]
 [/=========================]
 
-[*Boost.Conversion] do not depends on any Boost library, at least for the generic part. Of course it dependens on the specific libraries when specific conversion are used. For these specific parts you must use either Boost version 1.39.0 or the version in SVN trunk (even if Boost version 1.35.x should works also).
+The genric part of [*Boost.Conversion] depends only on Boost.Config. Of course it depends on the specific libraries when specific conversion are used.
 
 
 [/========================]
@@ -326,18 +351,70 @@
 
 [endsect]
 
-[section How to completly specialize the conversion functions]
+[section How to specialize the conversion functions]
 
-You can completly specialize the __convert_to__ and __assign_to__ functions as you will do for other functions. Just add an complete overload. E.g. if you want to add an explicit convertion from a type `F` to a type `T` do the following:
+You can add an overload of __convert_to__ and __assign_to__ functions as you will do for the swap function for example, but we have to use a trick to allow ADL and avoid infinite recursion and ambiguity. This trick consists in adding a unused parameter representing the target type. E.g. if you want to add an explicit conversion from a type `A` to a type `B` do the following:
 
- T convert_to(const F& from);
+ namespace my_own_namespace {
+ B convert_to(const A& from, boost::dummy::type_tag<B> const&);
+ }
 
 [endsect]
 
-[section How to partially specialize the conversion functions]
+[section How to partially specialize the conversion functions for standadr types]
 
-As it has been explained in the introduction, until you use a C++ compiler supporting the partial specialization of function templates you will need to follow partial specialization workaround and partialy specialize the `partial_specialization_workaround::convert_to` class.
+As it has been explained in the introduction, we can not use ADL for standard types, as we can not add new functions on the standad std namespace. For these types we need to specialize the boost::conversion::convert_to function.
 
+ template < typename Target, typename Source >
+ Target convert_to(const Source& val, boost::dummy::type_tag<Target> const&)
+
+With compilers supporting partial specialization of function templates there is no major problem. For the others, we need to use a trick; as it allows partial specialization of classes we can define __convert_to__ by as relying to a specific function of a class, as follows:
+
+ namespace boost { namespace conversion {
+ namespace partial_specialization_workaround {
+ template < typename Target, typename Source >
+ struct convert_to {
+ static Target apply(const Source& val);
+ };
+ }
+
+ template < typename Target, typename Source >
+ Target convert_to(const Source& val, dummy::type_tag<Target> const&=dummy::type_tag<Target>()) {
+ return partial_specialization_workaround::convert_to<Target,Source>::apply(val);
+ }
+ }}
+
+So now we can specialize `partial_specialization_workaround::convert_to` for pairs as follows:
+
+ namespace partial_specialization_workaround {
+ template <typename Target1, typename Target2, typename Source1, typename Source2)
+ struct convert_to< std::pair<Target1,Target2>, std::pair<Source1,Source2> > {
+ inline static std::pair<Target1,Target2> apply(std::pair<Source1,Source2>& v) {
+ {
+ return std::pair<T1,T2>(convert_to<T1>(from.first), convert_to<T2>(from.second));
+ }
+ };
+
+ }
+
+The same applies to the generic __assign_to__ function.
+
+ namespace partial_specialization_workaround {
+ template < typename Target, typename Source >
+ struct assign_to {
+ inline static To& apply(Target& to, const Source& from)
+ {
+ to = from;
+ return to;
+ }
+ };
+ }
+ template < typename Target, typename Source >
+ To& assign_to(Target& to, const Source& from, dummy::type_tag<Target> const&) {
+ return partial_specialization_workaround::assign_to<Target,Source>::apply(to, from);
+ }
+
+
 [endsect]
 
 
@@ -375,7 +452,7 @@
 [section:conversion_hpp Header `<boost/conversion.hpp>`]
 [/==========================================================================================]
 
-Include all the core conversion public header files. Note thatyou will need to include explicitly the C++ standard or Boost specific files when usin specific classes.
+Include all the core conversion public header files. Note that you will need to include explicitly the C++ standard or Boost specific files when using specific classes.
 
     #include <boost/conversion/convert_to.hpp>
     #include <boost/conversion/assign_to.hpp>
@@ -392,27 +469,40 @@
 [/==========================================================================================]
 
     namespace boost {
- namespace partial_specialization_workaround {
- template < typename To, typename From >
- struct convert_to {
- static To apply(const From& val);
- };
- }
+ namespace dummy {
+ template <typename T> struct base_tag {};
+ template <typename T> struct type_tag : public base_tag<T> {};
+ }
+ template <typename T> struct type_tag;
+ namespace conversion {
+ namespace partial_specialization_workaround {
+ template < typename To, typename From >
+ struct convert_to {
+ static To apply(const From& val);
+ };
+ }
 
- template < typename To, typename From >
- To convert_to(const From& from);
+ template < typename To, typename From >
+ To convert_to(const From& from, dummy::type_tag<To> const&);
+ }
+
+ template <typename Target, typename Source>
+ Target convert_to(Source const& from, dummy::base_tag<To> const&=dummy::base_tag<To>());
     }
 
-Defines a free function __convert_to__ which converts the `from` parameter to a `To` type. The default implementation applies the conversion `To` operator of the `From` class or the copy constructor of the `To` class. A user adapting another type could need to specialize the __convert_to__ free function if the default behavior is not satisfactory.
 
-As for the moment we can not partially specialize a function a trick is used: instead of calling directly to the __convert_to__ member function, __convert_to__ calls to the static operation `apply` on a class with the same name in the namespace __partial_specialization_workaround__. Thus the user can specialize partially this class.
+Defines a free function __convert_to__ which converts the `from` parameter to a `To` type. The default implementation applies the conversion `To` operator of the `From` class or the copy constructor of the `To` class. Of course if both exist the conversion is ambiguous. A user adapting another type could need to specialize the __convert_to__ free function if the default behavior is not satisfactory.
+
+The user can add the __convert_to__ overloading on the namespace of a specific Source. But sometimes as it is the case for the standard classes, we can not add new functions on the std namespace, so we need a different technique.
+
+The technique is partially specialize on the function __convert_to__ on the boost::conversion namespace. For compilers for which we can not partially specialize a function a trick is used: instead of calling directly to the __convert_to__ member function, __convert_to__ calls to the static operation `apply` on a class with the same name in the namespace __partial_specialization_workaround__. Thus the user can specialize partially this class.
 
 
 
 [section Function `convert_to()`]
 
       template < typename To, typename From >
- To convert_to(const From& from);
+ To convert_to(const From& from, dummy::type_tag<To> const&);
 
 [variablelist
 
@@ -431,24 +521,33 @@
 [/==========================================================================================]
 
     namespace boost {
- namespace partial_specialization_workaround {
- template < typename To, typename From >
- struct assign_to {
- static void apply(To& toconst From& from);
- };
- template < typename To, typename From, std::size_t N >
- struct assign_to<To[N],From[N]> {
- static void apply(To (&to)[N], const From(& from)[N]);
- };
- }
+ namespace conversion {
+ namespace partial_specialization_workaround {
+ template < typename To, typename From >
+ struct assign_to {
+ static void apply(To& to, const From& from);
+ };
+ template < typename To, typename From, std::size_t N >
+ struct assign_to<To[N],From[N]> {
+ static void apply(To (&to)[N], const From(& from)[N]);
+ };
+ }
 
- template < typename To, typename From >
- void assign_to(To& to, const From& from);
+ template < typename To, typename From >
+ void assign_to(To& to, const From& from, dummy::type_tag<To> const&);
+ }
+
+ template <typename Target, typename Source>
+ Target& assign_to(Target& to, const Source& from, dummy::base_tag<To> const&=dummy::base_tag<To>()) {
+ return ::boost_conversion_impl::assign_to_impl<Target, Source>(to, from);
+ }
     }
 
-Defines a free function __assign_to__ which assigns the `from` parameter to the `to` parameter. The default implementation applies the the assignement operator of the `To` class. A user adapting another type could need to specialize the __assign_to__ free function if the default behavior is not satisfactory.
+Defines a free function __assign_to__ which assigns the `from` parameter to the `to` parameter. The default implementation applies the the assignment operator of the `To` class. A user adapting another type could need to specialize the __assign_to__ free function if the default behavior is not satisfactory.
+
+The user can add the __assign_to__ overloading on the namespace of the Source or Target classes. But sometimes as it is the case for the standard classes, we can not add new functions on the std namespace, so we need a different technique.
 
-As for the moment we can not partially specialize a function a trick is used: instead of calling directly to the __assign_to__ member function, __assign_to__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
+The technique is partially specialize on the function __assign_to__ on the boost::conversion namespace. For compilers for which we can not partially specialize a function a trick is used: instead of calling directly to the __assign_to__ member function, __assign_to__ calls to the static operation apply on a class with the same name in the namespace __partial_specialization_workaround__.
 This the user can specialize partially this class.
 
 [section Function `assign_to()`]
@@ -458,9 +557,9 @@
 
 [variablelist
 
-[[Effects:] [Assigns the `from` parameter to the `to` parameter, using by default the assignement operator of the `To` class.]]
+[[Effects:] [Assigns the `from` parameter to the `to` parameter, using by default the assignment operator of the `To` class.]]
 
-[[Throws:] [Whatever the underlying the assignement operator of the `To` class throws.]]
+[[Throws:] [Whatever the underlying the assignment operator of the `To` class throws.]]
 
 ]
 
@@ -486,7 +585,7 @@
 
 [[Effects:] [Converts the from parameter to an instance of the To type using a intermediary Via type.]]
 
-[[Throws:] [Whatever the underlying conversions functions throws.]]
+[[Throws:] [Whatever the underlying conversions functions throw.]]
 
 ]
 
@@ -498,24 +597,34 @@
 [/==========================================================================================]
 
     namespace boost {
-
- template <typename T> class ca_wrapper;
- template <typename T> ca_wrapper<T> mca(T& r);
+ template <typename T> 'implementation_dependent<T>' mca(T& r);
     }
 
-[section Template Class `ca_wrapper<>`]
+[section Function `mca<>()`]
+
+ template <typename T> 'implementation_dependent<T>' mca(T& r);
+
+[variablelist
+
+[[Effects:] [Returns a implementation dependent class able to transform conversion by convert_to call and assignments by assign_to calls.]]
+
+[[Throws:] [Nothing.]]
+
+]
+
+[section Template Class `implementation_dependent`]
 
         template <typename T>
- class ca_wrapper {
+ class implementation_dependent {
         public:
- ca_wrapper(T& r);
+ implementation_dependent(T& r);
             template <typename U> operator U();
             template <typename U> T& operator =(U const& u);
         };
 
 [section Constructor]
 
- ca_wrapper(T& r);
+ implementation_dependent(T& r);
 
 [variablelist
 
@@ -541,13 +650,13 @@
 
 [endsect]
 
-[section Assignement operator]
+[section Assignment operator]
 
             template <typename U> T& operator =(U const& u);
 
 [variablelist
 
-[[Effects:] [Call to the `assignt_to<T,U>` with the stored reference and the passed parameter `u`.]]
+[[Effects:] [Call to the `assign_to<T,U>` with the stored reference and the passed parameter `u`.]]
 
 [[Throws:] [Whatever __assign_to__ throws.]]
 
@@ -558,17 +667,6 @@
 
 [endsect]
 
-[section Function `mca<>()`]
-
- template <typename T> ca_wrapper<T> mca(T& r);
-
-[variablelist
-
-[[Effects:] [Creates a ca_wrapper.]]
-
-[[Throws:] [Nothing.]]
-
-]
 
 [endsect]
 [endsect]
@@ -584,6 +682,7 @@
 Include this file when using conversions between complex of convertible types.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class T, class U>
             struct convert_to< std::complex<T>, std::complex<U> > {
@@ -594,7 +693,7 @@
                 static std::complex<T>& apply(const std::complex<U>& from, std::complex<T>& to);
             };
 
- }
+ }}
     }
 
 [endsect]
@@ -605,6 +704,7 @@
 Include this file when using conversions between pairs of convertible types.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class T1, class T2, class U1, class U2>
             struct convert_to< std::pair<T1,T2>, std::pair<U1,U2> > {
@@ -614,7 +714,7 @@
             struct assign_to< std::pair<T1,T2>, std::pair<U1,U2> > {
                 static std::pair<T1,T2>& apply(std::pair<T1,T2>& to, const std::pair<U1,U2>& from);
             };
- }
+ }}
     }
 
 [endsect]
@@ -625,6 +725,7 @@
 Include this file when using conversions to std::string.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template<typename T, typename CharT, typename Traits, typename Alloc>
             struct convert_to< std::basic_string<CharT,Traits,Alloc>, T > {
@@ -644,7 +745,7 @@
                 static void apply(T& to
                     const std::basic_string<CharT,Traits,Alloc>& from);
             };
- }
+ }}
     }
 
 [endsect]
@@ -659,6 +760,7 @@
 Include this file when using conversions between rational of convertible types.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class T, class U>
             struct convert_to< rational<T>, rational<U> > {
@@ -668,7 +770,7 @@
             struct assign_to< rational<T>, rational<U> > {
                 inline static rational<T>& apply(rational<T>& to, const rational<U>& from);
             };
- }
+ }}
     }
 
 [endsect]
@@ -679,6 +781,7 @@
 Include this file when using conversions between chrono and posix_time time and duration types.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class Rep, class Period>
             struct convert_to<posix_time::time_duration, chrono::duration<Rep, Period> > {
@@ -703,10 +806,11 @@
                     chrono::duration<Rep, Period> & to,
                     const posix_time::time_duration& from);
             };
- }
+ }}
     }
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class Clock, class Duration>
             struct convert_to<posix_time::ptime, chrono::time_point<Clock, Duration> > {
@@ -728,7 +832,7 @@
                     chrono::time_point<Clock, Duration>& to,
                     const posix_time::ptime& from);
             };
- }
+ }}
     }
 
 [endsect]
@@ -739,6 +843,7 @@
 Include this file when using conversions between intervals of convertible types.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class T, class PT, class U, class PU>
             struct convert_to< interval<T,PT>, interval<U,PU> > {
@@ -749,8 +854,7 @@
                 static interval<T,PT>& apply(
                     interval<T,PT>& to, const interval<U,PU>& from);
             };
-
- }
+ }}
     }
 
 [endsect]
@@ -761,6 +865,7 @@
 Include this file when using conversions between optional of convertible types.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class Target, class Source>
             struct convert_to< optional<Target>, optional<Source> > {
@@ -771,8 +876,7 @@
                 static optional<Target>& apply(
                     optional<Target>& to, const optional<Target>& from);
             };
-
- }
+ }}
     }
 
 [endsect]
@@ -784,7 +888,7 @@
 Include this file when using conversions between arrays of convertible types.
 
     namespace boost {
-
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < typename T1, typename T2, std::size_t N>
             struct convert_to< array<T1,N>, array<T2,N> > {
@@ -794,7 +898,7 @@
             struct assign_to< array<T1,N>, array<T2,N> > {
                 static array<T1,N>& apply(array<T1,N>& to, array<T2,N> const & from);
             };
- }
+ }}
     }
 
 
@@ -807,6 +911,7 @@
 Include this file when using conversions between fusion::tuple of convertible types.
 
     namespace boost {
+ namespace conversion {
         namespace partial_specialization_workaround {
             template < class T1, ..., class Tn, class U1, ..., class Un>
             struct convert_to< boost::fusion::tuple<T1,...,T3>, boost::fusion::tuple<U1,...,U3> > {
@@ -819,7 +924,7 @@
                 apply(boost::fusion::tuple<T1,...,T3>& to, boost::fusion::tuple<U1,...,U3> const & from);
             };
 
- }
+ }}
     }
 
 [endsect]
@@ -844,17 +949,30 @@
 [/=================]
 [section Appendices]
 [/=================]
+
 [section:history Appendix A: History]
-[section [*Version 0.3.0, Oct 22, 2009] ['Changing the order of `to` and `from` parameters on __assign_to__ + Added `mca' function]]
 
-[*Incopatibility:]
+[section [*Version 0.4.0, October 27, 2009] ['Applying the same technique that boost::swap applies making use of ADL]]
+[*New Features:]
+
+A `Source` class is convertible to a `Target` class if:
+
+* Either: A function with the signature `convert_to<Target>(Source const&, boost::dummy::type_tag<To> const&)` is available via argument dependent lookup
+* Or: A template specialization of `boost::conversion::convert_to<Target, Source>` exists for `Target` and `Source`
+* Or: `Target` is copy constructible from `Source` (default implementation)
+
+[endsect]
+
+[section [*Version 0.3.0, October 22, 2009] ['Changing the order of `to` and `from` parameters on __assign_to__ function + Added `mca` function]]
+
+[*Incompatibility:]
 
 * Changing the order of `to` and `from` parameters on __assign_to__.
 * Now `boost/conversion/convert_to.hpp` and `boost/conversion/assign_to.hpp` files are separated.
 
 [*New Features:]
 
-* Added <boost/conversion.hpp> global file.
+* Added `<boost/conversion.hpp>` global file.
 * Added `mca()` function.
 * Added `convert_to_via` function.
 
@@ -877,8 +995,8 @@
 
 [*Features:]
 
-* a generic __convert_to__ function which can be specialized by the user to make explict conversion between unrelated types.
-* a generic __assign_to__ function which can be specialized by the user to make explict assignation between unrelated types.
+* a generic __convert_to__ function which can be specialized by the user to make explicit conversion between unrelated types.
+* a generic __assign_to__ function which can be specialized by the user to make explicit assignation between unrelated types.
 * conversion between C-arrays of explicitly convertible types.
 
 * conversion between `std::complex` of explicitly convertible types.
@@ -897,6 +1015,51 @@
 
 [section:rationale Appendix B: Rationale]
 
+[heading Trick to avoid recursion on the convert_to calls]
+
+The implementation of this utility contains various workarounds:
+
+* `conversion_impl` is put outside the boost namespace, to avoid infinite recursion (causing stack overflow) when converting objects of a primitive type.
+* `conversion_impl` has a using-directive `using namespace boost::conversion;`, rather than a using-declaration, because some compilers (including MSVC 7.1, Borland 5.9.3, and Intel 8.1) don't do argument-dependent lookup when it has a using-declaration instead.
+* `boost::convert_to` has an additional template argument, a tag, to avoid ambiguity between the `boost::conversion::convert_to` and `boost::convert_to` and the when converting from objects of a Boost type that does not have its own `boost::convert_to` overload. This additional argument is a reference to a base tag class `dummy::base_tag<Target> const&` for the `boost::convert_to` and a reference derived tag class `dummy::type_tag<To> const&` for all others.
+
+ namespace dummy {
+ template <typename T> struct base_tag {};
+ template <typename T> struct type_tag : public base_tag<T> {};
+ }
+
+In this way
+
+ template <typename Target, typename Source>
+ Target boost::convert_to(Source const& from, dummy::base_tag<Target> const& p=dummy::base_tag<Target>()) {
+
+would be never chosen when called in this context
+
+ using namespace boost::conversion;
+ return convert_to(from, dummy::type_tag<Target>());
+
+as the library defines
+
+ namespace conversion {
+ template < typename To, typename From >
+ To boost::convert_to(const From& val, dummy::type_tag<To> const&);
+ }
+
+[heading Trick to avoid the use of the tag on the user side]
+
+The tag type is there to avoid infinite recursion, but it is quite cumbersome at the user side.
+
+ a = convert_to(b, dummy::type_tag<A>());
+
+To avoid to pass it as parameter the tag parameter has a default value boost::dummy::base_tag<Target>().
+
+ template <typename Target, typename Source>
+ Target boost::convert_to(Source const& from, boost::dummy::base_tag<Target> const& p=boost::dummy::base_tag<Target>()) {
+
+This default value needs however to give the Target template parameter
+
+ a= convert_to<A>(b);
+
 [heading Mathematical background]
 
 Let be
@@ -907,17 +1070,17 @@
 
 * Reflexive: A is convertible to A if it is CopyConstructible or a specialization of convert_to is provided.
 
-* AntiSymetric : A convertible to B don't implies B convertible to A
+* Anti-Symetric : A convertible to B don't implies B convertible to A
 
-* Loss of precission: Conversions can loss precission but not at infinitum
+* Loss of precision: Conversions can loss precision but not at infinitum
 
-Two convertible types don't loss precission if
+Two convertible types don't loss precision if
 
     b = convert_to<B>(a);
     a2 = convert_to<A>(b);
     assert(a==a2);
 
-If they can loss precission they satisfy
+If they can loss precision they satisfy
 
     b = convert_to<B>(a)
     a2 = convert_to<A>(b)
@@ -934,24 +1097,29 @@
 
 The library provides a convert_to_via function which helps to implement that.
 
-[heading Why use partial function specialization and not ADL?]
+
+[heading Ambiguity of multiple overloadins]
+
+[warning Ambiguity of multiple overloadins]
 
 
 [endsect]
 
 [section:implementation Appendix C: Implementation Notes]
 
+
 [heading Why `convert_to` between tuples is not implemented using `boost::fusion::transform`?]
 
-`convert_to<T>` is a kind of transaformation, so the natural implementation of `convert_to` for homegeneus containers could be to use the transform function.
+`convert_to<T>` is a kind of transformation, so the natural implementation of `convert_to` for homogeneous containers could be to use the transform function.
 
-This can not be applied to heterogeneus containers as tuples because the function change with the type.
+This can not be applied to heterogeneous containers as tuples because the function change with the type.
 
 [endsect]
 [section:acknowledgements Appendix D: Acknowledgements]
 
 Thanks to Vladimir Batov proposing Boost.StringConversion which was the source of inspiration of this generic library.
-Thanks to Edward Diener to showing me indirectly that multiple assignements should be taken in account.
+Thanks to Edward Diener to showing me indirectly that multiple assignments should be taken in account.
+Thanks to Jeffrey Hellrung to showing me that Boost.Conversion should use also ADL.
 
 [endsect]
 [section Appendix E: Tests]
@@ -960,26 +1128,26 @@
 [table
     [[Name] [kind] [Description] [Result] [Ticket]]
     [[convert_to_with_builtin_types] [run] [check `convert_to` works for builting types] [Pass] [#]]
- [[assign_to_with_builtin_types] [run] [check `assign_to` works for builting types] [Pass] [#]]
+ [[assign_to_with_builtin_types] [run] [check `assign_to` works for builtin types] [Pass] [#]]
     [[assign_to_transitive] [run] [Use of `assign_to` transitively] [Pass] [#]]
- [[mca_assign_to_with_builtin_types] [run] [check `mca` `works` for builting types] [Pass] [#]]
- [[mca_assign_to_transitive] [run] [use of `mca` to multiple assignements] [Pass] [#]]
+ [[mca_assign_to_with_builtin_types] [run] [check `mca` `works` for builtin types] [Pass] [#]]
+ [[mca_assign_to_transitive] [run] [use of `mca` to multiple assignments] [Pass] [#]]
 ]
 [endsect]
 
 
-[section Intrinsec Conversions]
+[section Intrinsic Conversions]
 [table
     [[Name] [kind] [Description] [Result] [Ticket]]
     [[convert_to_with_implicit_constructor] [run] [check `convert_to` works when there is an implicit constructor] [Pass] [#]]
     [[convert_to_with_explicit_constructor] [run] [check `convert_to` works when there is an explicit constructor] [Pass] [#]]
     [[convert_to_with_conversion_operator] [run] [check `assign_to` works when there is an conversion operator] [Pass] [#]]
- [[assign_to_with_assignemet_operator] [run] [check `assign_to` works when there is an assignement operator] [Pass] [#]]
- [[assign_to_with_assignemet_operator_and_implicit_constructor] [run] [check `assign_to` works when there is an assignemet operator and implicit constructor] [Pass] [#]]
- [[assign_to_with_assignemet_operator_and_conversion_operator] [run] [check `convert_to` works when there is an assignemet operator and a conversion operator] [Pass] [#]]
- [[mca_with_assignemet_operator] [run] [check `mca` works when there is an assignement operator] [Pass] [#]]
- [[mca_with_assignemet_operator_and_implicit_constructor] [run] [check `mca` works when there is an assignemet operator and implicit constructor] [Pass] [#]]
- [[mca_with_assignemet_operator_and_conversion_operator] [run] [check `mca` works when there is an assignemet operator and a conversion operator] [Pass] [#]]
+ [[assign_to_with_assignment_operator] [run] [check `assign_to` works when there is an assignment operator] [Pass] [#]]
+ [[assign_to_with_assignment_operator_and_implicit_constructor] [run] [check `assign_to` works when there is an assignment operator and implicit constructor] [Pass] [#]]
+ [[assign_to_with_assignment_operator_and_conversion_operator] [run] [check `convert_to` works when there is an assignment operator and a conversion operator] [Pass] [#]]
+ [[mca_with_assignment_operator] [run] [check `mca` works when there is an assignment operator] [Pass] [#]]
+ [[mca_with_assignment_operator_and_implicit_constructor] [run] [check `mca` works when there is an assignment operator and implicit constructor] [Pass] [#]]
+ [[mca_with_assignment_operator_and_conversion_operator] [run] [check `mca` works when there is an assignment operator and a conversion operator] [Pass] [#]]
 ]
 [endsect]
 
@@ -1028,13 +1196,12 @@
 
 [heading Tasks to do before review]
 
-* On compilers supporting partial template functions specialization no use of the workarround.
 * Add conversion between std::vector of explicitly convertible types.
 * Add a is_convertible_to metafunction. Inherits: If an imaginary lvalue of type From is convertible to type To using convert_to then inherits from true_type, otherwise inherits from false_type.
 
     template <class From, class To>
     struct is_convertible : public true_type-or-false_type {};
-
+
 * Add a is_asignable_to metafunction.
 
 [heading For later releases]
@@ -1044,9 +1211,19 @@
 
 [heading Make a proposal to the C++ standard]
 
-C++1x has added explicit conversion operators, but they must always be defined in the Source class. The same applies to the assignement operator, it must be defined on the Target class.
+C++1x has added explicit conversion operators, but they must always be defined in the Source class. The same applies to the assignment operator, it must be defined on the Target class.
 
-It will be interesting to be able to implicitly or explicitly add extrinsic conversion operators between unrelated types. Assignement operators could also be specialized.
+What it will interesting is to be able to add constructors and assignments operators to the class std::pair, so we can say that two pairs are convertible if the parameters are explicitly convertible using a convert_to function
+
+ template<class U , class V>
+ //requires HasConvertTo<T1, const U&> && HasConvertTo<T2, const V&>
+ std::pair& operator=(const std::pair<U , V>& p) {
+ return std::make_pair(convert_to<T1>(p.first), convert_to<T1>(p.second));
+ }
+
+But this is not possible. We can not add operations to a class.
+
+Another possibility could be to make an evolution to the standard, so the convertible concept takes car of extrinsic conversions. We could be able to implicitly or explicitly add extrinsic conversion operators between unrelated types. Assignment operators could also be specialized.
 
   template < typename To, typename From >
   operator To(const From& val);
@@ -1054,7 +1231,7 @@
   template < typename To, typename From >
   To& operator=(To& to, const From& from);
 
-For example we could specialize this the conversion from as chrono::time_point<Clock, Duration> to posix_time::ptime follows
+For example we could specialize the conversion from as chrono::time_point<Clock, Duration> to posix_time::ptime follows
 
     template < class Clock, class Duration>
     operator boost::posix_time::ptime(const boost::chrono::time_point<Clock, Duration>& from) {
@@ -1073,4 +1250,3 @@
 [endsect]
 
 
-

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -29,9 +29,11 @@
 <div class="toc"><dl>
 <dt><span class="section"> Appendix A: History</span></dt>
 <dd><dl>
-<dt><span class="section"><a href="appendices/history.html#boost.conversion.appendices.history.__version_0_3_0__oct_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to_____added__mca__function_"><span class="bold"><strong>Version 0.3.0, Oct 22, 2009</strong></span> <span class="emphasis"><em>Changing the
- order of <code class="computeroutput"><span class="identifier">to</span></code> and <code class="computeroutput"><span class="identifier">from</span></code> parameters on <code class="computeroutput"><span class="identifier">assign_to</span></code>
- + Added `mca' function</em></span></a></span></dt>
+<dt><span class="section"><a href="appendices/history.html#boost.conversion.appendices.history.__version_0_4_0__october_27__2009____applying_the_same_technique_that_boost__swap_applies_making_use_of_adl_"><span class="bold"><strong>Version 0.4.0, October 27, 2009</strong></span> <span class="emphasis"><em>Applying
+ the same technique that boost::swap applies making use of ADL</em></span></a></span></dt>
+<dt><span class="section"><a href="appendices/history.html#boost.conversion.appendices.history.__version_0_3_0__october_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to___function___added__mca__function_"><span class="bold"><strong>Version 0.3.0, October 22, 2009</strong></span> <span class="emphasis"><em>Changing
+ the order of <code class="computeroutput"><span class="identifier">to</span></code> and <code class="computeroutput"><span class="identifier">from</span></code> parameters on <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ function + Added <code class="computeroutput"><span class="identifier">mca</span></code> function</em></span></a></span></dt>
 <dt><span class="section"><a href="appendices/history.html#boost.conversion.appendices.history.__version_0_2_0__mai_16__2009____adding_array___fusion__tuples___adaptation_to_boost_1_39_"><span class="bold"><strong>Version 0.2.0, Mai 16, 2009</strong></span> <span class="emphasis"><em>Adding array
         + fusion::tuples + Adaptation to Boost 1.39</em></span></a></span></dt>
 <dt><span class="section"><a href="appendices/history.html#boost.conversion.appendices.history.__version_0_1_0__april_16__2009____announcement_of_conversions_"><span class="bold"><strong>Version 0.1.0, April 16, 2009</strong></span> <span class="emphasis"><em>Announcement
@@ -46,7 +48,7 @@
       E: Tests</a></span></dt>
 <dd><dl>
 <dt><span class="section">Builtins</span></dt>
-<dt><span class="section"><a href="appendices/appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.intrinsec_conversions">Intrinsec
+<dt><span class="section"><a href="appendices/appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.intrinsic_conversions">Intrinsic
         Conversions</a></span></dt>
 <dt><span class="section"><a href="appendices/appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.extrinsic_conversions">Extrinsic
         Conversions</a></span></dt>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/acknowledgements.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/acknowledgements.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/acknowledgements.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -34,7 +34,8 @@
 <p>
         Thanks to Vladimir Batov proposing Boost.StringConversion which was the source
         of inspiration of this generic library. Thanks to Edward Diener to showing
- me indirectly that multiple assignements should be taken in account.
+ me indirectly that multiple assignments should be taken in account. Thanks
+ to Jeffrey Hellrung to showing me that Boost.Conversion should use also ADL.
       </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/appendix_e__tests.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/appendix_e__tests.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/appendix_e__tests.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -33,7 +33,7 @@
 </h3></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section">Builtins</span></dt>
-<dt><span class="section"><a href="appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.intrinsec_conversions">Intrinsec
+<dt><span class="section"><a href="appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.intrinsic_conversions">Intrinsic
         Conversions</a></span></dt>
 <dt><span class="section"><a href="appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.extrinsic_conversions">Extrinsic
         Conversions</a></span></dt>
@@ -122,7 +122,7 @@
 <td>
                 <p>
                   check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works for builting types
+ works for builtin types
                 </p>
                 </td>
 <td>
@@ -177,7 +177,7 @@
                 </td>
 <td>
                 <p>
- check <code class="computeroutput"><span class="identifier">mca</span></code> <code class="computeroutput"><span class="identifier">works</span></code> for builting types
+ check <code class="computeroutput"><span class="identifier">mca</span></code> <code class="computeroutput"><span class="identifier">works</span></code> for builtin types
                 </p>
                 </td>
 <td>
@@ -205,7 +205,7 @@
 <td>
                 <p>
                   use of <code class="computeroutput"><span class="identifier">mca</span></code> to multiple
- assignements
+ assignments
                 </p>
                 </td>
 <td>
@@ -224,8 +224,8 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost.conversion.appendices.appendix_e__tests.intrinsec_conversions"></a><a href="appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.intrinsec_conversions" title="Intrinsec
- Conversions">Intrinsec
+<a name="boost.conversion.appendices.appendix_e__tests.intrinsic_conversions"></a><a href="appendix_e__tests.html#boost.conversion.appendices.appendix_e__tests.intrinsic_conversions" title="Intrinsic
+ Conversions">Intrinsic
         Conversions</a>
 </h4></div></div></div>
 <div class="informaltable"><table class="table">
@@ -351,7 +351,7 @@
 <tr>
 <td>
                 <p>
- assign_to_with_assignemet_operator
+ assign_to_with_assignment_operator
                 </p>
                 </td>
 <td>
@@ -362,7 +362,7 @@
 <td>
                 <p>
                   check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works when there is an assignement operator
+ works when there is an assignment operator
                 </p>
                 </td>
 <td>
@@ -379,7 +379,7 @@
 <tr>
 <td>
                 <p>
- assign_to_with_assignemet_operator_and_implicit_constructor
+ assign_to_with_assignment_operator_and_implicit_constructor
                 </p>
                 </td>
 <td>
@@ -390,7 +390,7 @@
 <td>
                 <p>
                   check <code class="computeroutput"><span class="identifier">assign_to</span></code>
- works when there is an assignemet operator and implicit constructor
+ works when there is an assignment operator and implicit constructor
                 </p>
                 </td>
 <td>
@@ -407,7 +407,7 @@
 <tr>
 <td>
                 <p>
- assign_to_with_assignemet_operator_and_conversion_operator
+ assign_to_with_assignment_operator_and_conversion_operator
                 </p>
                 </td>
 <td>
@@ -418,7 +418,7 @@
 <td>
                 <p>
                   check <code class="computeroutput"><span class="identifier">convert_to</span></code>
- works when there is an assignemet operator and a conversion operator
+ works when there is an assignment operator and a conversion operator
                 </p>
                 </td>
 <td>
@@ -435,7 +435,7 @@
 <tr>
 <td>
                 <p>
- mca_with_assignemet_operator
+ mca_with_assignment_operator
                 </p>
                 </td>
 <td>
@@ -446,7 +446,7 @@
 <td>
                 <p>
                   check <code class="computeroutput"><span class="identifier">mca</span></code> works
- when there is an assignement operator
+ when there is an assignment operator
                 </p>
                 </td>
 <td>
@@ -463,7 +463,7 @@
 <tr>
 <td>
                 <p>
- mca_with_assignemet_operator_and_implicit_constructor
+ mca_with_assignment_operator_and_implicit_constructor
                 </p>
                 </td>
 <td>
@@ -474,7 +474,7 @@
 <td>
                 <p>
                   check <code class="computeroutput"><span class="identifier">mca</span></code> works
- when there is an assignemet operator and implicit constructor
+ when there is an assignment operator and implicit constructor
                 </p>
                 </td>
 <td>
@@ -491,7 +491,7 @@
 <tr>
 <td>
                 <p>
- mca_with_assignemet_operator_and_conversion_operator
+ mca_with_assignment_operator_and_conversion_operator
                 </p>
                 </td>
 <td>
@@ -502,7 +502,7 @@
 <td>
                 <p>
                   check <code class="computeroutput"><span class="identifier">mca</span></code> works
- when there is an assignemet operator and a conversion operator
+ when there is an assignment operator and a conversion operator
                 </p>
                 </td>
 <td>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/history.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/history.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/history.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -27,9 +27,11 @@
 <a name="boost.conversion.appendices.history"></a> Appendix A: History
 </h3></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="history.html#boost.conversion.appendices.history.__version_0_3_0__oct_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to_____added__mca__function_"><span class="bold"><strong>Version 0.3.0, Oct 22, 2009</strong></span> <span class="emphasis"><em>Changing the
- order of <code class="computeroutput"><span class="identifier">to</span></code> and <code class="computeroutput"><span class="identifier">from</span></code> parameters on <code class="computeroutput"><span class="identifier">assign_to</span></code>
- + Added `mca' function</em></span></a></span></dt>
+<dt><span class="section"><a href="history.html#boost.conversion.appendices.history.__version_0_4_0__october_27__2009____applying_the_same_technique_that_boost__swap_applies_making_use_of_adl_"><span class="bold"><strong>Version 0.4.0, October 27, 2009</strong></span> <span class="emphasis"><em>Applying
+ the same technique that boost::swap applies making use of ADL</em></span></a></span></dt>
+<dt><span class="section"><a href="history.html#boost.conversion.appendices.history.__version_0_3_0__october_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to___function___added__mca__function_"><span class="bold"><strong>Version 0.3.0, October 22, 2009</strong></span> <span class="emphasis"><em>Changing
+ the order of <code class="computeroutput"><span class="identifier">to</span></code> and <code class="computeroutput"><span class="identifier">from</span></code> parameters on <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ function + Added <code class="computeroutput"><span class="identifier">mca</span></code> function</em></span></a></span></dt>
 <dt><span class="section"><a href="history.html#boost.conversion.appendices.history.__version_0_2_0__mai_16__2009____adding_array___fusion__tuples___adaptation_to_boost_1_39_"><span class="bold"><strong>Version 0.2.0, Mai 16, 2009</strong></span> <span class="emphasis"><em>Adding array
         + fusion::tuples + Adaptation to Boost 1.39</em></span></a></span></dt>
 <dt><span class="section"><a href="history.html#boost.conversion.appendices.history.__version_0_1_0__april_16__2009____announcement_of_conversions_"><span class="bold"><strong>Version 0.1.0, April 16, 2009</strong></span> <span class="emphasis"><em>Announcement
@@ -37,14 +39,45 @@
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost.conversion.appendices.history.__version_0_3_0__oct_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to_____added__mca__function_"></a><a href="history.html#boost.conversion.appendices.history.__version_0_3_0__oct_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to_____added__mca__function_" title="Version 0.3.0, Oct 22, 2009 Changing the
- order of to and from parameters on assign_to
- + Added `mca' function"><span class="bold"><strong>Version 0.3.0, Oct 22, 2009</strong></span> <span class="emphasis"><em>Changing the
- order of <code class="computeroutput"><span class="identifier">to</span></code> and <code class="computeroutput"><span class="identifier">from</span></code> parameters on <code class="computeroutput"><span class="identifier">assign_to</span></code>
- + Added `mca' function</em></span></a>
+<a name="boost.conversion.appendices.history.__version_0_4_0__october_27__2009____applying_the_same_technique_that_boost__swap_applies_making_use_of_adl_"></a><a href="history.html#boost.conversion.appendices.history.__version_0_4_0__october_27__2009____applying_the_same_technique_that_boost__swap_applies_making_use_of_adl_" title="Version 0.4.0, October 27, 2009 Applying
+ the same technique that boost::swap applies making use of ADL"><span class="bold"><strong>Version 0.4.0, October 27, 2009</strong></span> <span class="emphasis"><em>Applying
+ the same technique that boost::swap applies making use of ADL</em></span></a>
 </h4></div></div></div>
 <p>
- <span class="bold"><strong>Incopatibility:</strong></span>
+ <span class="bold"><strong>New Features:</strong></span>
+ </p>
+<p>
+ A <code class="computeroutput"><span class="identifier">Source</span></code> class is convertible
+ to a <code class="computeroutput"><span class="identifier">Target</span></code> class if:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Either: A function with the signature <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">Source</span>
+ <span class="keyword">const</span><span class="special">&amp;,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span></code>
+ is available via argument dependent lookup
+ </li>
+<li>
+ Or: A template specialization of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">&gt;</span></code> exists for <code class="computeroutput"><span class="identifier">Target</span></code>
+ and <code class="computeroutput"><span class="identifier">Source</span></code>
+</li>
+<li>
+ Or: <code class="computeroutput"><span class="identifier">Target</span></code> is copy constructible
+ from <code class="computeroutput"><span class="identifier">Source</span></code> (default
+ implementation)
+ </li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost.conversion.appendices.history.__version_0_3_0__october_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to___function___added__mca__function_"></a><a href="history.html#boost.conversion.appendices.history.__version_0_3_0__october_22__2009____changing_the_order_of__to__and__from__parameters_on___assign_to___function___added__mca__function_" title="Version 0.3.0, October 22, 2009 Changing
+ the order of to and from parameters on assign_to
+ function + Added mca function"><span class="bold"><strong>Version 0.3.0, October 22, 2009</strong></span> <span class="emphasis"><em>Changing
+ the order of <code class="computeroutput"><span class="identifier">to</span></code> and <code class="computeroutput"><span class="identifier">from</span></code> parameters on <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ function + Added <code class="computeroutput"><span class="identifier">mca</span></code> function</em></span></a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>Incompatibility:</strong></span>
         </p>
 <div class="itemizedlist"><ul type="disc">
 <li>
@@ -62,7 +95,7 @@
         </p>
 <div class="itemizedlist"><ul type="disc">
 <li>
- Added &lt;boost/conversion.hpp&gt; global file.
+ Added <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code> global file.
           </li>
 <li>
             Added <code class="computeroutput"><span class="identifier">mca</span><span class="special">()</span></code>
@@ -111,12 +144,12 @@
 <div class="itemizedlist"><ul type="disc">
 <li>
             a generic <code class="computeroutput"><span class="identifier">convert_to</span></code>
- function which can be specialized by the user to make explict conversion
+ function which can be specialized by the user to make explicit conversion
             between unrelated types.
           </li>
 <li>
             a generic <code class="computeroutput"><span class="identifier">assign_to</span></code> function
- which can be specialized by the user to make explict assignation between
+ which can be specialized by the user to make explicit assignation between
             unrelated types.
           </li>
 <li>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/implementation.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/implementation.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/implementation.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -31,18 +31,18 @@
       C: Implementation Notes</a>
 </h3></div></div></div>
 <a name="boost.conversion.appendices.implementation.why__code__phrase_role__identifier__convert_to__phrase___code__between_tuples_is_not_implemented_using__code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__fusion__phrase__phrase_role__special______phrase__phrase_role__identifier__transform__phrase___code__"></a><h4>
-<a name="id4830841"></a>
+<a name="id4837955"></a>
         <a href="implementation.html#boost.conversion.appendices.implementation.why__code__phrase_role__identifier__convert_to__phrase___code__between_tuples_is_not_implemented_using__code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__fusion__phrase__phrase_role__special______phrase__phrase_role__identifier__transform__phrase___code__">Why
         <code class="computeroutput"><span class="identifier">convert_to</span></code> between tuples
         is not implemented using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">transform</span></code>?</a>
       </h4>
 <p>
         <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span></code> is
- a kind of transaformation, so the natural implementation of <code class="computeroutput"><span class="identifier">convert_to</span></code> for homegeneus containers could
+ a kind of transformation, so the natural implementation of <code class="computeroutput"><span class="identifier">convert_to</span></code> for homogeneous containers could
         be to use the transform function.
       </p>
 <p>
- This can not be applied to heterogeneus containers as tuples because the
+ This can not be applied to heterogeneous containers as tuples because the
         function change with the type.
       </p>
 </div>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/rationale.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/rationale.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/rationale.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -27,8 +27,90 @@
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost.conversion.appendices.rationale"></a> Appendix B: Rationale
 </h3></div></div></div>
+<a name="boost.conversion.appendices.rationale.trick_to_avoid_recursion_on_the_convert_to_calls"></a><h4>
+<a name="id4836138"></a>
+ <a href="rationale.html#boost.conversion.appendices.rationale.trick_to_avoid_recursion_on_the_convert_to_calls">Trick
+ to avoid recursion on the convert_to calls</a>
+ </h4>
+<p>
+ The implementation of this utility contains various workarounds:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="computeroutput"><span class="identifier">conversion_impl</span></code> is put
+ outside the boost namespace, to avoid infinite recursion (causing stack
+ overflow) when converting objects of a primitive type.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">conversion_impl</span></code> has a using-directive
+ <code class="computeroutput"><span class="keyword">using</span> <span class="keyword">namespace</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">;</span></code>,
+ rather than a using-declaration, because some compilers (including MSVC
+ 7.1, Borland 5.9.3, and Intel 8.1) don't do argument-dependent lookup when
+ it has a using-declaration instead.
+ </li>
+<li>
+<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> has an additional template
+ argument, a tag, to avoid ambiguity between the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span></code>
+ and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> and the when converting from
+ objects of a Boost type that does not have its own <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code>
+ overload. This additional argument is a reference to a base tag class
+ <code class="computeroutput"><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span>
+ <span class="keyword">const</span><span class="special">&amp;</span></code>
+ for the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span></code> and a reference derived tag
+ class <code class="computeroutput"><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span></code>
+ for all others.
+ </li>
+</ul></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">dummy</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">base_tag</span> <span class="special">{};</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">type_tag</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">{};</span>
+<span class="special">}</span>
+</pre>
+<p>
+ In this way
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">&gt;</span>
+<span class="identifier">Target</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">=</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;())</span> <span class="special">{</span>
+</pre>
+<p>
+ would be never chosen when called in this context
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">;</span>
+<span class="keyword">return</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;());</span>
+</pre>
+<p>
+ as the library defines
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
+ <span class="identifier">To</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+<span class="special">}</span>
+</pre>
+<a name="boost.conversion.appendices.rationale.trick_to_avoid_the_use_of_the_tag_on_the_user_side"></a><h4>
+<a name="id4837036"></a>
+ <a href="rationale.html#boost.conversion.appendices.rationale.trick_to_avoid_the_use_of_the_tag_on_the_user_side">Trick
+ to avoid the use of the tag on the user side</a>
+ </h4>
+<p>
+ The tag type is there to avoid infinite recursion, but it is quite cumbersome
+ at the user side.
+ </p>
+<pre class="programlisting"><span class="identifier">a</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;());</span>
+</pre>
+<p>
+ To avoid to pass it as parameter the tag parameter has a default value boost::dummy::base_tag&lt;Target&gt;().
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">&gt;</span>
+<span class="identifier">Target</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">=</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span cl
ass="special">&gt;())</span> <span class="special">{</span>
+</pre>
+<p>
+ This default value needs however to give the Target template parameter
+ </p>
+<pre class="programlisting"><span class="identifier">a</span><span class="special">=</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;(</span><span class="identifier">b</span><span class="special">);</span>
+</pre>
 <a name="boost.conversion.appendices.rationale.mathematical_background"></a><h4>
-<a name="id4830276"></a>
+<a name="id4837384"></a>
         <a href="rationale.html#boost.conversion.appendices.rationale.mathematical_background">Mathematical
         background</a>
       </h4>
@@ -45,21 +127,21 @@
           of convert_to is provided.
         </li>
 <li>
- AntiSymetric : A convertible to B don't implies B convertible to A
+ Anti-Symetric : A convertible to B don't implies B convertible to A
         </li>
 <li>
- Loss of precission: Conversions can loss precission but not at infinitum
+ Loss of precision: Conversions can loss precision but not at infinitum
         </li>
 </ul></div>
 <p>
- Two convertible types don't loss precission if
+ Two convertible types don't loss precision if
       </p>
 <pre class="programlisting"><span class="identifier">b</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">&gt;(</span><span class="identifier">a</span><span class="special">);</span>
 <span class="identifier">a2</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;(</span><span class="identifier">b</span><span class="special">);</span>
 <span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span><span class="special">==</span><span class="identifier">a2</span><span class="special">);</span>
 </pre>
 <p>
- If they can loss precission they satisfy
+ If they can loss precision they satisfy
       </p>
 <pre class="programlisting"><span class="identifier">b</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">&gt;(</span><span class="identifier">a</span><span class="special">)</span>
 <span class="identifier">a2</span> <span class="special">=</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;(</span><span class="identifier">b</span><span class="special">)</span>
@@ -81,11 +163,20 @@
 <p>
         The library provides a convert_to_via function which helps to implement that.
       </p>
-<a name="boost.conversion.appendices.rationale.why_use_partial_function_specialization_and_not_adl_"></a><h4>
-<a name="id4830797"></a>
- <a href="rationale.html#boost.conversion.appendices.rationale.why_use_partial_function_specialization_and_not_adl_">Why
- use partial function specialization and not ADL?</a>
+<a name="boost.conversion.appendices.rationale.ambiguity_of_multiple_overloadins"></a><h4>
+<a name="id4837905"></a>
+ <a href="rationale.html#boost.conversion.appendices.rationale.ambiguity_of_multiple_overloadins">Ambiguity
+ of multiple overloadins</a>
       </h4>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../../doc/html/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Ambiguity of multiple overloadins
+ </p></td></tr>
+</table></div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/todo.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/todo.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/appendices/todo.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -30,16 +30,12 @@
       plans</a>
 </h3></div></div></div>
 <a name="boost.conversion.appendices.todo.tasks_to_do_before_review"></a><h4>
-<a name="id4833238"></a>
+<a name="id4840353"></a>
         <a href="todo.html#boost.conversion.appendices.todo.tasks_to_do_before_review">Tasks
         to do before review</a>
       </h4>
 <div class="itemizedlist"><ul type="disc">
 <li>
- On compilers supporting partial template functions specialization no use
- of the workarround.
- </li>
-<li>
           Add conversion between std::vector of explicitly convertible types.
         </li>
 <li>
@@ -55,7 +51,7 @@
           Add a is_asignable_to metafunction.
         </li></ul></div>
 <a name="boost.conversion.appendices.todo.for_later_releases"></a><h4>
-<a name="id4833390"></a>
+<a name="id4840499"></a>
         <a href="todo.html#boost.conversion.appendices.todo.for_later_releases">For later
         releases</a>
       </h4>
@@ -68,19 +64,34 @@
         </li>
 </ul></div>
 <a name="boost.conversion.appendices.todo.make_a_proposal_to_the_c___standard"></a><h4>
-<a name="id4833424"></a>
+<a name="id4840533"></a>
         <a href="todo.html#boost.conversion.appendices.todo.make_a_proposal_to_the_c___standard">Make
         a proposal to the C++ standard</a>
       </h4>
 <p>
         C++1x has added explicit conversion operators, but they must always be defined
- in the Source class. The same applies to the assignement operator, it must
+ in the Source class. The same applies to the assignment operator, it must
         be defined on the Target class.
       </p>
 <p>
- It will be interesting to be able to implicitly or explicitly add extrinsic
- conversion operators between unrelated types. Assignement operators could
- also be specialized.
+ What it will interesting is to be able to add constructors and assignments
+ operators to the class std::pair, so we can say that two pairs are convertible
+ if the parameters are explicitly convertible using a convert_to function
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">U</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">&gt;</span>
+<span class="comment">//requires HasConvertTo&lt;T1, const U&amp;&gt; &amp;&amp; HasConvertTo&lt;T2, const V&amp;&gt;
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">U</span> <span class="special">,</span> <span class="identifier">V</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">&gt;(</span><span class="identifier">p</span><span class="special">.</span><span class="identifier">first</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">&gt;(</span><span class="identifier">p</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
+<span class="special">}</span>
+</pre>
+<p>
+ But this is not possible. We can not add operations to a class.
+ </p>
+<p>
+ Another possibility could be to make an evolution to the standard, so the
+ convertible concept takes car of extrinsic conversions. We could be able
+ to implicitly or explicitly add extrinsic conversion operators between unrelated
+ types. Assignment operators could also be specialized.
       </p>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
 <span class="keyword">operator</span> <span class="identifier">To</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
@@ -89,7 +100,7 @@
 <span class="identifier">To</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
 </pre>
 <p>
- For example we could specialize this the conversion from as chrono::time_point&lt;Clock,
+ For example we could specialize the conversion from as chrono::time_point&lt;Clock,
         Duration&gt; to posix_time::ptime follows
       </p>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/boost__optional.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/boost__optional.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/boost__optional.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -39,10 +39,12 @@
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">none</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
 <span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
 
- <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_NO_FUNCTION_TEMPLATE_ORDERING</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Source</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;,</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
             <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">from</span><span class="special">)</span>
@@ -59,7 +61,23 @@
             <span class="special">}</span>
         <span class="special">};</span>
 
+ <span class="special">}}</span>
+ <span class="preprocessor">#else</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Source</span><span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">from</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="special">(</span><span class="identifier">from</span><span class="special">?</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">get</span><span class="special">())):</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;());</span>
     <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Source</span><span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;&amp;</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span>
+ <span class="special">{</span>
+ <span class="identifier">to</span> <span class="special">=</span> <span class="identifier">from</span><span class="special">?</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">get</span><span class="special">()):</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;();</span>
+ <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="preprocessor">#endif</span>
 <span class="special">}</span>
 
 <span class="preprocessor">#endif</span>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/chrono__time_point_and_posix_time__ptime.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/chrono__time_point_and_posix_time__ptime.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/chrono__time_point_and_posix_time__ptime.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -42,10 +42,11 @@
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">date_time</span><span class="special">/</span><span class="identifier">posix_time</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
 <span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
-
- <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_NO_FUNCTION_TEMPLATE_ORDERING</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
             <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">)</span>
@@ -56,12 +57,12 @@
                 <span class="identifier">rep_t</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special">&lt;</span><span class="identifier">duration_t</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">time_since_epoch</span><span class="special">()).</span><span class="identifier">count</span><span class="special">();</span>
                 <span class="identifier">rep_t</span> <span class="identifier">sec</span> <span class="special">=</span> <span class="identifier">d</span><span class="special">/</span><span class="number">1000000000</span><span class="special">;</span>
                 <span class="identifier">rep_t</span> <span class="identifier">nsec</span> <span class="special">=</span> <span class="identifier">d</span><span class="special">%</span><span class="number">1000000000</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">)+</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;(</span><span class="identifier">sec</span><span class="special">))+</span>
+ <span class="keyword">return</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">)+</span>
+ <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;(</span><span class="identifier">sec</span><span class="special">))+</span>
 <span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_DATE_TIME_HAS_NANOSECONDS</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">);</span>
+ <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">);</span>
 <span class="preprocessor">#else</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">((</span><span class="identifier">nsec</span><span class="special">+</span><span class="number">500</span><span class="special">)/</span><span class="number">1000</span><span class="special">);</span>
+ <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">((</span><span class="identifier">nsec</span><span class="special">+</span><span class="number">500</span><span class="special">)/</span><span class="number">1000</span><span class="special">);</span>
 <span class="preprocessor">#endif</span>
             <span class="special">}</span>
         <span class="special">};</span>
@@ -73,16 +74,16 @@
                 <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
             <span class="special">}</span>
         <span class="special">};</span>
-
+
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;,</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&gt;</span> <span class="special">{</span>
             <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">)</span>
             <span class="special">{</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="keyword">const</span> <span class="identifier">time_since_epoch</span><span class="special">=</span><span class="identifier">from</span><span class="special">-</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
+ <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="keyword">const</span> <span class="identifier">time_since_epoch</span><span class="special">=</span><span class="identifier">from</span><span class="special">-</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
                 <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="identifier">t</span><span class="special">=</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">total_seconds</span><span class="special">());</span>
                 <span class="keyword">long</span> <span class="identifier">nsec</span><span class="special">=</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">fractional_seconds</span><span class="special">()*(</span><span class="number">1000000000</span><span class="special">/</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">ticks_per_second</span><span class="special">());</span>
                 <span class="keyword">return</span> <span class="identifier">t</span><span class="special">+</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">);</span>
-
+
             <span class="special">}</span>
         <span class="special">};</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
@@ -93,7 +94,59 @@
                 <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
             <span class="special">}</span>
         <span class="special">};</span>
+ <span class="special">}}</span>
+ <span class="preprocessor">#else</span>
+ <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="identifier">time_point_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span> <span class="identifier">duration_t</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">duration_t</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">rep_t</span><span class="special">;</span>
+ <span class="identifier">rep_t</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special">&lt;</span><span class="identifier">duration_t</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">time_since_epoch</span><span class="special">()).</span><span class="identifier">count</span><span class="special">();</span>
+ <span class="identifier">rep_t</span> <span class="identifier">sec</span> <span class="special">=</span> <span class="identifier">d</span><span class="special">/</span><span class="number">1000000000</span><span class="special">;</span>
+ <span class="identifier">rep_t</span> <span class="identifier">nsec</span> <span class="special">=</span> <span class="identifier">d</span><span class="special">%</span><span class="number">1000000000</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">)+</span>
+ <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">seconds</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;(</span><span class="identifier">sec</span><span class="special">))+</span>
+<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_DATE_TIME_HAS_NANOSECONDS</span>
+ <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">);</span>
+<span class="preprocessor">#else</span>
+ <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">((</span><span class="identifier">nsec</span><span class="special">+</span><span class="number">500</span><span class="special">)/</span><span class="number">1000</span><span class="special">);</span>
+<span class="preprocessor">#endif</span>
+ <span class="special">}</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&amp;</span> <span class="identifier">from</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span>
+ <span class="special">{</span>
+ <span class="identifier">to</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="special">&gt;(</span><span class="identifier">from</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="special">}</span>
+ <span class="keyword">namespace</span> <span class="identifier">posix_time</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">ptime</span><span class="special">&amp;</span> <span class="identifier">from</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span>
+ <span class="special">{</span>
+ <span class="identifier">time_duration</span> <span class="keyword">const</span> <span class="identifier">time_since_epoch</span><span class="special">=</span><span class="identifier">from</span><span class="special">-</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
+ <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="identifier">t</span><span class="special">=</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">from_time_t</span><span class="special">(</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">total_seconds</span><span class="special">());</span>
+ <span class="keyword">long</span> <span class="identifier">nsec</span><span class="special">=</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">fractional_seconds</span><span class="special">()*(</span><span class="number">1000000000</span><span class="special">/</span><span class="identifier">time_since_epoch</span><span class="special">.</span><span class="identifier">ticks_per_second</span><span class="special">());</span>
+ <span class="keyword">return</span> <span class="identifier">t</span><span class="special">+</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="identifier">nsec</span><span class="special">);</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+ <span class="keyword">inline</span> <span class="identifier">ptime</span><span class="special">&amp;</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">ptime</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span>
+ <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span>
+ <span class="special">{</span>
+ <span class="identifier">to</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">ptime</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
+ <span class="special">}</span>
+
     <span class="special">}</span>
+ <span class="preprocessor">#endif</span>
 <span class="special">}</span>
 
 <span class="preprocessor">#endif</span>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/std__pair.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/std__pair.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/examples/std__pair.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -35,10 +35,11 @@
 <span class="preprocessor">#define</span> <span class="identifier">BOOST_CONVERT_TO_PAIR__HPP</span>
 
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">utility</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="comment">//#include &lt;boost/conversion/convert_to.hpp&gt;
+</span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">assign_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
 
-<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U2</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span><span class="identifier">U2</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -57,7 +58,7 @@
             <span class="special">}</span>
         <span class="special">};</span>
     <span class="special">}</span>
-<span class="special">}</span>
+<span class="special">}}</span>
 
 <span class="preprocessor">#endif</span>
 

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -32,10 +32,27 @@
       <a href="overview.html#boost.conversion.overview.description">Description</a>
     </h3>
 <p>
- Generic explict conversion between unrelated types.
+ Generic explicit conversion between unrelated types.
     </p>
 <p>
- The main source of inspiration of this library were Boost.StringConvert.
+ The template function <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ allows to convert a source type to a target type, using argument dependent
+ lookup to select a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function if available. If no specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function is available, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">conversion</span><span class="special">::</span><span class="identifier">convert_to</span></code>
+ is used.
+ </p>
+<p>
+ The generic <code class="computeroutput"><span class="identifier">convert_to</span></code> function
+ requires that the elements to be converted are assignable and copy constructible.
+ It is implemented using the Target copy construction from a Source or the Source
+ conversion operator Target - this is sometimes unavailable.
+ </p>
+<p>
+ For standard types, we can not add a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function on the namespace std. The alternative to using argument dependent
+ lookup in this situation is to provide a template specialization of boost::conversion::convert_to
+ for every pair of standard types that requires a specialized <code class="computeroutput"><span class="identifier">convert_to</span></code>.
     </p>
 <p>
       <span class="bold"><strong>Boost.Conversion</strong></span> provides:
@@ -43,12 +60,12 @@
 <div class="itemizedlist"><ul type="disc">
 <li>
         a generic <code class="computeroutput"><span class="identifier">convert_to</span></code> function
- which can be specialized by the user to make explict conversion between unrelated
- types.
+ which can be specialized by the user to make explicit conversion between
+ unrelated types.
       </li>
 <li>
         a generic <code class="computeroutput"><span class="identifier">assign_to</span></code> function
- which can be specialized by the user to make explict assignation between
+ which can be specialized by the user to make explicit assignation between
         unrelated types.
       </li>
 <li>
@@ -97,7 +114,7 @@
       </li>
 </ul></div>
 <a name="boost.conversion.overview.how_to_use_this_documentation"></a><h3>
-<a name="id4765018"></a>
+<a name="id4765126"></a>
       <a href="overview.html#boost.conversion.overview.how_to_use_this_documentation">How
       to Use This Documentation</a>
     </h3>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview/motivation.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview/motivation.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/overview/motivation.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -7,7 +7,7 @@
 <link rel="start" href="../../../index.html" title="Toward Boost.Conversion">
 <link rel="up" href="../overview.html" title="Overview">
 <link rel="prev" href="../overview.html" title="Overview">
-<link rel="next" href="../users_guide.html" title=" Users'Guide">
+<link rel="next" href="../users_guide.html" title=" Users' Guide">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -27,27 +27,68 @@
 <a name="boost.conversion.overview.motivation"></a>Motivation
 </h3></div></div></div>
 <p>
- Imagine you need to convert unrelated types <code class="computeroutput"><span class="identifier">Source</span></code>
- and <code class="computeroutput"><span class="identifier">Target</span></code>. You can get it
- by defining a specific function such as
+ I've needed recently to convert from boost::chrono::time_point&lt;Clock,
+ Duration&gt; to boost::posix_time::ptime and from boost::chrono::duration&lt;Rep,
+ Period&gt; to boost::posix_time::time_duration. This kind of conversions
+ are needed quite often when you use code from two different libraries that
+ have implemented the same concept using of course different representations
+ and have hard coded the library interface to its own implementation. Well
+ this is a normal situation we can't avoid. Life is life.
       </p>
-<pre class="programlisting"><span class="identifier">Target</span> <span class="identifier">SourceToTarget</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+<p>
+ Quite often we need to convert unrelated types <code class="computeroutput"><span class="identifier">Source</span></code>
+ and <code class="computeroutput"><span class="identifier">Target</span></code>. As these classes
+ are unrelated, neither of them offers conversion operators to the other.
+ Usually we get it by defining a specific function such as
+ </p>
+<pre class="programlisting"><span class="identifier">Target</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+<p>
+ In my case I started by defining
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="identifier">convert_to_posix_time_time_duration</span><span class="special">(</span>
+ <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+<span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="identifier">convert_to_posix_time_ptime</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">);</span>
 </pre>
 <p>
- Imagine now that you need to convert a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">&gt;</span></code> to a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Target</span><span class="special">&gt;</span></code>. Well you can again define a specific
- function
+ Imagine now that you need to convert a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">&gt;</span></code> to a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Target</span><span class="special">&gt;</span></code>. The standard defines conversions of
+ pairs if the related types are C++ convertible:
       </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="identifier">PairOfSourceToPairOfTarget</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">SourceToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">fisrt</span><span class="special">),</span> <span class="identifier">SourceToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">pair</span> <span class="special">{</span>
+ <span class="special">...</span>
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">U</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">&gt;</span>
+ <span class="comment">//requires Constructible&lt;T1, const U&amp;&gt; &amp;&amp; Constructible&lt;T2, const V&amp;&gt;
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">,</span> <span class="identifier">V</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">);</span>
+
+ <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">U</span> <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">V</span><span class="special">&gt;</span>
+ <span class="comment">//requires HasAssign&lt;T1, const U&amp;&gt; &amp;&amp; HasAssign&lt;T2, const V&amp;&gt;
+</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">U</span> <span class="special">,</span> <span class="identifier">V</span><span class="special">&gt;&amp;</span> <span class="identifier">p</span><span class="special">);</span>
+ <span class="special">...</span>
+<span class="special">};</span>
+</pre>
+<p>
+ But as the types <code class="computeroutput"><span class="identifier">Target</span></code> and
+ <code class="computeroutput"><span class="identifier">Source</span></code> are not C++ convertible
+ other than using a specific function.
+ </p>
+<p>
+ Well we can again define a specific function
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="identifier">ConvertToPairOfTarget</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">fisrt</span><span class="special">),</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
 <span class="special">}</span>
 </pre>
 <p>
- While the <code class="computeroutput"><span class="identifier">SourceToTarget</span></code>
- could be specific, the <code class="computeroutput"><span class="identifier">PairOfSourceToPairOfTarget</span></code>
- sould be generic
+ While the <code class="computeroutput"><span class="identifier">ConvertToTarget</span></code>
+ could be specific, the <code class="computeroutput"><span class="identifier">ConvertToPairOfTarget</span></code>
+ should be generic
       </p>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;</span> <span class="identifier">ConvertPair</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;</span> <span class="identifier">ConvertToPair</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">);</span>
 </pre>
 <p>
         In order to do that we need that the pair template parameters define a common
@@ -57,76 +98,74 @@
 <span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span>
 </pre>
 <p>
- so <code class="computeroutput"><span class="identifier">ConvertPair</span></code> can be defined
+ so <code class="computeroutput"><span class="identifier">ConvertToPair</span></code> can be defined
         as
       </p>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;</span> <span class="identifier">ConvertPair</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">fisrt</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;</span> <span class="identifier">ConvertToPair</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">&gt;(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">fisrt</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target2</span><span class="special">&gt;(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
 <span class="special">}</span>
 </pre>
 <p>
- The issue is that we need to specialize the <code class="computeroutput"><span class="identifier">convert_to</span></code>
- function for the classes <code class="computeroutput"><span class="identifier">Source</span></code>
+ We need to specialize the <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ function for the specific classes <code class="computeroutput"><span class="identifier">Source</span></code>
         and <code class="computeroutput"><span class="identifier">Target</span></code>. We can do it
         as follows
       </p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;&gt;</span>
-<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">&gt;(</span><span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">SourceToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">);}</span>
+<pre class="programlisting"><span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span><span class="keyword">return</span> <span class="identifier">ConvertToTarget</span><span class="special">(</span><span class="identifier">v</span><span class="special">);}</span>
 </pre>
 <p>
- What about converting <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;</span> <span class="special">&gt;</span></code> to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span
class="identifier">Target</span><span class="special">&gt;</span> <span class="special">&gt;</span></code>? The issue now is that <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">&lt;</span><span class="identifier">to</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">&lt;</span><span class="identifier">to</span><span class="special">,</span><span class="identifier">to</span><span class="special">&gt;</span> <span class="special">&gt;)</span></code>
- do not compiles because the conversion of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
- is named <code class="computeroutput"><span class="identifier">ConvertPair</span></code>. So
- we need to specialize the function <code class="computeroutput"><span class="identifier">convert_to</span></code>
- for pairs. There is no major problem with compilers supporting partial specialization
- of function templates. If this is not the case, we need to use a trick; as
- it allows partial specialization of classes we can define <code class="computeroutput"><span class="identifier">convert_to</span></code>
- by as relying to a specific function of a class, as follows:
- </p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
- <span class="keyword">struct</span> <span class="identifier">convert_to</span> <span class="special">{</span>
- <span class="keyword">static</span> <span class="identifier">Target</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
- <span class="special">};</span>
+ In my case I needed
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">convert_to_posix_time_time_duration</span><span class="special">(</span><span class="identifier">from</span><span class="special">);</span>
 <span class="special">}</span>
 
-<span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
-<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">apply</span><span class="special">(</span><span class="identifier">val</span><span class="special">);</span>
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">convert_to_posix_time_ptime</span><span class="special">(</span><span class="identifier">from</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
- So now we can specialize <code class="computeroutput"><span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">convert_to</span></code>
- for pairs as follows:
- </p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
- <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
- <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
- <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;(</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">first</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T2</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
- <span class="special">}</span>
- <span class="special">};</span>
-
+ So now I can convert
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+</pre>
+<p>
+ to
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">&gt;</span>
+</pre>
+<p>
+ using the <code class="computeroutput"><span class="identifier">ConvertToPair</span></code> function.
+ </p>
+<p>
+ What about converting <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;</span> <span class="special">&gt;</span></code> to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span
class="identifier">Target</span><span class="special">&gt;</span> <span class="special">&gt;</span></code>? The issue now is that <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">&lt;</span><span class="identifier">to</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">&lt;</span><span class="identifier">to</span><span class="special">,</span><span class="identifier">to</span><span class="special">&gt;</span> <span class="special">&gt;)</span></code>
+ do not compiles because the conversion of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>
+ is named <code class="computeroutput"><span class="identifier">ConvertToPair</span></code>. So
+ we need to specialize the function <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ for pairs.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">S1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">S2</span><span class="special">)</span>
+<span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">)</span> <span class="special">{</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;(</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">first</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T2</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
 <span class="special">}</span>
 </pre>
 <p>
- There is one more issue. The preceding design works well with unrelated classes,
- but what about classes that already define some kind of conversion, unisng
- a constructor or a conversion operator. Do we need to make specialization
+ There is still a last point. The preceding design works well with unrelated
+ classes, but what about classes that already define some kind of conversion,
+ using a constructor or a conversion operator. Do we need to make specialization
         for these conversion? The answer is no. We need just to define the default
- implementation of the partial_specialization_workaround::convert_to::apply
- function to just return the explicit conversion.
+ implementation of convert_to function to just return the explicit conversion.
       </p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_work_around</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span>
- <span class="keyword">struct</span> <span class="identifier">convert_to</span> <span class="special">{</span>
- <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">T</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">U</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">T</span><span class="special">(</span><span class="identifier">val</span><span class="special">);</span>
- <span class="special">}</span>
- <span class="special">};</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">&gt;</span>
+<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">Target</span><span class="special">(</span><span class="identifier">from</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -154,21 +193,13 @@
 </pre>
 <p>
         The default implementation of <code class="computeroutput"><span class="identifier">assign_to</span></code>
- relies on the assignement operator
+ relies on the assignment operator
       </p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
- <span class="keyword">struct</span> <span class="identifier">assign_to</span> <span class="special">{</span>
- <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">)</span>
- <span class="special">{</span>
- <span class="identifier">to</span> <span class="special">=</span> <span class="identifier">from</span><span class="special">;</span>
- <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
- <span class="special">}</span>
- <span class="special">};</span>
-<span class="special">}</span>
-<span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
-<span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">)</span> <span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">assign_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">apply</span><span class="special">(</span><span class="identifier">to</span><span class="special">,</span> <span class="identifier">from</span><span class="special">);</span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
+<span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">to</span> <span class="special">=</span> <span class="identifier">from</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -186,7 +217,7 @@
         function.
       </p>
 <p>
- When doing multiple assignements we use to do
+ When doing multiple assignments we use to do
       </p>
 <pre class="programlisting"><span class="identifier">a</span> <span class="special">=</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">c</span><span class="special">;</span>
 </pre>
@@ -213,7 +244,7 @@
 <p>
         So one of the advantages of using this common functions is uniformity. The
         other is that now we are able to find all the explicit conversions to one
- type, as we can do with explict casts.
+ type, as we can do with explicit casts.
       </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/boost_classes_specializations.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/boost_classes_specializations.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/boost_classes_specializations.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -55,6 +55,7 @@
           types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">rational</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;,</span> <span class="identifier">rational</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -64,7 +65,7 @@
         <span class="keyword">struct</span> <span class="identifier">assign_to</span><span class="special">&lt;</span> <span class="identifier">rational</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;,</span> <span class="identifier">rational</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
             <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">rational</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">rational</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">rational</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>
@@ -79,6 +80,7 @@
           time and duration types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -103,10 +105,11 @@
                 <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span>
                 <span class="keyword">const</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">time_duration</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 
 <span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -128,7 +131,7 @@
                 <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span>
                 <span class="keyword">const</span> <span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">ptime</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>
@@ -143,6 +146,7 @@
           types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">PT</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">PU</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">interval</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">PT</span><span class="special">&gt;,</span> <span class="identifier">interval</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">,</span><span class="identifier">PU</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -153,8 +157,7 @@
             <span class="keyword">static</span> <span class="identifier">interval</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">PT</span><span class="special">&gt;&amp;</span> <span class="identifier">apply</span><span class="special">(</span>
                 <span class="identifier">interval</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">PT</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">interval</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">,</span><span class="identifier">PU</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
-
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>
@@ -169,6 +172,7 @@
           types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Source</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;,</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Source</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -179,8 +183,7 @@
             <span class="keyword">static</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;&amp;</span> <span class="identifier">apply</span><span class="special">(</span>
                 <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
-
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>
@@ -195,7 +198,7 @@
           types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
-
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">&gt;,</span> <span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">N</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -205,7 +208,7 @@
         <span class="keyword">struct</span> <span class="identifier">assign_to</span><span class="special">&lt;</span> <span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">&gt;,</span> <span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">N</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
             <span class="keyword">static</span> <span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">&gt;&amp;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">N</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="identifier">array</span><span class="special">&lt;</span><span class="identifier">T2</span><span class="special">,</span><span class="identifier">N</span><span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>
@@ -220,6 +223,7 @@
           types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">class</span> <span class="identifier">Tn</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U1</span><span class="special">,</span> <span class="special">...,</span> <span class="keyword">class</span> <span class="identifier">Un</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,...,</span><span class="identifier">T3</span><span class="special">&gt;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,...,</span><span class="identifier">U3</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -232,7 +236,7 @@
             <span class="identifier">apply</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,...,</span><span class="identifier">T3</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,...,</span><span class="identifier">U3</span><span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
 
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/c___standard_classes_specializations.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/c___standard_classes_specializations.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/c___standard_classes_specializations.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -49,6 +49,7 @@
           types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -59,7 +60,7 @@
             <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">);</span>
         <span class="special">};</span>
 
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>
@@ -73,6 +74,7 @@
           Include this file when using conversions between pairs of convertible types.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">U2</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span><span class="identifier">U2</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -82,7 +84,7 @@
         <span class="keyword">struct</span> <span class="identifier">assign_to</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span><span class="identifier">U2</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
             <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;&amp;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">U1</span><span class="special">,</span><span class="identifier">U2</span><span class="special">&gt;&amp
;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>
@@ -96,6 +98,7 @@
           Include this file when using conversions to std::string.
         </p>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
     <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
         <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
         <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;,</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">{</span>
@@ -115,7 +118,7 @@
             <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">to</span>
                 <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;&amp;</span> <span class="identifier">from</span><span class="special">);</span>
         <span class="special">};</span>
- <span class="special">}</span>
+ <span class="special">}}</span>
 <span class="special">}</span>
 </pre>
 </div>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/conversion_hpp.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/conversion_hpp.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/conversion_hpp.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -27,8 +27,8 @@
 <a name="boost.conversion.reference.conversion_hpp"></a> Header <boost/conversion.hpp>
 </h3></div></div></div>
 <p>
- Include all the core conversion public header files. Note thatyou will need
- to include explicitly the C++ standard or Boost specific files when usin
+ Include all the core conversion public header files. Note that you will need
+ to include explicitly the C++ standard or Boost specific files when using
         specific classes.
       </p>
 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">convert_to</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/core.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/core.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/reference/core.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -42,12 +42,8 @@
           <code class="computeroutput"><span class="identifier">convert_to_via</span><span class="special">&lt;&gt;()</span></code></a></span></dt></dl></dd>
 <dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp"> Header
         <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">ca_wrapper</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___">Template
- Class <code class="computeroutput"><span class="identifier">ca_wrapper</span><span class="special">&lt;&gt;</span></code></a></span></dt>
-<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____">Function
- <code class="computeroutput"><span class="identifier">mca</span><span class="special">&lt;&gt;()</span></code></a></span></dt>
-</dl></dd>
+<dd><dl><dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____">Function
+ <code class="computeroutput"><span class="identifier">mca</span><span class="special">&lt;&gt;()</span></code></a></span></dt></dl></dd>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
@@ -58,15 +54,25 @@
 <div class="toc"><dl><dt><span class="section"><a href="core.html#boost.conversion.reference.core.convert_to_hpp.function__convert_to___">Function
           <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">()</span></code></a></span></dt></dl></div>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
- <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
- <span class="keyword">struct</span> <span class="identifier">convert_to</span> <span class="special">{</span>
- <span class="keyword">static</span> <span class="identifier">To</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
- <span class="special">};</span>
- <span class="special">}</span>
+ <span class="keyword">namespace</span> <span class="identifier">dummy</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">base_tag</span> <span class="special">{};</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">type_tag</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">{};</span>
+ <span class="special">}</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">type_tag</span><span class="special">;</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">convert_to</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">To</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
+ <span class="identifier">To</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+ <span class="special">}</span>
 
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
- <span class="identifier">To</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">&gt;</span>
+ <span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="identifier">Source</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;=</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;());</span>
 <span class="special">}</span>
 </pre>
 <p>
@@ -76,14 +82,23 @@
           The default implementation applies the conversion <code class="computeroutput"><span class="identifier">To</span></code>
           operator of the <code class="computeroutput"><span class="identifier">From</span></code> class
           or the copy constructor of the <code class="computeroutput"><span class="identifier">To</span></code>
- class. A user adapting another type could need to specialize the <code class="computeroutput"><span class="identifier">convert_to</span></code> free function if the default
- behavior is not satisfactory.
+ class. Of course if both exist the conversion is ambiguous. A user adapting
+ another type could need to specialize the <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ free function if the default behavior is not satisfactory.
         </p>
 <p>
- As for the moment we can not partially specialize a function a trick is
- used: instead of calling directly to the <code class="computeroutput"><span class="identifier">convert_to</span></code>
- member function, <code class="computeroutput"><span class="identifier">convert_to</span></code>
- calls to the static operation <code class="computeroutput"><span class="identifier">apply</span></code>
+ The user can add the <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ overloading on the namespace of a specific Source. But sometimes as it
+ is the case for the standard classes, we can not add new functions on the
+ std namespace, so we need a different technique.
+ </p>
+<p>
+ The technique is partially specialize on the function <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ on the boost::conversion namespace. For compilers for which we can not
+ partially specialize a function a trick is used: instead of calling directly
+ to the <code class="computeroutput"><span class="identifier">convert_to</span></code> member
+ function, <code class="computeroutput"><span class="identifier">convert_to</span></code> calls
+ to the static operation <code class="computeroutput"><span class="identifier">apply</span></code>
           on a class with the same name in the namespace __partial_specialization<span class="underline">workaround</span>_. Thus the user can specialize partially
           this class.
         </p>
@@ -94,7 +109,7 @@
           <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">()</span></code></a>
 </h5></div></div></div>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
-<span class="identifier">To</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+<span class="identifier">To</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
 </pre>
 <div class="variablelist">
 <p class="title"><b></b></p>
@@ -124,36 +139,51 @@
 <div class="toc"><dl><dt><span class="section"><a href="core.html#boost.conversion.reference.core.assign_to_hpp.function__assign_to___">Function
           <code class="computeroutput"><span class="identifier">assign_to</span><span class="special">()</span></code></a></span></dt></dl></div>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
- <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
- <span class="keyword">struct</span> <span class="identifier">assign_to</span> <span class="special">{</span>
- <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">toconst</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
- <span class="special">};</span>
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">&gt;</span>
- <span class="keyword">struct</span> <span class="identifier">assign_to</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">[</span><span class="identifier">N</span><span class="special">],</span><span class="identifier">From</span><span class="special">[</span><span class="identifier">N</span><span class="special">]&gt;</span> <span class="special">{</span>
- <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">To</span> <span class="special">(&amp;</span><span class="identifier">to</span><span class="special">)[</span><span class="identifier">N</span><span class="special">],</span> <span class="keyword">const</span> <span class="identifier">From</span><span class="special">(&amp;</span> <span class="identifier">from</span><span class="special">)[</span><span class="identifier">N</span><span class="special">]);</span>
- <span class="special">};</span>
- <span class="special">}</span>
+ <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">assign_to</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+ <span class="special">};</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">assign_to</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">[</span><span class="identifier">N</span><span class="special">],</span><span class="identifier">From</span><span class="special">[</span><span class="identifier">N</span><span class="special">]&gt;</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">To</span> <span class="special">(&amp;</span><span class="identifier">to</span><span class="special">)[</span><span class="identifier">N</span><span class="special">],</span> <span class="keyword">const</span> <span class="identifier">From</span><span class="special">(&amp;</span> <span class="identifier">from</span><span class="special">)[</span><span class="identifier">N</span><span class="special">]);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
 
- <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
- <span class="keyword">void</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">From</span> <span class="special">&gt;</span>
+ <span class="keyword">void</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">From</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span><span class="special">&gt;</span>
+ <span class="identifier">Target</span><span class="special">&amp;</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;=</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">base_tag</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;())</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="special">::</span><span class="identifier">boost_conversion_impl</span><span class="special">::</span><span class="identifier">assign_to_impl</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span> <span class="identifier">Source</span><span class="special">&gt;(</span><span class="identifier">to</span><span class="special">,</span> <span class="identifier">from</span><span class="special">);</span>
+ <span class="special">}</span>
 <span class="special">}</span>
 </pre>
 <p>
           Defines a free function <code class="computeroutput"><span class="identifier">assign_to</span></code>
           which assigns the <code class="computeroutput"><span class="identifier">from</span></code>
           parameter to the <code class="computeroutput"><span class="identifier">to</span></code> parameter.
- The default implementation applies the the assignement operator of the
+ The default implementation applies the the assignment operator of the
           <code class="computeroutput"><span class="identifier">To</span></code> class. A user adapting
           another type could need to specialize the <code class="computeroutput"><span class="identifier">assign_to</span></code>
           free function if the default behavior is not satisfactory.
         </p>
 <p>
- As for the moment we can not partially specialize a function a trick is
- used: instead of calling directly to the <code class="computeroutput"><span class="identifier">assign_to</span></code>
- member function, <code class="computeroutput"><span class="identifier">assign_to</span></code>
- calls to the static operation apply on a class with the same name in the
- namespace __partial_specialization<span class="underline">workaround</span>_.
+ The user can add the <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ overloading on the namespace of the Source or Target classes. But sometimes
+ as it is the case for the standard classes, we can not add new functions
+ on the std namespace, so we need a different technique.
+ </p>
+<p>
+ The technique is partially specialize on the function <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ on the boost::conversion namespace. For compilers for which we can not
+ partially specialize a function a trick is used: instead of calling directly
+ to the <code class="computeroutput"><span class="identifier">assign_to</span></code> member
+ function, <code class="computeroutput"><span class="identifier">assign_to</span></code> calls
+ to the static operation apply on a class with the same name in the namespace
+ __partial_specialization<span class="underline">workaround</span>_.
           This the user can specialize partially this class.
         </p>
 <div class="section" lang="en">
@@ -172,11 +202,11 @@
 <dd><p>
                 Assigns the <code class="computeroutput"><span class="identifier">from</span></code>
                 parameter to the <code class="computeroutput"><span class="identifier">to</span></code>
- parameter, using by default the assignement operator of the <code class="computeroutput"><span class="identifier">To</span></code> class.
+ parameter, using by default the assignment operator of the <code class="computeroutput"><span class="identifier">To</span></code> class.
               </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Whatever the underlying the assignement operator of the <code class="computeroutput"><span class="identifier">To</span></code> class throws.
+ Whatever the underlying the assignment operator of the <code class="computeroutput"><span class="identifier">To</span></code> class throws.
               </p></dd>
 </dl>
 </div>
@@ -214,7 +244,7 @@
               </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Whatever the underlying conversions functions throws.
+ Whatever the underlying conversions functions throw.
               </p></dd>
 </dl>
 </div>
@@ -226,64 +256,82 @@
         &lt;boost/conversion/ca_wrapper.hpp&gt;"> Header
         <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">conversion</span><span class="special">/</span><span class="identifier">ca_wrapper</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
 </h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___">Template
- Class <code class="computeroutput"><span class="identifier">ca_wrapper</span><span class="special">&lt;&gt;</span></code></a></span></dt>
-<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____">Function
- <code class="computeroutput"><span class="identifier">mca</span><span class="special">&lt;&gt;()</span></code></a></span></dt>
-</dl></div>
+<div class="toc"><dl><dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____">Function
+ <code class="computeroutput"><span class="identifier">mca</span><span class="special">&lt;&gt;()</span></code></a></span></dt></dl></div>
 <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
-
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">ca_wrapper</span><span class="special">;</span>
- <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">ca_wrapper</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="char">'implementation_dependent&lt;T&gt;'</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
 <span class="special">}</span>
 </pre>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___" title="Template
- Class ca_wrapper&lt;&gt;">Template
- Class <code class="computeroutput"><span class="identifier">ca_wrapper</span><span class="special">&lt;&gt;</span></code></a>
+<a name="boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____" title="Function
+ mca&lt;&gt;()">Function
+ <code class="computeroutput"><span class="identifier">mca</span><span class="special">&lt;&gt;()</span></code></a>
 </h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_">Template
+ Class <code class="computeroutput"><span class="identifier">implementation_dependent</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="char">'implementation_dependent&lt;T&gt;'</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Effects:</span></dt>
+<dd><p>
+ Returns a implementation dependent class able to transform conversion
+ by convert_to call and assignments by assign_to calls.
+ </p></dd>
+<dt><span class="term">Throws:</span></dt>
+<dd><p>
+ Nothing.
+ </p></dd>
+</dl>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_" title="Template
+ Class implementation_dependent">Template
+ Class <code class="computeroutput"><span class="identifier">implementation_dependent</span></code></a>
+</h6></div></div></div>
 <div class="toc"><dl>
-<dt><span class="section">Constructor</span></dt>
-<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___.conversion_operator">Conversion
- operator</a></span></dt>
-<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___.assignement_operator">Assignement
- operator</a></span></dt>
+<dt><span class="section">Constructor</span></dt>
+<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.conversion_operator">Conversion
+ operator</a></span></dt>
+<dt><span class="section"><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.assignment_operator">Assignment
+ operator</a></span></dt>
 </dl></div>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
-<span class="keyword">class</span> <span class="identifier">ca_wrapper</span> <span class="special">{</span>
+<span class="keyword">class</span> <span class="identifier">implementation_dependent</span> <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
- <span class="identifier">ca_wrapper</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+ <span class="identifier">implementation_dependent</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
     <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="identifier">U</span><span class="special">();</span>
     <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">U</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">u</span><span class="special">);</span>
 <span class="special">};</span>
 </pre>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h6 class="title">
-<a name="boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___.constructor"></a>Constructor
+<a name="boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.constructor"></a>Constructor
 </h6></div></div></div>
-<pre class="programlisting"><span class="identifier">ca_wrapper</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">implementation_dependent</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
 </pre>
 <div class="variablelist">
 <p class="title"><b></b></p>
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- Stores the reference to type.
- </p></dd>
+ Stores the reference to type.
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Nothing
- </p></dd>
+ Nothing
+ </p></dd>
 </dl>
 </div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h6 class="title">
-<a name="boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___.conversion_operator"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___.conversion_operator" title="Conversion
- operator">Conversion
- operator</a>
+<a name="boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.conversion_operator"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.conversion_operator" title="Conversion
+ operator">Conversion
+ operator</a>
 </h6></div></div></div>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span> <span class="keyword">operator</span> <span class="identifier">U</span><span class="special">();</span>
 </pre>
@@ -292,21 +340,21 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- Call to the <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span></code> on the stored reference.
- </p></dd>
+ Call to the <code class="computeroutput"><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">&gt;</span></code> on the stored reference.
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Whatever <code class="computeroutput"><span class="identifier">convert_to</span></code>
- throws.
- </p></dd>
+ Whatever <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ throws.
+ </p></dd>
 </dl>
 </div>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h6 class="title">
-<a name="boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___.assignement_operator"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.template_class__ca_wrapper___.assignement_operator" title="Assignement
- operator">Assignement
- operator</a>
+<a name="boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.assignment_operator"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____.template_class__implementation_dependent_.assignment_operator" title="Assignment
+ operator">Assignment
+ operator</a>
 </h6></div></div></div>
 <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=(</span><span class="identifier">U</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">u</span><span class="special">);</span>
 </pre>
@@ -315,39 +363,18 @@
 <dl>
 <dt><span class="term">Effects:</span></dt>
 <dd><p>
- Call to the <code class="computeroutput"><span class="identifier">assignt_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">U</span><span class="special">&gt;</span></code> with the stored reference and
- the passed parameter <code class="computeroutput"><span class="identifier">u</span></code>.
- </p></dd>
+ Call to the <code class="computeroutput"><span class="identifier">assign_to</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span><span class="identifier">U</span><span class="special">&gt;</span></code> with the stored reference
+ and the passed parameter <code class="computeroutput"><span class="identifier">u</span></code>.
+ </p></dd>
 <dt><span class="term">Throws:</span></dt>
 <dd><p>
- Whatever <code class="computeroutput"><span class="identifier">assign_to</span></code>
- throws.
- </p></dd>
+ Whatever <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ throws.
+ </p></dd>
 </dl>
 </div>
 </div>
 </div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____"></a><a href="core.html#boost.conversion.reference.core.ca_wrapper_hpp.function__mca_____" title="Function
- mca&lt;&gt;()">Function
- <code class="computeroutput"><span class="identifier">mca</span><span class="special">&lt;&gt;()</span></code></a>
-</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">ca_wrapper</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">mca</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">r</span><span class="special">);</span>
-</pre>
-<div class="variablelist">
-<p class="title"><b></b></p>
-<dl>
-<dt><span class="term">Effects:</span></dt>
-<dd><p>
- Creates a ca_wrapper.
- </p></dd>
-<dt><span class="term">Throws:</span></dt>
-<dd><p>
- Nothing.
- </p></dd>
-</dl>
-</div>
 </div>
 </div>
 </div>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -1,7 +1,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Users'Guide</title>
+<title> Users' Guide</title>
 <link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 <link rel="start" href="../../index.html" title="Toward Boost.Conversion">
@@ -25,7 +25,7 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost.conversion.users_guide"></a> Users'Guide
+<a name="boost.conversion.users_guide"></a> Users' Guide
 </h2></div></div></div>
 <div class="toc"><dl>
 <dt><span class="section"><a href="users_guide/getting_started.html"> Getting
@@ -42,10 +42,10 @@
         generic conversions</a></span></dt>
 <dt><span class="section"><a href="users_guide/tutorial.html#boost.conversion.users_guide.tutorial.using_specific_conversions">Using
         specific conversions</a></span></dt>
-<dt><span class="section"><a href="users_guide/tutorial.html#boost.conversion.users_guide.tutorial.how_to_completly_specialize_the_conversion_functions">How
- to completly specialize the conversion functions</a></span></dt>
-<dt><span class="section"><a href="users_guide/tutorial.html#boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions">How
- to partially specialize the conversion functions</a></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost.conversion.users_guide.tutorial.how_to_specialize_the_conversion_functions">How
+ to specialize the conversion functions</a></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions_for_standadr_types">How
+ to partially specialize the conversion functions for standadr types</a></span></dt>
 </dl></dd>
 <dt><span class="section"> References</span></dt>
 </dl></div>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/ext_references.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/ext_references.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/ext_references.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -5,7 +5,7 @@
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 <link rel="start" href="../../../index.html" title="Toward Boost.Conversion">
-<link rel="up" href="../users_guide.html" title=" Users'Guide">
+<link rel="up" href="../users_guide.html" title=" Users' Guide">
 <link rel="prev" href="tutorial.html" title="Tutorial">
 <link rel="next" href="../reference.html" title="Reference">
 </head>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/getting_started.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/getting_started.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/getting_started.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -6,8 +6,8 @@
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 <link rel="start" href="../../../index.html" title="Toward Boost.Conversion">
-<link rel="up" href="../users_guide.html" title=" Users'Guide">
-<link rel="prev" href="../users_guide.html" title=" Users'Guide">
+<link rel="up" href="../users_guide.html" title=" Users' Guide">
+<link rel="prev" href="../users_guide.html" title=" Users' Guide">
 <link rel="next" href="tutorial.html" title="Tutorial">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -42,7 +42,7 @@
         Installing Conversion</a>
 </h4></div></div></div>
 <a name="boost.conversion.users_guide.getting_started.install.getting_boost_conversion"></a><h5>
-<a name="id4813769"></a>
+<a name="id4814265"></a>
           <a href="getting_started.html#boost.conversion.users_guide.getting_started.install.getting_boost_conversion">Getting
           Boost.Conversion</a>
         </h5>
@@ -56,7 +56,7 @@
           Sandbox</a>.
         </p>
 <a name="boost.conversion.users_guide.getting_started.install.building_boost_conversion"></a><h5>
-<a name="id4813820"></a>
+<a name="id4814316"></a>
           <a href="getting_started.html#boost.conversion.users_guide.getting_started.install.building_boost_conversion">Building
           Boost.Conversion</a>
         </h5>
@@ -66,18 +66,16 @@
           in your compiler include path.
         </p>
 <a name="boost.conversion.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4813852"></a>
+<a name="id4814348"></a>
           <a href="getting_started.html#boost.conversion.users_guide.getting_started.install.requirements">Requirements</a>
         </h5>
 <p>
- <span class="bold"><strong>Boost.Conversion</strong></span> do not depends on any
- Boost library, at least for the generic part. Of course it dependens on
- the specific libraries when specific conversion are used. For these specific
- parts you must use either Boost version 1.39.0 or the version in SVN trunk
- (even if Boost version 1.35.x should works also).
+ The genric part of <span class="bold"><strong>Boost.Conversion</strong></span> depends
+ only on Boost.Config. Of course it depends on the specific libraries when
+ specific conversion are used.
         </p>
 <a name="boost.conversion.users_guide.getting_started.install.exceptions_safety"></a><h5>
-<a name="id4813887"></a>
+<a name="id4814380"></a>
           <a href="getting_started.html#boost.conversion.users_guide.getting_started.install.exceptions_safety">Exceptions
           safety</a>
         </h5>
@@ -86,7 +84,7 @@
           of exception safety as long as the underlying parameters provide it.
         </p>
 <a name="boost.conversion.users_guide.getting_started.install.thread_safety"></a><h5>
-<a name="id4813913"></a>
+<a name="id4814406"></a>
           <a href="getting_started.html#boost.conversion.users_guide.getting_started.install.thread_safety">Thread
           safety</a>
         </h5>
@@ -94,7 +92,7 @@
           All functions in the library are thread-unsafe except when noted explicitly.
         </p>
 <a name="boost.conversion.users_guide.getting_started.install.tested_compilers"></a><h5>
-<a name="id4813938"></a>
+<a name="id4814431"></a>
           <a href="getting_started.html#boost.conversion.users_guide.getting_started.install.tested_compilers">Tested
           compilers</a>
         </h5>

Modified: sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/tutorial.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/tutorial.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/boost/conversion/users_guide/tutorial.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -5,7 +5,7 @@
 <link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
 <meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 <link rel="start" href="../../../index.html" title="Toward Boost.Conversion">
-<link rel="up" href="../users_guide.html" title=" Users'Guide">
+<link rel="up" href="../users_guide.html" title=" Users' Guide">
 <link rel="prev" href="getting_started.html" title=" Getting
       Started">
 <link rel="next" href="ext_references.html" title=" References">
@@ -32,10 +32,10 @@
         generic conversions</a></span></dt>
 <dt><span class="section"><a href="tutorial.html#boost.conversion.users_guide.tutorial.using_specific_conversions">Using
         specific conversions</a></span></dt>
-<dt><span class="section"><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_completly_specialize_the_conversion_functions">How
- to completly specialize the conversion functions</a></span></dt>
-<dt><span class="section"><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions">How
- to partially specialize the conversion functions</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_specialize_the_conversion_functions">How
+ to specialize the conversion functions</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions_for_standadr_types">How
+ to partially specialize the conversion functions for standadr types</a></span></dt>
 </dl></div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
@@ -84,33 +84,92 @@
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost.conversion.users_guide.tutorial.how_to_completly_specialize_the_conversion_functions"></a><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_completly_specialize_the_conversion_functions" title="How
- to completly specialize the conversion functions">How
- to completly specialize the conversion functions</a>
+<a name="boost.conversion.users_guide.tutorial.how_to_specialize_the_conversion_functions"></a><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_specialize_the_conversion_functions" title="How
+ to specialize the conversion functions">How
+ to specialize the conversion functions</a>
 </h4></div></div></div>
 <p>
- You can completly specialize the <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ You can add an overload of <code class="computeroutput"><span class="identifier">convert_to</span></code>
           and <code class="computeroutput"><span class="identifier">assign_to</span></code> functions
- as you will do for other functions. Just add an complete overload. E.g.
- if you want to add an explicit convertion from a type <code class="computeroutput"><span class="identifier">F</span></code>
- to a type <code class="computeroutput"><span class="identifier">T</span></code> do the following:
+ as you will do for the swap function for example, but we have to use a
+ trick to allow ADL and avoid infinite recursion and ambiguity. This trick
+ consists in adding a unused parameter representing the target type. E.g.
+ if you want to add an explicit conversion from a type <code class="computeroutput"><span class="identifier">A</span></code>
+ to a type <code class="computeroutput"><span class="identifier">B</span></code> do the following:
         </p>
-<pre class="programlisting"><span class="identifier">T</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">F</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">);</span>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">my_own_namespace</span> <span class="special">{</span>
+ <span class="identifier">B</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">A</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">B</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;);</span>
+<span class="special">}</span>
 </pre>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions"></a><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions" title="How
- to partially specialize the conversion functions">How
- to partially specialize the conversion functions</a>
+<a name="boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions_for_standadr_types"></a><a href="tutorial.html#boost.conversion.users_guide.tutorial.how_to_partially_specialize_the_conversion_functions_for_standadr_types" title="How
+ to partially specialize the conversion functions for standadr types">How
+ to partially specialize the conversion functions for standadr types</a>
 </h4></div></div></div>
 <p>
- As it has been explained in the introduction, until you use a C++ compiler
- supporting the partial specialization of function templates you will need
- to follow partial specialization workaround and partialy specialize the
- <code class="computeroutput"><span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">convert_to</span></code>
- class.
+ As it has been explained in the introduction, we can not use ADL for standard
+ types, as we can not add new functions on the standad std namespace. For
+ these types we need to specialize the boost::conversion::convert_to function.
         </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
+<span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span>
+</pre>
+<p>
+ With compilers supporting partial specialization of function templates
+ there is no major problem. For the others, we need to use a trick; as it
+ allows partial specialization of classes we can define <code class="computeroutput"><span class="identifier">convert_to</span></code>
+ by as relying to a specific function of a class, as follows:
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">conversion</span> <span class="special">{</span>
+ <span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">convert_to</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">Target</span> <span class="identifier">apply</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
+ <span class="special">};</span>
+ <span class="special">}</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
+ <span class="identifier">Target</span> <span class="identifier">convert_to</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;=</span><span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;())</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">apply</span><span class="special">(</span><span class="identifier">val</span><span class="special">);</span>
+ <span class="special">}</span>
+<span class="special">}}</span>
+</pre>
+<p>
+ So now we can specialize <code class="computeroutput"><span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">convert_to</span></code>
+ for pairs as follows:
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Target1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Target2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source2</span><span class="special">)</span>
+ <span class="keyword">struct</span> <span class="identifier">convert_to</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Target1</span><span class="special">,</span><span class="identifier">Target2</span><span class="special">&gt;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Source1</span><span class="special">,</span><span class="identifier">Source2</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">,</span><span class="identifier">T2</span><span class="special">&gt;(</span><span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T1</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">first</span><span class="special">),</span> <span class="identifier">convert_to</span><span class="special">&lt;</span><span class="identifier">T2</span><span class="special">&gt;(</span><span class="identifier">from</span><span class="special">.</span><span class="identifier">second</span><span class="special">));</span>
+ <span class="special">}</span>
+ <span class="special">};</span>
+
+<span class="special">}</span>
+</pre>
+<p>
+ The same applies to the generic <code class="computeroutput"><span class="identifier">assign_to</span></code>
+ function.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">partial_specialization_workaround</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">assign_to</span> <span class="special">{</span>
+ <span class="keyword">inline</span> <span class="keyword">static</span> <span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">to</span> <span class="special">=</span> <span class="identifier">from</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">to</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">};</span>
+<span class="special">}</span>
+<span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">typename</span> <span class="identifier">Target</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Source</span> <span class="special">&gt;</span>
+<span class="identifier">To</span><span class="special">&amp;</span> <span class="identifier">assign_to</span><span class="special">(</span><span class="identifier">Target</span><span class="special">&amp;</span> <span class="identifier">to</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Source</span><span class="special">&amp;</span> <span class="identifier">from</span><span class="special">,</span> <span class="identifier">dummy</span><span class="special">::</span><span class="identifier">type_tag</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;)</span> <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">partial_specialization_workaround</span><span class="special">::</span><span class="identifier">assign_to</span><span class="special">&lt;</span><span class="identifier">Target</span><span class="special">,</span><span class="identifier">Source</span><span class="special">&gt;::</span><span class="identifier">apply</span><span class="special">(</span><span class="identifier">to</span><span class="special">,</span> <span class="identifier">from</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>

Modified: sandbox/conversion/libs/conversion/doc/html/index.html
==============================================================================
--- sandbox/conversion/libs/conversion/doc/html/index.html (original)
+++ sandbox/conversion/libs/conversion/doc/html/index.html 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -41,7 +41,7 @@
 <dl>
 <dt><span class="section">Overview</span></dt>
 <dd><dl><dt><span class="section">Motivation</span></dt></dl></dd>
-<dt><span class="section"> Users'Guide</span></dt>
+<dt><span class="section"> Users' Guide</span></dt>
 <dd><dl>
 <dt><span class="section"><a href="boost/conversion/users_guide/getting_started.html"> Getting
       Started</a></span></dt>
@@ -92,7 +92,7 @@
 </table></div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: October 22, 2009 at 13:57:46 GMT</small></p></td>
+<td align="left"><p><small>Last revised: October 27, 2009 at 14:36:18 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/conversion/libs/conversion/test/Jamfile.v2
==============================================================================
--- sandbox/conversion/libs/conversion/test/Jamfile.v2 (original)
+++ sandbox/conversion/libs/conversion/test/Jamfile.v2 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -20,23 +20,23 @@
 # <include>$BOOST_ROOT
         <include>../../..
         <include>../../../../chrono
-
+
 # <threading>multi
 # <target-os>cygwin
         #<threadapi>pthread
 # <variant>debug
-
+
         #<library>/boost/thread//boost_thread/<link>static
         <library>/sandbox/chrono/libs/chrono/build//boost_chrono/<link>static
         <library>/boost/system//boost_system/<link>static
-
+
         <library>/boost/test//boost_unit_test_framework/<link>static
-
+
 ;
 
 
 
-
+
 test-suite "conversion" :
      [ run builtins.cpp ]
      [ run intrinsec.cpp ]
@@ -50,10 +50,10 @@
      [ run tuple.cpp ]
      [ run chrono_posix_time_time.cpp ]
      [ run chrono_posix_time_duration.cpp ]
- ;
+ ;
 
 
 test-suite "compile_fail_test" :
 # [ compile-fail ../example/IL_BancAccount.cpp : : <define>BOOST_SYNCHRO_DO_NOT_COMPILE : IL_BancAccount_comp_fail ]
     ;
-
+

Modified: sandbox/conversion/libs/conversion/test/array.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/array.cpp (original)
+++ sandbox/conversion/libs/conversion/test/array.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -20,15 +20,15 @@
 void explicit_convert_to() {
     boost::array<B1,3> bs;
     boost::array<A1,3> as;
- as = conversion::convert_to<boost::array<A1,3> >(bs);
-
+ as = boost::convert_to<boost::array<A1,3> >(bs);
+
 }
 void explicit_assign_to() {
     boost::array<int,3> bs;
     boost::array<short,3> as;
- conversion::assign_to(as,bs);
-
-
+ boost::assign_to(as,bs);
+
+
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/builtins.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/builtins.cpp (original)
+++ sandbox/conversion/libs/conversion/test/builtins.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -27,43 +27,43 @@
     unsigned short us(s);
     unsigned int ui(i);
     unsigned long ul(l);
-
- c=boost::conversion::convert_to<char>(c);
- s=boost::conversion::convert_to<short>(c);
- i=boost::conversion::convert_to<int>(c);
- l=boost::conversion::convert_to<long>(c);
- uc=boost::conversion::convert_to<unsigned char>(c);
- us=boost::conversion::convert_to<unsigned short>(c);
- ui=boost::conversion::convert_to<unsigned int>(c);
- ul=boost::conversion::convert_to<unsigned long>(c);
-
-
- c=boost::conversion::convert_to<char>(s);
- s=boost::conversion::convert_to<short>(s);
- i=boost::conversion::convert_to<int>(s);
- l=boost::conversion::convert_to<long>(s);
- uc=boost::conversion::convert_to<unsigned char>(s);
- us=boost::conversion::convert_to<unsigned short>(s);
- ui=boost::conversion::convert_to<unsigned int>(s);
- ul=boost::conversion::convert_to<unsigned long>(s);
-
- c=boost::conversion::convert_to<char>(i);
- s=boost::conversion::convert_to<short>(i);
- i=boost::conversion::convert_to<int>(i);
- l=boost::conversion::convert_to<long>(i);
- uc=boost::conversion::convert_to<unsigned char>(i);
- us=boost::conversion::convert_to<unsigned short>(i);
- ui=boost::conversion::convert_to<unsigned int>(i);
- ul=boost::conversion::convert_to<unsigned long>(i);
-
- c=boost::conversion::convert_to<char>(l);
- s=boost::conversion::convert_to<short>(l);
- i=boost::conversion::convert_to<int>(l);
- l=boost::conversion::convert_to<long>(l);
- uc=boost::conversion::convert_to<unsigned char>(l);
- us=boost::conversion::convert_to<unsigned short>(l);
- ui=boost::conversion::convert_to<unsigned int>(l);
- ul=boost::conversion::convert_to<unsigned long>(l);
+
+ c=boost::convert_to<char>(c);
+ s=boost::convert_to<short>(c);
+ i=boost::convert_to<int>(c);
+ l=boost::convert_to<long>(c);
+ uc=boost::convert_to<unsigned char>(c);
+ us=boost::convert_to<unsigned short>(c);
+ ui=boost::convert_to<unsigned int>(c);
+ ul=boost::convert_to<unsigned long>(c);
+
+
+ c=boost::convert_to<char>(s);
+ s=boost::convert_to<short>(s);
+ i=boost::convert_to<int>(s);
+ l=boost::convert_to<long>(s);
+ uc=boost::convert_to<unsigned char>(s);
+ us=boost::convert_to<unsigned short>(s);
+ ui=boost::convert_to<unsigned int>(s);
+ ul=boost::convert_to<unsigned long>(s);
+
+ c=boost::convert_to<char>(i);
+ s=boost::convert_to<short>(i);
+ i=boost::convert_to<int>(i);
+ l=boost::convert_to<long>(i);
+ uc=boost::convert_to<unsigned char>(i);
+ us=boost::convert_to<unsigned short>(i);
+ ui=boost::convert_to<unsigned int>(i);
+ ul=boost::convert_to<unsigned long>(i);
+
+ c=boost::convert_to<char>(l);
+ s=boost::convert_to<short>(l);
+ i=boost::convert_to<int>(l);
+ l=boost::convert_to<long>(l);
+ uc=boost::convert_to<unsigned char>(l);
+ us=boost::convert_to<unsigned short>(l);
+ ui=boost::convert_to<unsigned int>(l);
+ ul=boost::convert_to<unsigned long>(l);
 }
 
 
@@ -76,46 +76,46 @@
     unsigned short us(s);
     unsigned int ui(i);
     unsigned long ul(l);
-
- boost::conversion::assign_to(c, 0);
- boost::conversion::assign_to(c, c);
- boost::conversion::assign_to(c, s);
- boost::conversion::assign_to(c, i);
- boost::conversion::assign_to(c, l);
- boost::conversion::assign_to(c, uc);
- boost::conversion::assign_to(c, us);
- boost::conversion::assign_to(c, ui);
- boost::conversion::assign_to(c, ul);
-
- boost::conversion::assign_to(s, 1);
- boost::conversion::assign_to(s, c);
- boost::conversion::assign_to(s, s);
- boost::conversion::assign_to(s, i);
- boost::conversion::assign_to(s, l);
- boost::conversion::assign_to(s, uc);
- boost::conversion::assign_to(s, us);
- boost::conversion::assign_to(s, ui);
- boost::conversion::assign_to(s, ul);
-
- boost::conversion::assign_to(i, 2);
- boost::conversion::assign_to(i, c);
- boost::conversion::assign_to(i, s);
- boost::conversion::assign_to(i, i);
- boost::conversion::assign_to(i, l);
- boost::conversion::assign_to(i, uc);
- boost::conversion::assign_to(i, us);
- boost::conversion::assign_to(i, ui);
- boost::conversion::assign_to(i, ul);
-
- boost::conversion::assign_to(l, 3);
- boost::conversion::assign_to(l, c);
- boost::conversion::assign_to(l, s);
- boost::conversion::assign_to(l, i);
- boost::conversion::assign_to(l, l);
- boost::conversion::assign_to(l, uc);
- boost::conversion::assign_to(l, us);
- boost::conversion::assign_to(l, ui);
- boost::conversion::assign_to(l, ul);
+
+ boost::assign_to(c, 0);
+ boost::assign_to(c, c);
+ boost::assign_to(c, s);
+ boost::assign_to(c, i);
+ boost::assign_to(c, l);
+ boost::assign_to(c, uc);
+ boost::assign_to(c, us);
+ boost::assign_to(c, ui);
+ boost::assign_to(c, ul);
+
+ boost::assign_to(s, 1);
+ boost::assign_to(s, c);
+ boost::assign_to(s, s);
+ boost::assign_to(s, i);
+ boost::assign_to(s, l);
+ boost::assign_to(s, uc);
+ boost::assign_to(s, us);
+ boost::assign_to(s, ui);
+ boost::assign_to(s, ul);
+
+ boost::assign_to(i, 2);
+ boost::assign_to(i, c);
+ boost::assign_to(i, s);
+ boost::assign_to(i, i);
+ boost::assign_to(i, l);
+ boost::assign_to(i, uc);
+ boost::assign_to(i, us);
+ boost::assign_to(i, ui);
+ boost::assign_to(i, ul);
+
+ boost::assign_to(l, 3);
+ boost::assign_to(l, c);
+ boost::assign_to(l, s);
+ boost::assign_to(l, i);
+ boost::assign_to(l, l);
+ boost::assign_to(l, uc);
+ boost::assign_to(l, us);
+ boost::assign_to(l, ui);
+ boost::assign_to(l, ul);
 }
 
 void mca_assign_to_with_builtin_types() {
@@ -127,59 +127,59 @@
     unsigned short us(s);
     unsigned int ui(i);
     unsigned long ul(l);
-
- boost::conversion::mca(c) = c;
- boost::conversion::mca(c) = s;
- boost::conversion::mca(c) = i;
- boost::conversion::mca(c) = l;
- boost::conversion::mca(c) = uc;
- boost::conversion::mca(c) = us;
- boost::conversion::mca(c) = ui;
- boost::conversion::mca(c) = ul;
-
- boost::conversion::mca(s) = c;
- boost::conversion::mca(s) = s;
- boost::conversion::mca(s) = i;
- boost::conversion::mca(s) = l;
- boost::conversion::mca(s) = uc;
- boost::conversion::mca(s) = us;
- boost::conversion::mca(s) = ui;
- boost::conversion::mca(s) = ul;
-
- boost::conversion::mca(i) = c;
- boost::conversion::mca(i) = s;
- boost::conversion::mca(i) = i;
- boost::conversion::mca(i) = l;
- boost::conversion::mca(i) = uc;
- boost::conversion::mca(i) = us;
- boost::conversion::mca(i) = ui;
- boost::conversion::mca(i) = ul;
-
- boost::conversion::mca(l) = c;
- boost::conversion::mca(l) = s;
- boost::conversion::mca(l) = i;
- boost::conversion::mca(l) = l;
- boost::conversion::mca(l) = uc;
- boost::conversion::mca(l) = us;
- boost::conversion::mca(l) = ui;
- boost::conversion::mca(l) = ul;
-
+
+ boost::mca(c) = c;
+ boost::mca(c) = s;
+ boost::mca(c) = i;
+ boost::mca(c) = l;
+ boost::mca(c) = uc;
+ boost::mca(c) = us;
+ boost::mca(c) = ui;
+ boost::mca(c) = ul;
+
+ boost::mca(s) = c;
+ boost::mca(s) = s;
+ boost::mca(s) = i;
+ boost::mca(s) = l;
+ boost::mca(s) = uc;
+ boost::mca(s) = us;
+ boost::mca(s) = ui;
+ boost::mca(s) = ul;
+
+ boost::mca(i) = c;
+ boost::mca(i) = s;
+ boost::mca(i) = i;
+ boost::mca(i) = l;
+ boost::mca(i) = uc;
+ boost::mca(i) = us;
+ boost::mca(i) = ui;
+ boost::mca(i) = ul;
+
+ boost::mca(l) = c;
+ boost::mca(l) = s;
+ boost::mca(l) = i;
+ boost::mca(l) = l;
+ boost::mca(l) = uc;
+ boost::mca(l) = us;
+ boost::mca(l) = ui;
+ boost::mca(l) = ul;
+
 }
 
 void assign_to_transitive() {
     int a=0; int b=0; //int c=0;
 
     //assign_to(a, assign_to(b, assign_to(c,1)));
- boost::conversion::assign_to(a, boost::conversion::assign_to(b, 1));
-
+ boost::assign_to(a, boost::assign_to(b, 1));
+
 }
-
+
 void mca_assign_to_transitive() {
     {
     int a=0; int b=0; int c=0;
 
- boost::conversion::mca(a) = boost::conversion::mca(b) = boost::conversion::mca(c) = 1;
-
+ boost::mca(a) = boost::mca(b) = boost::mca(c) = 1;
+
     }
 }
 

Modified: sandbox/conversion/libs/conversion/test/chrono_posix_time_duration.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/chrono_posix_time_duration.cpp (original)
+++ sandbox/conversion/libs/conversion/test/chrono_posix_time_duration.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -21,16 +21,16 @@
 
 void explicit_convert_to() {
     boost::chrono::seconds a(3);
- boost::posix_time::time_duration b(conversion::convert_to<boost::posix_time::time_duration >(a));
- boost::chrono::seconds c(conversion::convert_to<boost::chrono::seconds>(b));
-
+ boost::posix_time::time_duration b(boost::convert_to<boost::posix_time::time_duration >(a));
+ boost::chrono::seconds c(boost::convert_to<boost::chrono::seconds>(b));
+
 }
 void explicit_assign_to() {
     boost::chrono::seconds a(3);
     boost::posix_time::time_duration b;
- conversion::assign_to(b, a);
+ boost::assign_to(b, a);
     boost::chrono::seconds c;
- conversion::assign_to(c, b);
+ boost::assign_to(c, b);
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/chrono_posix_time_time.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/chrono_posix_time_time.cpp (original)
+++ sandbox/conversion/libs/conversion/test/chrono_posix_time_time.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -21,16 +21,16 @@
 
 void explicit_convert_to() {
     chrono::system_clock::time_point a=chrono::system_clock::now();
- posix_time::ptime b(conversion::convert_to<posix_time::ptime >(a));
- chrono::system_clock::time_point c(conversion::convert_to<chrono::system_clock::time_point>(b));
-
+ posix_time::ptime b(boost::convert_to<posix_time::ptime >(a));
+ chrono::system_clock::time_point c(boost::convert_to<chrono::system_clock::time_point>(b));
+
 }
 void explicit_assign_to() {
     chrono::system_clock::time_point a=chrono::system_clock::now();
     posix_time::ptime b;
- conversion::assign_to(b, a);
+ boost::assign_to(b, a);
     chrono::system_clock::time_point c;
- conversion::assign_to(c, b);
+ boost::assign_to(c, b);
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/complex.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/complex.cpp (original)
+++ sandbox/conversion/libs/conversion/test/complex.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -8,7 +8,7 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#include <boost/conversion/convert_to.hpp>
+#include <complex>
 #include <boost/conversion/std/complex.hpp>
 #include <iostream>
 #include <boost/test/unit_test.hpp>
@@ -21,17 +21,17 @@
     B1 b1;
     B1 b2;
     std::complex<B1> b;
- std::complex<A1> a1(conversion::convert_to<std::complex<A1> >(b));
- std::complex<A1> a2(conversion::convert_to<std::complex<A1> >(std::complex<B1>(b1,b2)));
-
+ std::complex<A1> a1(boost::convert_to<std::complex<A1> >(b));
+ std::complex<A1> a2(boost::convert_to<std::complex<A1> >(std::complex<B1>(b1,b2)));
+
 }
 void explicit_assign_to() {
     B1 b1;
     B1 b2;
     std::complex<A1> a;
     std::complex<B1> b;
- conversion::assign_to(a,b);
- conversion::assign_to(a,std::complex<B1>(b1,b2));
+ boost::assign_to(a,b);
+ boost::assign_to(a,std::complex<B1>(b1,b2));
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/extrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/extrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion/test/extrinsec.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -19,30 +19,28 @@
 struct A{};
 struct B{};
 
-namespace boost { namespace conversion {
- template <>
- A convert_to<A,B>(const B& val, boost::dummy::type_tag<A>) {
+namespace boost {
+ A convert_to(const B& val, boost::dummy::type_tag<A> const&) {
     return A();
   }
 
- template <>
- A& assign_to<A,B>(A& to, const B& from) {
+ A& assign_to(A& to, const B& from, boost::dummy::type_tag<A> const&) {
     return to;
   }
 
-} }
+}
 
 void explicit_convert_to() {
     B b;
- A a(conversion::convert_to<A>(b));
-
+ A a(boost::convert_to<A>(b));
+
 }
 void explicit_assign_to() {
     B b;
     A a;
- conversion::assign_to(a, b);
- conversion::mca(a)= b;
-
+ boost::assign_to(a, b);
+ boost::mca(a)= b;
+
 }
 test_suite* init_unit_test_suite(int, char*[])
 {

Modified: sandbox/conversion/libs/conversion/test/helper.hpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/helper.hpp (original)
+++ sandbox/conversion/libs/conversion/test/helper.hpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -19,19 +19,16 @@
 struct B1{};
 struct B2{};
 
-namespace boost {
- namespace conversion {
- template <>
- A1 convert_to<A1,B1>(const B1& val, boost::dummy::type_tag<A1>) {
+namespace boost {
+ A1 convert_to(const B1& val, boost::dummy::type_tag<A1> const&) {
         return A1();
     }
 
- template <>
- A1& assign_to<A1,B1>(A1& to, const B1& from) {
+ A1& assign_to(A1& to, const B1& from, boost::dummy::type_tag<A1> const&) {
         return to;
     }
-
- namespace partial_specialization_workaround {
+
+ namespace conversion { namespace partial_specialization_workaround {
         template <>
         struct convert_to< A2,B2 > {
             inline static A2 apply(B2 const & from)

Modified: sandbox/conversion/libs/conversion/test/interval.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/interval.cpp (original)
+++ sandbox/conversion/libs/conversion/test/interval.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -23,18 +23,18 @@
     B1 b1;
     B1 b2;
     boost::numeric::interval<B1> b;
- boost::numeric::interval<A1> a1(conversion::convert_to<boost::numeric::interval<A1> >(b));
- boost::numeric::interval<A1> a2(conversion::convert_to<boost::numeric::interval<A1> >(
+ boost::numeric::interval<A1> a1(boost::convert_to<boost::numeric::interval<A1> >(b));
+ boost::numeric::interval<A1> a2(boost::convert_to<boost::numeric::interval<A1> >(
                 boost::numeric::interval<B1>(b1,b2)));
-
+
 }
 void explicit_assign_to() {
     B1 b1;
     B1 b2;
     boost::numeric::interval<A1> a;
     boost::numeric::interval<B1> b;
- conversion::assign_to(a,b);
- conversion::assign_to(a,boost::numeric::interval<B1>(b1,b2));
+ boost::assign_to(a,b);
+ boost::assign_to(a,boost::numeric::interval<B1>(b1,b2));
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/intrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/intrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion/test/intrinsec.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -30,7 +30,7 @@
 };
 
 struct C {
- operator B() const{return B();};
+ operator B() const{return B();};
 };
 struct CC {
     CC(int){};
@@ -44,9 +44,9 @@
     }
     {
     B b;
- A a(conversion::convert_to<A>(b));
+ A a(boost::convert_to<A>(b));
     }
-
+
 }
 void convert_to_with_explicit_constructor() {
     {
@@ -55,9 +55,9 @@
     }
     {
     B b;
- AE ae(conversion::convert_to<AE>(b));
+ AE ae(boost::convert_to<AE>(b));
     }
-
+
 }
 
 void convert_to_with_conversion_operator() {
@@ -67,9 +67,9 @@
     }
     {
     C c;
- A a(conversion::convert_to<A>(c));
+ A a(boost::convert_to<A>(c));
     }
-
+
 }
 void assign_to_with_assignemet_operator() {
     {
@@ -80,13 +80,13 @@
     {
     A a(0);
     AA aa(0);
- conversion::assign_to(aa,a);
+ boost::assign_to(aa,a);
     }
 }
 void mca_with_assignemet_operator() {
     A a(0);
     AA aa(0);
- conversion::mca(aa) =a;
+ boost::mca(aa) =a;
 }
 
 void assign_to_with_assignemet_operator_and_implicit_constructor() {
@@ -98,13 +98,13 @@
     {
     B b;
     AA aa(1);
- conversion::assign_to(aa,b);
+ boost::assign_to(aa,b);
     }
-}
+}
 void mca_with_assignemet_operator_and_implicit_constructor() {
     B b;
     AA aa(1);
- conversion::mca(aa)=b;
+ boost::mca(aa)=b;
 }
 
 void assign_to_with_assignemet_operator_and_conversion_operator() {
@@ -116,16 +116,16 @@
     {
     C c;
     CC cc(1);
- conversion::assign_to(cc,c);
+ boost::assign_to(cc,c);
     }
 }
 
 void mca_with_assignemet_operator_and_conversion_operator() {
     C c;
     CC cc(1);
- conversion::mca(cc)=c;
+ boost::mca(cc)=c;
 }
-
+
 
 test_suite* init_unit_test_suite(int, char*[])
 {
@@ -139,8 +139,8 @@
   test->add(BOOST_TEST_CASE(&mca_with_assignemet_operator));
   test->add(BOOST_TEST_CASE(&mca_with_assignemet_operator_and_implicit_constructor));
   test->add(BOOST_TEST_CASE(&mca_with_assignemet_operator_and_conversion_operator));
-
+
   return test;
-
+
 }
 

Modified: sandbox/conversion/libs/conversion/test/optional.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/optional.cpp (original)
+++ sandbox/conversion/libs/conversion/test/optional.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -18,7 +18,7 @@
 
     struct A1{};
     struct B1{};
- A1 convert_to(const B1& val, boost::dummy::type_tag<A1>) {
+ A1 convert_to(const B1& val, boost::dummy::type_tag<A1> const&) {
         return A1();
     }
 
@@ -30,18 +30,18 @@
 void explicit_convert_to() {
     B1 b1;
     boost::optional<B1> b;
- boost::optional<A1> a1(conversion::convert_to<boost::optional<A1> >(b));
+ boost::optional<A1> a1(boost::convert_to<boost::optional<A1> >(b));
     //optional<A1> a1;
     //a1=convert_to<optional<A1> >(b);
- boost::optional<A1> a2(conversion::convert_to<boost::optional<A1> >(boost::optional<B1>(b1)));
-
+ boost::optional<A1> a2(boost::convert_to<boost::optional<A1> >(boost::optional<B1>(b1)));
+
 }
 void explicit_assign_to() {
     B1 b1;
     boost::optional<A1> a;
     boost::optional<B1> b;
     //assign_to(b,a);
- conversion::assign_to(a, boost::optional<B1>(b1));
+ boost::assign_to(a, boost::optional<B1>(b1));
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/pair.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/pair.cpp (original)
+++ sandbox/conversion/libs/conversion/test/pair.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -22,20 +22,20 @@
     B1 b1;
     B2 b2;
     std::pair<B1,B2> b;
- std::pair<A1,A2> a1(conversion::convert_to<std::pair<A1,A2> >(b));
- std::pair<A1,A2> a2(conversion::convert_to<std::pair<A1,A2> >(std::pair<B1,B2>(b1,b2)));
- std::pair<A1,A2> a3(conversion::convert_to<std::pair<A1,A2> >(std::make_pair(b1,b2)));
-
+ std::pair<A1,A2> a1(boost::convert_to<std::pair<A1,A2> >(b));
+ std::pair<A1,A2> a2(boost::convert_to<std::pair<A1,A2> >(std::pair<B1,B2>(b1,b2)));
+ std::pair<A1,A2> a3(boost::convert_to<std::pair<A1,A2> >(std::make_pair(b1,b2)));
+
 }
 void explicit_assign_to() {
     B1 b1;
     B2 b2;
     std::pair<A1,A2> a;
     std::pair<B1,B2> b;
- conversion::assign_to(a,b);
- conversion::assign_to(a, std::pair<B1,B2>(b1,b2));
- conversion::assign_to(a, std::make_pair(b1,b2));
-
+ boost::assign_to(a,b);
+ boost::assign_to(a, std::pair<B1,B2>(b1,b2));
+ boost::assign_to(a, std::make_pair(b1,b2));
+
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/rational.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/rational.cpp (original)
+++ sandbox/conversion/libs/conversion/test/rational.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -18,22 +18,22 @@
 
 typedef int A1;
 typedef short B1;
-
+
 void explicit_convert_to() {
     B1 b1;
     B1 b2(2);
     boost::rational<B1> b(1,2);
- boost::rational<A1> a1(conversion::convert_to<boost::rational<A1> >(b));
- boost::rational<A1> a2(conversion::convert_to<boost::rational<A1> >(boost::rational<B1>(b1,b2)));
-
+ boost::rational<A1> a1(boost::convert_to<boost::rational<A1> >(b));
+ boost::rational<A1> a2(boost::convert_to<boost::rational<A1> >(boost::rational<B1>(b1,b2)));
+
 }
 void explicit_assign_to() {
     B1 b1;
     B1 b2(2);
     boost::rational<A1> a;
     boost::rational<B1> b(1,2);
- conversion::assign_to(a, b);
- conversion::assign_to(a, boost::rational<B1>(b1,b2));
+ boost::assign_to(a, b);
+ boost::assign_to(a, boost::rational<B1>(b1,b2));
 }
 
 test_suite* init_unit_test_suite(int, char*[])

Modified: sandbox/conversion/libs/conversion/test/tuple.cpp
==============================================================================
--- sandbox/conversion/libs/conversion/test/tuple.cpp (original)
+++ sandbox/conversion/libs/conversion/test/tuple.cpp 2009-10-27 10:47:51 EDT (Tue, 27 Oct 2009)
@@ -21,20 +21,20 @@
     B1 b1;
     B2 b2;
     fusion::tuple<B1,B2> b;
- fusion::tuple<A1,A2> a1(conversion::convert_to<fusion::tuple<A1,A2> >(b));
- fusion::tuple<A1,A2> a2(conversion::convert_to<fusion::tuple<A1,A2> >(fusion::tuple<B1,B2>(b1,b2)));
- fusion::tuple<A1,A2> a3(conversion::convert_to<fusion::tuple<A1,A2> >(fusion::make_tuple(b1,b2)));
-
+ fusion::tuple<A1,A2> a1(boost::convert_to<fusion::tuple<A1,A2> >(b));
+ fusion::tuple<A1,A2> a2(boost::convert_to<fusion::tuple<A1,A2> >(fusion::tuple<B1,B2>(b1,b2)));
+ fusion::tuple<A1,A2> a3(boost::convert_to<fusion::tuple<A1,A2> >(fusion::make_tuple(b1,b2)));
+
 }
 void explicit_assign_to() {
     B1 b1;
     B2 b2;
     fusion::tuple<A1,A2> a;
     fusion::tuple<B1,B2> b;
- conversion::assign_to(a, b);
- conversion::assign_to(a, fusion::tuple<B1,B2>(b1,b2));
- conversion::assign_to(a, fusion::make_tuple(b1,b2));
-
+ boost::assign_to(a, b);
+ boost::assign_to(a, fusion::tuple<B1,B2>(b1,b2));
+ boost::assign_to(a, fusion::make_tuple(b1,b2));
+
 }
 
 test_suite* init_unit_test_suite(int, char*[])


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