Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72169 - sandbox/conversion/libs/conversion_ext/test
From: vicente.botet_at_[hidden]
Date: 2011-05-25 18:27:25


Author: viboes
Date: 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
New Revision: 72169
URL: http://svn.boost.org/trac/boost/changeset/72169

Log:
Conversion: Moved to conversion namespace
Text files modified:
   sandbox/conversion/libs/conversion_ext/test/array.cpp | 4
   sandbox/conversion/libs/conversion_ext/test/builtins.cpp | 210 ++++++++++++++++++++++++---------------
   sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp | 8
   sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp | 8
   sandbox/conversion/libs/conversion_ext/test/complex.cpp | 8
   sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp | 6
   sandbox/conversion/libs/conversion_ext/test/helper.hpp | 2
   sandbox/conversion/libs/conversion_ext/test/interval.cpp | 8
   sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp | 12 +-
   sandbox/conversion/libs/conversion_ext/test/optional.cpp | 10
   sandbox/conversion/libs/conversion_ext/test/pair.cpp | 12 +-
   sandbox/conversion/libs/conversion_ext/test/rational.cpp | 8
   sandbox/conversion/libs/conversion_ext/test/string.cpp | 8
   sandbox/conversion/libs/conversion_ext/test/tuple.cpp | 12 +-
   sandbox/conversion/libs/conversion_ext/test/vector.cpp | 18 +-
   15 files changed, 191 insertions(+), 143 deletions(-)

Modified: sandbox/conversion/libs/conversion_ext/test/array.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/array.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/array.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -19,13 +19,13 @@
 void explicit_convert_to() {
     boost::array<B1,3> bs;
     boost::array<A1,3> as;
- as = boost::convert_to<boost::array<A1,3> >(bs);
+ as = boost::conversion::convert_to<boost::array<A1,3> >(bs);
 
 }
 void explicit_assign_to() {
     boost::array<int,3> bs;
     boost::array<short,3> as;
- boost::assign_to(as,bs);
+ boost::conversion::assign_to(as,bs);
 
 
 }

Modified: sandbox/conversion/libs/conversion_ext/test/builtins.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/builtins.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/builtins.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -8,13 +8,30 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
+#if 0
+#include <boost/phoenix/core/limits.hpp>
+#include <boost/phoenix/core/call.hpp>
+#include <boost/phoenix/core/expression.hpp>
+#include <boost/phoenix/core/meta_grammar.hpp>
+#include <boost/phoenix/object/detail/target.hpp>
+#include <boost/proto/transform/lazy.hpp>
+#include <boost/phoenix/core/is_actor.hpp>
+
+BOOST_PHOENIX_DEFINE_EXPRESSION(
+ (boost)(convert_to)
+ , (proto::terminal<boost::phoenix::detail::target<proto::_> >)
+ (boost::phoenix::meta_grammar)
+)
+#endif
+
+#include <boost/conversion/fp/convert_to.hpp>
 #include <iostream>
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/conversion/ca_wrapper.hpp>
 #include <boost/conversion/convert_to.hpp>
 #include <boost/conversion/include.hpp>
-#include <boost/conversion/fp/convert_to.hpp>
 #include <boost/phoenix/core/argument.hpp>
+#include <boost/static_assert.hpp>
 
 //using namespace boost;
 
@@ -28,42 +45,42 @@
     unsigned int ui(i);
     unsigned long ul(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);
+ 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);
 }
 
 
@@ -77,45 +94,45 @@
     unsigned int ui(i);
     unsigned long ul(l);
 
- 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);
+ 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);
 }
 
 void mca_assign_to_with_builtin_types() {
@@ -170,7 +187,7 @@
     int a=0; int b=0; //int c=0;
 
     //assign_to(a, assign_to(b, assign_to(c,1)));
- boost::assign_to(a, boost::assign_to(b, 1));
+ boost::conversion::assign_to(a, boost::conversion::assign_to(b, 1));
 
 }
 
@@ -183,18 +200,49 @@
     }
 }
 
+template <typename T, typename Enable = void>
+struct is_lazy
+ : boost::mpl::false_
+{};
+
+template <typename T, typename Enabled=void>
+struct enable_functor : boost::mpl::false_ {};
+
+template <typename T>
+struct is_lazy<T, typename boost::enable_if<boost::phoenix::is_actor<T> >::type >
+ : boost::mpl::true_
+{};
+template <typename T>
+struct enable_functor<T, typename boost::enable_if<boost::phoenix::is_actor<T> >::type> : boost::mpl::true_ {};
+
+template <typename T>
+void assert_enable_functor(T const&) {
+ BOOST_STATIC_ASSERT(is_lazy<T>::type::value==true);
+ BOOST_STATIC_ASSERT(enable_functor<T>::type::value==true);
+ BOOST_STATIC_ASSERT(boost::conversion::enable_functor<T>::type::value==true);
+}
+
+template <typename T>
+void assert_not_enable_functor(T const&) {
+ //BOOST_STATIC_ASSERT(boost::conversion::enable_functor<T>::type::value==false);
+ BOOST_STATIC_ASSERT(is_lazy<T>::type::value==false);
+}
+
 void fp_convert_to() {
   {
     char c=0;
     short s=1;
     int i=2;
     long l=3;
-
+
     using boost::phoenix::placeholders::_1;
-
- s=boost::conversion::fp::convert_to<short>(_1)(l) ;
+
+ //s=boost::conversion::fp::convert_to<short>(_1)(l) ;
+ assert_not_enable_functor(i);
+ assert_enable_functor(_1);
+ s=boost::conversion::convert_to<short>(_1)(l) ;
     BOOST_TEST(s==3);
-
+
   }
 }
 

Modified: sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_duration.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -20,16 +20,16 @@
 
 void explicit_convert_to() {
     boost::chrono::seconds a(3);
- 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));
+ boost::posix_time::time_duration b(boost::conversion::convert_to<boost::posix_time::time_duration >(a));
+ boost::chrono::seconds c(boost::conversion::convert_to<boost::chrono::seconds>(b));
 
 }
 void explicit_assign_to() {
     boost::chrono::seconds a(3);
     boost::posix_time::time_duration b;
- boost::assign_to(b, a);
+ boost::conversion::assign_to(b, a);
     boost::chrono::seconds c;
- boost::assign_to(c, b);
+ boost::conversion::assign_to(c, b);
 }
 
 int main( )

Modified: sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/chrono_posix_time_time.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -20,16 +20,16 @@
 
 void explicit_convert_to() {
     chrono::system_clock::time_point a=chrono::system_clock::now();
- 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));
+ posix_time::ptime b(boost::conversion::convert_to<posix_time::ptime >(a));
+ chrono::system_clock::time_point c(boost::conversion::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;
- boost::assign_to(b, a);
+ boost::conversion::assign_to(b, a);
     chrono::system_clock::time_point c;
- boost::assign_to(c, b);
+ boost::conversion::assign_to(c, b);
 }
 
 int main( )

Modified: sandbox/conversion/libs/conversion_ext/test/complex.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/complex.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/complex.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -20,8 +20,8 @@
     B1 b1;
     B1 b2;
     std::complex<B1> b;
- 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)));
+ std::complex<A1> a1(boost::conversion::convert_to<std::complex<A1> >(b));
+ std::complex<A1> a2(boost::conversion::convert_to<std::complex<A1> >(std::complex<B1>(b1,b2)));
 
 }
 void explicit_assign_to() {
@@ -29,8 +29,8 @@
     B1 b2;
     std::complex<A1> a;
     std::complex<B1> b;
- boost::assign_to(a,b);
- boost::assign_to(a,std::complex<B1>(b1,b2));
+ boost::conversion::assign_to(a,b);
+ boost::conversion::assign_to(a,std::complex<B1>(b1,b2));
 }
 
 int main( )

Modified: sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/extrinsec.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -39,13 +39,13 @@
 
 void explicit_convert_to() {
     B b;
- A a(boost::convert_to<A>(b));
+ A a(boost::conversion::convert_to<A>(b));
 
 }
 void explicit_assign_to() {
     B b;
     A a;
- boost::assign_to(a, b);
+ boost::conversion::assign_to(a, b);
     boost::mca(a)= b;
 
 }
@@ -53,7 +53,7 @@
     C c;
     B b;
     A a;
- boost::assign_to(a, boost::assign_to(b,c));
+ boost::conversion::assign_to(a, boost::conversion::assign_to(b,c));
     boost::mca(a)= boost::mca(b) = c;
 
 }

Modified: sandbox/conversion/libs/conversion_ext/test/helper.hpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/helper.hpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/helper.hpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -22,7 +22,7 @@
 #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
 
 namespace boost {
- namespace conversion { namespace partial_specialization_workaround {
+ namespace conversion { namespace overload_workaround {
         template <>
         struct convert_to< A1,B1 > {
             inline static A1 apply(B1 const &)

Modified: sandbox/conversion/libs/conversion_ext/test/interval.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/interval.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/interval.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -22,8 +22,8 @@
     B1 b1(1);
     B1 b2(3);
     boost::numeric::interval<B1> b(1,5);
- 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<A1> a1(boost::conversion::convert_to<boost::numeric::interval<A1> >(b));
+ boost::numeric::interval<A1> a2(boost::conversion::convert_to<boost::numeric::interval<A1> >(
                 boost::numeric::interval<B1>(b1,b2)));
 
 }
@@ -32,8 +32,8 @@
     B1 b2(3);
     boost::numeric::interval<A1> a(1,4);
     boost::numeric::interval<B1> b(1,4);
- boost::assign_to(a,b);
- boost::assign_to(a,boost::numeric::interval<B1>(b1,b2));
+ boost::conversion::assign_to(a,b);
+ boost::conversion::assign_to(a,boost::numeric::interval<B1>(b1,b2));
 }
 
 int main( )

Modified: sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/intrinsec.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -43,7 +43,7 @@
     }
     {
     B b;
- A a(boost::convert_to<A>(b));
+ A a(boost::conversion::convert_to<A>(b));
     }
 
 }
@@ -54,7 +54,7 @@
     }
     {
     B b;
- AE ae(boost::convert_to<AE>(b));
+ AE ae(boost::conversion::convert_to<AE>(b));
     }
 
 }
@@ -66,7 +66,7 @@
     }
     {
     C c;
- A a(boost::convert_to<A>(c));
+ A a(boost::conversion::convert_to<A>(c));
     }
 
 }
@@ -79,7 +79,7 @@
     {
     A a(0);
     AA aa(0);
- boost::assign_to(aa,a);
+ boost::conversion::assign_to(aa,a);
     }
 }
 void mca_with_assignemet_operator() {
@@ -97,7 +97,7 @@
     {
     B b;
     AA aa(1);
- boost::assign_to(aa,b);
+ boost::conversion::assign_to(aa,b);
     }
 }
 void mca_with_assignemet_operator_and_implicit_constructor() {
@@ -115,7 +115,7 @@
     {
     C c;
     CC cc(1);
- boost::assign_to(cc,c);
+ boost::conversion::assign_to(cc,c);
     }
 }
 

Modified: sandbox/conversion/libs/conversion_ext/test/optional.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/optional.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/optional.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -32,11 +32,11 @@
 {
   B1 b1;
   boost::optional<B1> b;
- boost::optional<A1> a1(boost::convert_to<boost::optional<A1> >(b));
+ boost::optional<A1> a1(boost::conversion::convert_to<boost::optional<A1> >(b));
   optional<A1> a3;
- a3=convert_to<optional<A1> >(b);
- a3=convert_to<optional<A1> >(b1);
- boost::optional<A1> a2(boost::convert_to<boost::optional<A1> >(boost::optional<B1>(b1)));
+ a3=conversion::convert_to<optional<A1> >(b);
+ a3=conversion::convert_to<optional<A1> >(b1);
+ boost::optional<A1> a2(boost::conversion::convert_to<boost::optional<A1> >(boost::optional<B1>(b1)));
   
 }
 
@@ -46,7 +46,7 @@
   boost::optional<A1> a;
   boost::optional<B1> b;
   //assign_to(b,a);
- boost::assign_to(a, boost::optional<B1>(b1));
+ boost::conversion::assign_to(a, boost::optional<B1>(b1));
 }
 
 int main()

Modified: sandbox/conversion/libs/conversion_ext/test/pair.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/pair.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/pair.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -21,9 +21,9 @@
     B1 b1;
     B2 b2;
     std::pair<B1,B2> b;
- 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)));
+ std::pair<A1,A2> a1(boost::conversion::convert_to<std::pair<A1,A2> >(b));
+ std::pair<A1,A2> a2(boost::conversion::convert_to<std::pair<A1,A2> >(std::pair<B1,B2>(b1,b2)));
+ std::pair<A1,A2> a3(boost::conversion::convert_to<std::pair<A1,A2> >(std::make_pair(b1,b2)));
 
 }
 void explicit_assign_to() {
@@ -31,9 +31,9 @@
     B2 b2;
     std::pair<A1,A2> a;
     std::pair<B1,B2> b;
- boost::assign_to(a,b);
- boost::assign_to(a, std::pair<B1,B2>(b1,b2));
- boost::assign_to(a, std::make_pair(b1,b2));
+ boost::conversion::assign_to(a,b);
+ boost::conversion::assign_to(a, std::pair<B1,B2>(b1,b2));
+ boost::conversion::assign_to(a, std::make_pair(b1,b2));
 
 }
 

Modified: sandbox/conversion/libs/conversion_ext/test/rational.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/rational.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/rational.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -22,8 +22,8 @@
     B1 b1(3);
     B1 b2(2);
     boost::rational<B1> b(1,2);
- 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)));
+ boost::rational<A1> a1(boost::conversion::convert_to<boost::rational<A1> >(b));
+ boost::rational<A1> a2(boost::conversion::convert_to<boost::rational<A1> >(boost::rational<B1>(b1,b2)));
 
 }
 void explicit_assign_to() {
@@ -31,8 +31,8 @@
     B1 b2(2);
     boost::rational<A1> a;
     boost::rational<B1> b(1,2);
- boost::assign_to(a, b);
- boost::assign_to(a, boost::rational<B1>(b1,b2));
+ boost::conversion::assign_to(a, b);
+ boost::conversion::assign_to(a, boost::rational<B1>(b1,b2));
 }
 
 int main( )

Modified: sandbox/conversion/libs/conversion_ext/test/string.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/string.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/string.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -21,16 +21,16 @@
 
 void explicit_convert_to() {
   bool b1=true;
- std::string str = boost::convert_to<std::string>(b1);
- bool b2=boost::convert_to<bool>(str);
+ std::string str = boost::conversion::convert_to<std::string>(b1);
+ bool b2=boost::conversion::convert_to<bool>(str);
 
 }
 void explicit_assign_to() {
   bool b1=true;
   std::string str;
- boost::assign_to(str, b1);
+ boost::conversion::assign_to(str, b1);
   bool b2;
- boost::assign_to(b2, str);
+ boost::conversion::assign_to(b2, str);
 }
 
 int main( )

Modified: sandbox/conversion/libs/conversion_ext/test/tuple.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/tuple.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/tuple.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -20,9 +20,9 @@
     B1 b1;
     B2 b2;
     fusion::tuple<B1,B2> b;
- 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)));
+ fusion::tuple<A1,A2> a1(boost::conversion::convert_to<fusion::tuple<A1,A2> >(b));
+ fusion::tuple<A1,A2> a2(boost::conversion::convert_to<fusion::tuple<A1,A2> >(fusion::tuple<B1,B2>(b1,b2)));
+ fusion::tuple<A1,A2> a3(boost::conversion::convert_to<fusion::tuple<A1,A2> >(fusion::make_tuple(b1,b2)));
 
 }
 void explicit_assign_to() {
@@ -30,9 +30,9 @@
     B2 b2;
     fusion::tuple<A1,A2> a;
     fusion::tuple<B1,B2> b;
- boost::assign_to(a, b);
- boost::assign_to(a, fusion::tuple<B1,B2>(b1,b2));
- boost::assign_to(a, fusion::make_tuple(b1,b2));
+ boost::conversion::assign_to(a, b);
+ boost::conversion::assign_to(a, fusion::tuple<B1,B2>(b1,b2));
+ boost::conversion::assign_to(a, fusion::make_tuple(b1,b2));
 
 }
 

Modified: sandbox/conversion/libs/conversion_ext/test/vector.cpp
==============================================================================
--- sandbox/conversion/libs/conversion_ext/test/vector.cpp (original)
+++ sandbox/conversion/libs/conversion_ext/test/vector.cpp 2011-05-25 18:27:23 EDT (Wed, 25 May 2011)
@@ -32,7 +32,7 @@
 
 void explicit_convert_to() {
     std::vector<B1> vb1;
- std::vector<A1> va1(boost::convert_to<std::vector<A1> >(vb1));
+ std::vector<A1> va1(boost::conversion::convert_to<std::vector<A1> >(vb1));
     B1 b10, b11, b12, b13;
     std::vector<B1> vb2;
     vb2.reserve(5);
@@ -40,32 +40,32 @@
     vb2[1]=b11;
     vb2[2]=b12;
     vb2[3]=b13;
- std::vector<A1> va2(boost::convert_to<std::vector<A1> >(vb2));
+ std::vector<A1> va2(boost::conversion::convert_to<std::vector<A1> >(vb2));
 
     std::allocator<A1> all;
     std::vector<A1,std::allocator<A1> > va3(
- boost::convert_to<std::vector<A1,std::allocator<A1> > >(
+ boost::conversion::convert_to<std::vector<A1,std::allocator<A1> > >(
             std::pair<
                 boost::reference_wrapper<std::vector<B1> const>,
                 boost::reference_wrapper<std::allocator<A1> const>
>(boost::cref(vb2), boost::cref(all))));
 
     std::vector<A1,std::allocator<A1> > va32(
- boost::convert_to<std::vector<A1,std::allocator<A1> > >(
+ boost::conversion::convert_to<std::vector<A1,std::allocator<A1> > >(
             std::make_pair(boost::cref(vb2), boost::cref(all))));
 
     boost::conversion::result_of::pack2<std::vector<B1> const, std::allocator<A1> const>::type v =
         boost::conversion::pack(vb2, all);
 
     //~ std::vector<A1,std::allocator<A1> > va4(
- //~ boost::convert_to<std::vector<A1,std::allocator<A1> > >(v));
+ //~ boost::conversion::convert_to<std::vector<A1,std::allocator<A1> > >(v));
 
     //~ std::vector<A1,std::allocator<A1> > va5(
- //~ boost::convert_to<std::vector<A1,std::allocator<A1> > >(
+ //~ boost::conversion::convert_to<std::vector<A1,std::allocator<A1> > >(
             //~ boost::conversion::pack(vb2, all)));
 
     std::vector<A1,std::allocator<A1> > va6(
- boost::convert_to<std::vector<A1,std::allocator<A1> > >(
+ boost::conversion::convert_to<std::vector<A1,std::allocator<A1> > >(
             boost::conversion::pack(vb2, std::allocator<A1>())));
 
 
@@ -73,7 +73,7 @@
 void explicit_assign_to() {
     std::vector<B1> vb1;
     std::vector<A1> va1;
- boost::assign_to(va1,vb1);
+ boost::conversion::assign_to(va1,vb1);
 
     B1 b10, b11, b12, b13;
     std::vector<B1> vb2;
@@ -83,7 +83,7 @@
     vb2[2]=b12;
     vb2[3]=b13;
 
- boost::assign_to(va1,vb2);
+ boost::conversion::assign_to(va1,vb2);
 
 }
 


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