|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72554 - in sandbox/conversion/boost/conversion: . boost std type_traits
From: vicente.botet_at_[hidden]
Date: 2011-06-12 10:33:26
Author: viboes
Date: 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
New Revision: 72554
URL: http://svn.boost.org/trac/boost/changeset/72554
Log:
Conversion: Added second level of cp with converter_cp and assigner_cp
Text files modified:
sandbox/conversion/boost/conversion/assign_to.hpp | 11 +++++++-
sandbox/conversion/boost/conversion/boost/array.hpp | 33 +++++++++++++++++++++++----
sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp | 24 ++++++++++----------
sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp | 24 ++++++++++----------
sandbox/conversion/boost/conversion/boost/interval.hpp | 8 +++---
sandbox/conversion/boost/conversion/boost/optional.hpp | 8 +++---
sandbox/conversion/boost/conversion/boost/rational.hpp | 8 +++---
sandbox/conversion/boost/conversion/boost/tuple.hpp | 8 +++---
sandbox/conversion/boost/conversion/convert_to.hpp | 12 ++++++++-
sandbox/conversion/boost/conversion/std/complex.hpp | 8 +++---
sandbox/conversion/boost/conversion/std/pair.hpp | 8 +++---
sandbox/conversion/boost/conversion/std/string.hpp | 48 ++++++++++++++++++++--------------------
sandbox/conversion/boost/conversion/std/vector.hpp | 21 ++++++++---------
sandbox/conversion/boost/conversion/type_traits/is_extrinsic_convertible.hpp | 16 ++++++------
14 files changed, 137 insertions(+), 100 deletions(-)
Modified: sandbox/conversion/boost/conversion/assign_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/assign_to.hpp (original)
+++ sandbox/conversion/boost/conversion/assign_to.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -64,7 +64,9 @@
#if defined(BOOST_CONVERSION_ENABLE_CND) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
template < typename Target, typename Source, class Enable = void>
- struct assigner : false_type {};
+ struct assigner_cp : false_type {};
+ template < typename Target, typename Source, class Enable = void>
+ struct assigner : assigner_cp<Target,Source,Enable> {};
@@ -82,7 +84,7 @@
> : true_type
#else
template < typename Target, typename Source, class Enable = void>
- struct assigner
+ struct assigner_cp
#endif
{
//! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
@@ -93,6 +95,11 @@
return to;
}
};
+#if !defined(BOOST_CONVERSION_ENABLE_CND)
+ template < typename Target, typename Source, class Enable = void >
+ struct assigner : assigner_cp<Target,Source,Enable> {};
+#endif
+
#if defined(BOOST_CONVERSION_ENABLE_CND) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
/**
* Specialization when @c Target is assignable from @c Source.
Modified: sandbox/conversion/boost/conversion/boost/array.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/array.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/array.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -37,12 +37,11 @@
* Partial specialization of @c converter for @c boost::array of the same size
*/
template < typename Target, typename Source, std::size_t N>
- struct converter< array<Target,N>, array<Source,N>
+ struct converter_cp< array<Target,N>, array<Source,N>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
- //is_extrinsic_assignable<array<Target,N>, array<Source,N> >::value
is_extrinsic_assignable<Target,Source>::value
- && ! default_converter_condition<array<Target,N>, array<Source,N> >::value
+ //&& ! default_converter_condition<array<Target,N>, array<Source,N> >::value
>::type
#endif
> : true_type
@@ -63,12 +62,12 @@
* Partial specialization of @c assigner for @c boost::array of the same size
*/
template < typename Target, typename Source, std::size_t N>
- struct assigner< array<Target,N>, array<Source,N>
+ struct assigner_cp< array<Target,N>, array<Source,N>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_assignable<Target,Source>::value
&& ! is_assignable<Target, Source>::value
- && ! default_assigner_condition<array<Target,N>, array<Source,N> >::value
+ //&& ! default_assigner_condition<array<Target,N>, array<Source,N> >::value
>::type
#endif
> : true_type
@@ -83,6 +82,30 @@
return to;
}
};
+ /**
+ * Partial specialization of @c assigner for @c boost::array of the same size
+ */
+#if defined(BOOST_CONVERSION_ENABLE_CND)
+ template < typename Target, typename Source, std::size_t N>
+ struct assigner_cp< array<Target,N>, array<Source,N>
+ , typename enable_if_c<
+ is_extrinsic_assignable<Target,Source>::value
+ && is_assignable<Target, Source>::value
+ //&& ! default_assigner_condition<array<Target,N>, array<Source,N> >::value
+ >::type
+ > : true_type
+ {
+ //! @Effects assign to each one of the target array elements the conversion of the source array element.
+ array<Target,N>& operator()(array<Target,N>& to, array<Source,N> const & from)
+ {
+ for (unsigned int i =0; i<N; ++i)
+ {
+ to[i] = from[i];
+ }
+ return to;
+ }
+ };
+#endif
}
#if defined(BOOST_CONVERSION_DOUBLE_CP)
Modified: sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -28,12 +28,12 @@
//! @brief @c converter specialization for conversions from @c boost::chrono::duration<> to @c boost::posix_time::time_duration.
//!
template < class Rep, class Period>
- struct converter<posix_time::time_duration, chrono::duration<Rep, Period>
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_converter_condition<posix_time::time_duration, chrono::duration<Rep, Period> >::value
- >::type
-#endif
+ struct converter_cp<posix_time::time_duration, chrono::duration<Rep, Period>
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_converter_condition<posix_time::time_duration, chrono::duration<Rep, Period> >::value
+// >::type
+//#endif
> : true_type
{
//! @Returns the duration converted to seconds+nanoseconds following the boost::posix_time::time_duration formatting.
@@ -57,12 +57,12 @@
//!
template < class Rep, class Period>
- struct converter<chrono::duration<Rep, Period>, posix_time::time_duration
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_converter_condition<chrono::duration<Rep, Period>, posix_time::time_duration >::value
- >::type
-#endif
+ struct converter_cp<chrono::duration<Rep, Period>, posix_time::time_duration
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_converter_condition<chrono::duration<Rep, Period>, posix_time::time_duration >::value
+// >::type
+//#endif
> : true_type
{
//! @Returns the duration cast from a nanoseconds duration initialized to the total number of nanosecond of the @c from parameter.
Modified: sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -28,12 +28,12 @@
namespace boost {
namespace conversion {
template < class Clock, class Duration>
- struct converter<posix_time::ptime, chrono::time_point<Clock, Duration>
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_converter_condition< posix_time::ptime, chrono::time_point<Clock, Duration> >::value
- >::type
-#endif
+ struct converter_cp<posix_time::ptime, chrono::time_point<Clock, Duration>
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_converter_condition< posix_time::ptime, chrono::time_point<Clock, Duration> >::value
+// >::type
+//#endif
> : true_type
{
posix_time::ptime operator()(const chrono::time_point<Clock, Duration>& from)
@@ -55,12 +55,12 @@
};
template < class Clock, class Duration>
- struct converter<chrono::time_point<Clock, Duration>, posix_time::ptime
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_converter_condition< chrono::time_point<Clock, Duration>, posix_time::ptime >::value
- >::type
-#endif
+ struct converter_cp<chrono::time_point<Clock, Duration>, posix_time::ptime
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_converter_condition< chrono::time_point<Clock, Duration>, posix_time::ptime >::value
+// >::type
+//#endif
> : true_type
{
chrono::time_point<Clock, Duration> operator()(const posix_time::ptime& from)
Modified: sandbox/conversion/boost/conversion/boost/interval.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/interval.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/interval.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -26,11 +26,11 @@
//! @brief @c converter specialization for source and target been @c boost::numeric::interval.
//!
template < class Target, class PTarget, class Source, class PSource>
- struct converter< numeric::interval<Target,PTarget>, numeric::interval<Source,PSource>
+ struct converter_cp< numeric::interval<Target,PTarget>, numeric::interval<Source,PSource>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
- && ! default_converter_condition< numeric::interval<Target,PTarget>, numeric::interval<Source,PSource> >::value
+ //&& ! default_converter_condition< numeric::interval<Target,PTarget>, numeric::interval<Source,PSource> >::value
>::type
#endif
> : true_type
@@ -42,11 +42,11 @@
}
};
template < class Target, class PTarget, class Source, class PSource>
- struct assigner< numeric::interval<Target,PTarget>, numeric::interval<Source,PSource>
+ struct assigner_cp< numeric::interval<Target,PTarget>, numeric::interval<Source,PSource>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
- && ! default_assigner_condition<numeric::interval<Target,PTarget>, numeric::interval<Source,PSource> >::value
+ //&& ! default_assigner_condition<numeric::interval<Target,PTarget>, numeric::interval<Source,PSource> >::value
>::type
#endif
> : true_type
Modified: sandbox/conversion/boost/conversion/boost/optional.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/optional.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/optional.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -45,11 +45,11 @@
* Partial specialization of @c converter for boost::optional
*/
template < class Target, class Source>
- struct converter< optional<Target>, optional<Source>
+ struct converter_cp< optional<Target>, optional<Source>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
- && ! default_converter_condition< optional<Target>, optional<Source> >::value
+ //&& ! default_converter_condition< optional<Target>, optional<Source> >::value
>::type
#endif
> : true_type
@@ -66,12 +66,12 @@
//!
//! We can see this specialization as a try_convert_to function.
template < class Target, class Source>
- struct converter< optional<Target>, Source
+ struct converter_cp< optional<Target>, Source
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
&& ! detail::is_optional<Source>::value
- && ! default_converter_condition<optional<Target>, Source >::value
+ //&& ! default_converter_condition<optional<Target>, Source >::value
>::type
#endif
> : true_type
Modified: sandbox/conversion/boost/conversion/boost/rational.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/rational.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/rational.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -29,11 +29,11 @@
//! @brief @c converter specialization for source and target been @c boost::rational.
//!
template < class Target, class Source>
- struct converter< rational<Target>, rational<Source>
+ struct converter_cp< rational<Target>, rational<Source>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
- && ! default_converter_condition< rational<Target>, rational<Source> >::value
+ //&& ! default_converter_condition< rational<Target>, rational<Source> >::value
>::type
#endif
> : true_type
@@ -45,11 +45,11 @@
}
};
template < class Target, class Source>
- struct assigner< rational<Target>, rational<Source>
+ struct assigner_cp< rational<Target>, rational<Source>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
- && ! default_assigner_condition<rational<Target>, rational<Source> >::value
+ //&& ! default_assigner_condition<rational<Target>, rational<Source> >::value
>::type
#endif
> : true_type
Modified: sandbox/conversion/boost/conversion/boost/tuple.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/tuple.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/tuple.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -24,12 +24,12 @@
namespace boost {
namespace conversion {
template < class T1, class T2, class S1, class S2>
- struct converter< fusion::tuple<T1,T2>, fusion::tuple<S1,S2>
+ struct converter_cp< fusion::tuple<T1,T2>, fusion::tuple<S1,S2>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<S1,T1>::value
&& is_extrinsic_convertible<S2,T2>::value
- && ! default_converter_condition< fusion::tuple<T1,T2>, fusion::tuple<S1,S2> >::value
+ //&& ! default_converter_condition< fusion::tuple<T1,T2>, fusion::tuple<S1,S2> >::value
>::type
#endif
> : true_type
@@ -43,13 +43,13 @@
}
};
template < class T1, class T2, class T3, class S1, class S2, class S3>
- struct converter< fusion::tuple<T1,T2,T3>, fusion::tuple<S1,S2,S3>
+ struct converter_cp< fusion::tuple<T1,T2,T3>, fusion::tuple<S1,S2,S3>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<S1,T1>::value
&& is_extrinsic_convertible<S2,T2>::value
&& is_extrinsic_convertible<S3,T3>::value
- && ! default_converter_condition< fusion::tuple<T1,T2,T3>, fusion::tuple<S1,S2,S3> >::value
+ //&& ! default_converter_condition< fusion::tuple<T1,T2,T3>, fusion::tuple<S1,S2,S3> >::value
>::type
#endif
> : true_type
Modified: sandbox/conversion/boost/conversion/convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convert_to.hpp (original)
+++ sandbox/conversion/boost/conversion/convert_to.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -92,7 +92,9 @@
//! @tparam Enable A dummy template parameter that can be used for SFINAE.
#if defined(BOOST_CONVERSION_ENABLE_CND)
template < typename Target, typename Source, class Enable = void >
- struct converter : false_type {};
+ struct converter_cp : false_type {};
+ template < typename Target, typename Source, class Enable = void >
+ struct converter : converter_cp<Target,Source,Enable> {};
//! Specialization for @c converter when @c is_explicitly_convertible<Source,Target>.
//! @Requires @c is_explicitly_convertible<Source,Target>
@@ -104,7 +106,7 @@
> : true_type
#else
template < typename Target, typename Source, class Enable = void >
- struct converter : true_type
+ struct converter_cp : true_type
#endif
{
//! @Effects Converts the @c from parameter to an instance of the @c Target type, using the conversion operator or copy constructor.
@@ -112,8 +114,14 @@
Target operator()(const Source& val)
{
return Target((val));
+ //return val;
}
};
+#if !defined(BOOST_CONVERSION_ENABLE_CND)
+ template < typename Target, typename Source, class Enable = void >
+ struct converter : converter_cp<Target,Source,Enable> {};
+#endif
+
#if defined(BOOST_CONVERSION_DOUBLE_CP)
#if !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
namespace impl_2 {
Modified: sandbox/conversion/boost/conversion/std/complex.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/complex.hpp (original)
+++ sandbox/conversion/boost/conversion/std/complex.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -28,11 +28,11 @@
* Partial specialization of @c convert_to for @c std::complex of the same size
*/
template < class Target, class Source>
- struct converter< std::complex<Target>, std::complex<Source>
+ struct converter_cp< std::complex<Target>, std::complex<Source>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
- && ! default_converter_condition< std::complex<Target>, std::complex<Source> >::value
+ //&& ! default_converter_condition< std::complex<Target>, std::complex<Source> >::value
>::type
#endif
> : true_type
@@ -45,11 +45,11 @@
}
};
template < class Target, class Source>
- struct assigner< std::complex<Target>, std::complex<Source>
+ struct assigner_cp< std::complex<Target>, std::complex<Source>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<Source,Target>::value
- && ! default_assigner_condition< std::complex<Target>, std::complex<Source> >::value
+ //&& ! default_assigner_condition< std::complex<Target>, std::complex<Source> >::value
>::type
#endif
> : true_type
Modified: sandbox/conversion/boost/conversion/std/pair.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/pair.hpp (original)
+++ sandbox/conversion/boost/conversion/std/pair.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -26,11 +26,11 @@
// std namespace can not be overloaded
template < class T1, class T2, class S1, class S2>
- struct converter< std::pair<T1,T2>, std::pair<S1,S2>
+ struct converter_cp< std::pair<T1,T2>, std::pair<S1,S2>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<S1,T1>::value && is_extrinsic_convertible<S2,T2>::value
- && ! default_converter_condition< std::pair<T1,T2>, std::pair<S1,S2> >::value
+ //&& ! default_converter_condition< std::pair<T1,T2>, std::pair<S1,S2> >::value
>::type
#endif
> : true_type
@@ -41,11 +41,11 @@
}
};
template < class T1, class T2, class S1, class S2>
- struct assigner< std::pair<T1,T2>, std::pair<S1,S2>
+ struct assigner_cp< std::pair<T1,T2>, std::pair<S1,S2>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_convertible<S1,T1>::value && is_extrinsic_convertible<S2,T2>::value
- && ! default_assigner_condition<std::pair<T1,T2>,std::pair<S1,S2> >::value
+ //&& ! default_assigner_condition<std::pair<T1,T2>,std::pair<S1,S2> >::value
>::type
#endif
> : true_type
Modified: sandbox/conversion/boost/conversion/std/string.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/string.hpp (original)
+++ sandbox/conversion/boost/conversion/std/string.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -31,12 +31,12 @@
// std namespace can not be overloaded
template<typename T, typename CharT, typename Traits, typename Alloc>
- struct converter< std::basic_string<CharT,Traits,Alloc>, T
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_converter_condition< std::basic_string<CharT,Traits,Alloc>, T >::value
- >::type
-#endif
+ struct converter_cp< std::basic_string<CharT,Traits,Alloc>, T
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_converter_condition< std::basic_string<CharT,Traits,Alloc>, T >::value
+// >::type
+//#endif
> : true_type
{
std::basic_string<CharT,Traits,Alloc> operator()(T const & from)
@@ -49,12 +49,12 @@
}
};
template<typename T, typename CharT, typename Traits, typename Alloc>
- struct converter< T, std::basic_string<CharT,Traits,Alloc>
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_converter_condition< T, std::basic_string<CharT,Traits,Alloc> >::value
- >::type
-#endif
+ struct converter_cp< T, std::basic_string<CharT,Traits,Alloc>
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_converter_condition< T, std::basic_string<CharT,Traits,Alloc> >::value
+// >::type
+//#endif
> : true_type
{
T operator()(std::basic_string<CharT,Traits,Alloc> const & from)
@@ -68,12 +68,12 @@
};
template<typename T, typename CharT, typename Traits, typename Alloc>
- struct assigner< std::basic_string<CharT,Traits,Alloc>, T
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_assigner_condition< std::basic_string<CharT,Traits,Alloc>, T >::value
- >::type
-#endif
+ struct assigner_cp< std::basic_string<CharT,Traits,Alloc>, T
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_assigner_condition< std::basic_string<CharT,Traits,Alloc>, T >::value
+// >::type
+//#endif
> : true_type
{
std::basic_string<CharT,Traits,Alloc>&
@@ -88,12 +88,12 @@
}
};
template<typename T, typename CharT, typename Traits, typename Alloc>
- struct assigner< T, std::basic_string<CharT,Traits,Alloc>
-#if defined(BOOST_CONVERSION_ENABLE_CND)
- , typename enable_if_c<
- ! default_assigner_condition< T, std::basic_string<CharT,Traits,Alloc> >::value
- >::type
-#endif
+ struct assigner_cp< T, std::basic_string<CharT,Traits,Alloc>
+//#if defined(BOOST_CONVERSION_ENABLE_CND)
+// , typename enable_if_c<
+// ! default_assigner_condition< T, std::basic_string<CharT,Traits,Alloc> >::value
+// >::type
+//#endif
> : true_type
{
T& operator()(T& to, const std::basic_string<CharT,Traits,Alloc>& from)
Modified: sandbox/conversion/boost/conversion/std/vector.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/vector.hpp (original)
+++ sandbox/conversion/boost/conversion/std/vector.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -30,12 +30,11 @@
// std namespace can not be overloaded
template < class T1, class A1, class T2, class A2>
- struct converter< std::vector<T1,A1>, std::vector<T2,A2>
+ struct converter_cp< std::vector<T1,A1>, std::vector<T2,A2>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_assignable<T1,T2>::value
- //is_extrinsic_assignable< std::vector<T1,A1>, std::vector<T2,A2> >::value
- && ! default_converter_condition< std::vector<T1,A1>, std::vector<T2,A2>>::value
+ //&& ! default_converter_condition< std::vector<T1,A1>, std::vector<T2,A2>>::value
>::type
#endif
> : true_type
@@ -54,7 +53,7 @@
#if 0
template < class T1, class A1, class T2, class A2>
- struct converter< std::vector<T1,A1>,
+ struct converter_cp< std::vector<T1,A1>,
//~ typename boost::conversion::result_of::pack2<std::vector<T2,A2> const, A1 const>::type
//~ boost::fusion::tuple<
std::pair<
@@ -69,11 +68,11 @@
boost::reference_wrapper<A1 const>
>
- && ! default_converter_condition< std::vector<T1,A1>,
- std::pair<
- boost::reference_wrapper<std::vector<T2,A2> const>,
- boost::reference_wrapper<A1 const>
- > >::value
+// && ! default_converter_condition< std::vector<T1,A1>,
+// std::pair<
+// boost::reference_wrapper<std::vector<T2,A2> const>,
+// boost::reference_wrapper<A1 const>
+// > >::value
>::type
#endif
@@ -93,11 +92,11 @@
#endif
template < class T1, class A1, class T2, class A2>
- struct assigner< std::vector<T1,A1>, std::vector<T2,A2>
+ struct assigner_cp< std::vector<T1,A1>, std::vector<T2,A2>
#if defined(BOOST_CONVERSION_ENABLE_CND)
, typename enable_if_c<
is_extrinsic_assignable<T1,T2>::value
- && ! default_assigner_condition< std::vector<T1,A1>, std::vector<T2,A2> >::value
+ //&& ! default_assigner_condition< std::vector<T1,A1>, std::vector<T2,A2> >::value
>::type
#endif
> : true_type
Modified: sandbox/conversion/boost/conversion/type_traits/is_extrinsic_convertible.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_extrinsic_convertible.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_extrinsic_convertible.hpp 2011-06-12 10:33:24 EDT (Sun, 12 Jun 2011)
@@ -25,14 +25,14 @@
struct is_extrinsic_convertible : conversion::converter<Target, Source> {};
template <class T>
struct is_extrinsic_convertible<fusion::void_,T> : false_type {};
-// template <>
-// struct is_extrinsic_convertible<void, void> : true_type {};
-// template <>
-// struct is_extrinsic_convertible<const void,void> : true_type {};
-// template <>
-// struct is_extrinsic_convertible<void, const void> : true_type {};
-// template <>
-// struct is_extrinsic_convertible<const void, const void> : true_type {};
+ template <>
+ struct is_extrinsic_convertible<void, void> : true_type {};
+ template <>
+ struct is_extrinsic_convertible<const void,void> : true_type {};
+ template <>
+ struct is_extrinsic_convertible<void, const void> : true_type {};
+ template <>
+ struct is_extrinsic_convertible<const void, const void> : true_type {};
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk