Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73225 - in sandbox/conversion/boost/conversion: . boost std type_traits
From: vicente.botet_at_[hidden]
Date: 2011-07-18 19:57:50


Author: viboes
Date: 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
New Revision: 73225
URL: http://svn.boost.org/trac/boost/changeset/73225

Log:
conversion: cleanup of ENBALE_CND
Text files modified:
   sandbox/conversion/boost/conversion/assign_to.hpp | 40 -------------------------------
   sandbox/conversion/boost/conversion/assignable_to.hpp | 23 +----------------
   sandbox/conversion/boost/conversion/boost/array.hpp | 8 ++---
   sandbox/conversion/boost/conversion/boost/interval.hpp | 4 +-
   sandbox/conversion/boost/conversion/boost/optional.hpp | 6 ++--
   sandbox/conversion/boost/conversion/boost/rational.hpp | 4 +-
   sandbox/conversion/boost/conversion/boost/tuple.hpp | 4 +-
   sandbox/conversion/boost/conversion/config.hpp | 36 ---------------------------
   sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp | 46 ------------------------------------
   sandbox/conversion/boost/conversion/convertible_from.hpp | 6 ---
   sandbox/conversion/boost/conversion/convertible_to.hpp | 4 ---
   sandbox/conversion/boost/conversion/explicit_convert_to.hpp | 51 ----------------------------------------
   sandbox/conversion/boost/conversion/implicit_convert_to.hpp | 4 +-
   sandbox/conversion/boost/conversion/std/pair.hpp | 19 +++++++++-----
   sandbox/conversion/boost/conversion/std/string.hpp | 30 -----------------------
   sandbox/conversion/boost/conversion/std/vector.hpp | 14 +++++++---
   sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp | 5 ---
   17 files changed, 39 insertions(+), 265 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-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -45,7 +45,6 @@
   namespace conversion {
 
 
-#if defined(BOOST_CONVERSION_ENABLE_CND) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     //! Customization point for @c assign_to.
     //!
     //! @tparam Target target type of the conversion.
@@ -197,45 +196,6 @@
       }
     };
 
-
-#else
- template < typename Target, typename Source, class Enable = void>
- struct assigner_cp : true_type
- {
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator.
- //! @Throws Whatever the underlying assignment operator of the @c Target class throws.
- Target& operator()(Target& to, const Source& from)
- {
- to = ::boost::conversion::implicit_convert_to<Target>(from);
- return to;
- }
- };
- template < typename Target, typename Source, class Enable = void>
- struct assigner : assigner_cp<Target,Source,Enable> {};
-
- //! Partial specialization for c-array types.
- //!
- //! @Requires @c Target must be CopyAssinable and @c @c Source must be extrinsic convertible to @c Target.
- template < typename Target, typename Source, std::size_t N >
- struct assigner<Target[N],Source[N]
- > : true_type
- {
- //! @Effects Converts the @c from parameter to the @c to parameter, using by default the assignment operator on each one of the array elements.
- //! @Throws Whatever the underlying assignment operator of the @c Target class throws.
- //! @Basic
- Target*& operator()(Target(&to)[N], const Source(& from)[N])
- {
- for (std::size_t i = 0; i < N; ++i)
- {
- to[i] = ::boost::conversion::implicit_convert_to<Target>(from[i]);
- }
- return to;
- }
- };
-
-#endif
-
-
   }
 
 #if defined(BOOST_CONVERSION_DOUBLE_CP)

Modified: sandbox/conversion/boost/conversion/assignable_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/assignable_to.hpp (original)
+++ sandbox/conversion/boost/conversion/assignable_to.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -41,20 +41,6 @@
       //! @NoThrow.
       assignable_to(Target& r) : ref_(r) {}
 
-// //! Implicit conversion to @c U.
-// //! @Effects Forwards the conversion from the reference using @c conver_to.
-// //! @Returns @c *this
-// //! @Throws Whatever @c convert_to throws.
-// template <typename U
-//#if defined(BOOST_CONVERSION_ENABLE_CND) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
-// , typename boost::enable_if< is_extrinsically_convertible<Target,U>, int >::type = 0
-//#endif
-// >
-// operator U()
-// {
-// return boost::conversion::convert_to<U>(ref_);
-// }
-
       //! Assignment.
       //!
       //! @Effects Forwards the assignment to the reference.
@@ -73,7 +59,7 @@
       //! @Throws Whatever @c assign_to throws.
       //! @Remark This constructor doesn't participates on overload resolution if @c Source is not extrinsic assignable to @c Target.
       template <typename Source>
-#if defined(BOOST_CONVERSION_ENABLE_CND) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
       typename boost::enable_if< is_extrinsically_assignable<Target,Source>, assignable_to& >::type
 #else
       assignable_to&
@@ -91,7 +77,7 @@
       //! @Throws Whatever @c assign_to throws.
       //! @Remark This constructor doesn't participates on overload resolution if @c Source is not extrinsic assignable to @c Target.
       template <typename Source>
-#if defined(BOOST_CONVERSION_ENABLE_CND) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
       typename boost::enable_if< is_extrinsically_assignable<Target,Source>, assignable_to& >::type
 #else
       assignable_to&
@@ -106,11 +92,6 @@
 
     //! The result is able to transform conversion by convert_to calls and assignments by assign_to calls.
     //! @NoThrow.
- //~ template <typename Target>
- //~ assignable_to<Target> mat(Target& r)
- //~ {
- //~ return assignable_to<Target>(r);
- //~ }
     template <typename Target>
     assignable_to<Target> lvalue(Target& r)
     {

Modified: sandbox/conversion/boost/conversion/boost/array.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/array.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/array.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -48,7 +48,7 @@
         , requires(
         ExtrinsicallyAssignable<Target,Source>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_assignable<Target, Source>::value
>::type
@@ -78,7 +78,7 @@
         ExtrinsicallyAssignable<Target,Source>
   && ! Assignable<Target, Source>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_assignable<Target,Source>::value
   && ! is_assignable<Target, Source>::value
@@ -99,7 +99,6 @@
     /**
      * Partial specialization of @c assigner for @c boost::array of the same size
      */
-#if defined(BOOST_CONVERSION_ENABLE_CND) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     template < typename Target, typename Source, std::size_t N>
     struct assigner_cp< array<Target,N>, array<Source,N>
 #if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
@@ -107,7 +106,7 @@
         ExtrinsicallyAssignable<Target,Source>
      && Assignable<Target, Source>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_assignable<Target,Source>::value
      && is_assignable<Target, Source>::value
@@ -125,7 +124,6 @@
         return to;
       }
     };
-#endif
   }
 
 #if defined(BOOST_CONVERSION_DOUBLE_CP)

Modified: sandbox/conversion/boost/conversion/boost/interval.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/interval.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/interval.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -37,7 +37,7 @@
         , requires(
         ExtrinsicallyConvertible<Source,Target>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<Source,Target>::value
>::type
@@ -56,7 +56,7 @@
         , requires(
         ExtrinsicallyConvertible<Source,Target>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<Source,Target>::value
>::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-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -46,7 +46,7 @@
         , requires(
         ExtrinsicallyConvertible<Source,Target>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<Source,Target>::value
>::type
@@ -72,7 +72,7 @@
         ExtrinsicallyConvertible<Source,Target>
         && ! Optional<Source>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<Source,Target>::value
         && ! detail::is_optional<Source>::value
@@ -107,7 +107,7 @@
         ExtrinsicallyExplicit_convertible<Source,Target>
         && ! Optional<Source>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_explicit_convertible<Source,Target>::value
         && ! detail::is_optional<Source>::value

Modified: sandbox/conversion/boost/conversion/boost/rational.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/rational.hpp (original)
+++ sandbox/conversion/boost/conversion/boost/rational.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -43,7 +43,7 @@
         , requires(
         ExtrinsicallyConvertible<Source,Target>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<Source,Target>::value
>::type
@@ -62,7 +62,7 @@
         , requires(
         ExtrinsicallyConvertible<Source,Target>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<Source,Target>::value
>::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-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -36,7 +36,7 @@
     ExtrinsicallyConvertible<S1,T1>
     && ExtrinsicallyConvertible<S2,T2>
     )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<S1,T1>::value
      && is_extrinsically_convertible<S2,T2>::value
@@ -60,7 +60,7 @@
         && ExtrinsicallyConvertible<S2,T2>
         && ExtrinsicallyConvertible<S3,T3>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_convertible<S1,T1>::value
         && is_extrinsically_convertible<S2,T2>::value

Modified: sandbox/conversion/boost/conversion/config.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/config.hpp (original)
+++ sandbox/conversion/boost/conversion/config.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -18,42 +18,8 @@
 #include <boost/config.hpp>
 #include <boost/utility/enable_if.hpp>
 
-#define BOOST_CONVERSION_REQUIRES(CND) \
- , typename enable_if_c< CND >::type
 
-#if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
- #define BOOST_CONVERSION_ENABLE_CND
-#else
- #if ! defined(BOOST_NO_DECLTYPE)
- #if defined _MSC_VER
- #elif defined __clang__
- #define BOOST_CONVERSION_ENABLE_CND
- #elif defined __GNUC__
- #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
- #endif
- #define BOOST_CONVERSION_ENABLE_CND
- #else
- #define BOOST_CONVERSION_ENABLE_CND
- #endif
- #else
- #if defined _MSC_VER
- #define BOOST_CONVERSION_NO_IS_ASSIGNABLE
- #elif defined __clang__
- #define BOOST_CONVERSION_ENABLE_CND
- #elif defined __GNUC__
- #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
- #endif
- #define BOOST_CONVERSION_ENABLE_CND
- #else
- #endif
- #endif
-#endif
-
-#if !defined BOOST_CONVERSION_ENABLE_CND
-#define BOOST_CONVERSION_ENABLE_CND
-#endif
-
-#if defined(BOOST_CONVERSION_ENABLE_CND) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+#if !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
   #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
   #else
     #define BOOST_CONVERSION_IMPLICITLY_ENABLED

Modified: sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp (original)
+++ sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -45,7 +45,6 @@
 
 namespace boost {
   namespace conversion {
-#if defined(BOOST_CONVERSION_ENABLE_CND) || !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     //! Customization point for @c convert_to_or_fallback.
     //!
     //! @tparam Target target type of the conversion.
@@ -103,46 +102,7 @@
         }
       }
     };
-#else
- //! @tparam Target target type of the conversion.
- //! @tparam Source source type of the conversion.
- //! @tparam Fallback type of the fallback value which must be explicitly convertible to @c Target.
- //! @tparam Enable A dummy template parameter that can be used for SFINAE.
- template < typename Target, typename Source, typename Fallback=Target, class Enable = void>
- struct converter_or_fallbacker_cp {};
 
- //! Default @c converter_or_fallbacker.
- //! @tparam Target target type of the conversion.
- //! @tparam Source source type of the conversion.
- //! @tparam Fallback type of the fallback value which must be explicitly convertible to @c Target.
- //! @tparam Enable A dummy template parameter that can be used for SFINAE.
- template < typename Target, typename Source, typename Fallback=Target, class Enable = void>
- struct converter_or_fallbacker : converter_or_fallbacker_cp<Target,Source,Fallback,Enable> {};
-
- //! @tparam Target target type of the conversion.
- //! @tparam Source source type of the conversion.
- //! @tparam Fallback type of the fallback value which must be explicitly convertible to @c Target.
- //! @tparam Enable A dummy template parameter that can be used for SFINAE.
- template < typename Target, typename Source, typename Fallback>
- struct converter_or_fallbacker<Target, Source, Fallback>
- {
- //!
- //! @Requires @c Fallback must be convertible to @c Target and @c ::boost::conversion::convert_to<Target>(from) must be well formed.
- //! @Returns The converted value if the conversion succeeds or the fallback.
- //! @Throws Whatever the conversion from @c Fallback to @c Target can throws when the conversion fails.
- Target operator()(const Source& val, Fallback const& fallback)
- {
- try
- {
- return boost::conversion::convert_to<Target>(val);
- }
- catch (...)
- {
- return boost::conversion::convert_to<Target>(fallback);
- }
- }
- };
-#endif
 
 #if defined(BOOST_CONVERSION_DOUBLE_CP)
 #if !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
@@ -186,13 +146,9 @@
     //! int t=boost::conversion::convert_to_or_fallback<int>(s,-1);
     //! @endcode
     template <typename Target, typename Source, typename Fallback>
-#if defined(BOOST_CONVERSION_ENABLE_CND) || !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     typename enable_if_c<
          ! is_same<Target,Fallback>::value
     , Target>::type
-#else
- Target
-#endif
     convert_to_or_fallback(Source const& from, Fallback const& fallback) {
 #if defined(BOOST_CONVERSION_DOUBLE_CP)
       return conversion::impl::convert_to_or_fallback_impl<Target>(from, fallback);
@@ -200,7 +156,6 @@
       return conversion::converter_or_fallbacker<Target,Source,Fallback>()(from, fallback);
 #endif
     }
-#if defined(BOOST_CONVERSION_ENABLE_CND) || !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     //! @brief Extrinsic conversion function with fallback.
     //! Converts the @c from parameter to a @c Target type. If the conversion fails the fallback value is used to construct a Target @c instance.
     //! @tparam Target target type of the conversion.
@@ -221,7 +176,6 @@
       return conversion::converter_or_fallbacker<Target,Source>()(from, fallback);
 #endif
     }
-#endif
   }
 }
 

Modified: sandbox/conversion/boost/conversion/convertible_from.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convertible_from.hpp (original)
+++ sandbox/conversion/boost/conversion/convertible_from.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -75,11 +75,7 @@
     //! }
     //! };
     //! @endcode
- //~ template <typename Source>
- //~ convertible_from<Source> implicitly(Source s)
- //~ {
- //~ return convertible_from<Source>(s);
- //~ }
+
     template <typename Source>
     convertible_from<Source> implicitly(Source s)
     {

Modified: sandbox/conversion/boost/conversion/convertible_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convertible_to.hpp (original)
+++ sandbox/conversion/boost/conversion/convertible_to.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -38,15 +38,11 @@
       //! @Remark This constructor doesn't participates on overload resolution if @c Source is not extrinsic convertible to @c Target.
       template <typename Source>
       convertible_to(Source const& source
-#if defined(BOOST_CONVERSION_ENABLE_CND)
           , typename enable_if<is_extrinsically_convertible<Source,Target> >::type* dummy = 0
-#endif
           )
         : val_(boost::conversion::implicit_convert_to<Target>(source))
       {
-#if defined(BOOST_CONVERSION_ENABLE_CND)
         (void)dummy; // remove warning dummy not used
-#endif
       }
 
       //! Implicit conversion to @c Target.

Modified: sandbox/conversion/boost/conversion/explicit_convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/explicit_convert_to.hpp (original)
+++ sandbox/conversion/boost/conversion/explicit_convert_to.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -47,7 +47,6 @@
     explicit_convert_to(Source const& from);
 
 
-#if defined(BOOST_CONVERSION_ENABLE_CND) || !defined(BOOST_NO_SFINAE_EXPR) || defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     //! Customization point for @c explicit_convert_to.
     //!
     //! @tparam Target target type of the conversion.
@@ -155,56 +154,6 @@
         }
       }
     };
-#else
- //! Customization point for @c explicit_convert_to.
- //! @tparam Target target type of the conversion.
- //! @tparam Source source type of the conversion.
- //! @tparam Enable A dummy template parameter that can be used for SFINAE.
- template < typename Target, typename Source, class Enable = void >
- struct explicit_converter_cp : false_type
- {
- //! @Effects Converts the @c from parameter to an instance of the @c Target type, using the conversion operator or copy constructor.
- //! @Throws Whatever the underlying conversion @c Target operator of the @c Source class throws.
- Target operator()(const Source& val)
- {
- return Target((val));
- }
- };
-
- namespace detail {
- template < typename Target, typename Source, bool TargetIsOptional, bool SourceIsOptional>
- struct explicit_converter_aux : explicit_converter_cp<Target, Source>
- {};
- //! @brief @c explicit converter specialization to try to convert the source to @c Target::value_type when @c Target is optional.
- //!
- //! We can see this specialization as a try_convert_to function.
- template < class Target, class Source>
- struct explicit_converter_aux< optional<Target>, Source, true, false> : true_type
-
- {
- //! @Returns If the source is convertible to the target @c value_type
- //! @c Target initialized to the result of the conversion.
- //! Uninitialized @c Target otherwise.
- optional<Target> operator()(Source const & from)
- {
- try
- {
- return optional<Target>(explicit_convert_to<Target>(from));
- }
- catch (...)
- {
- return optional<Target>();
- }
- }
- };
- }
- //! Default @c explicit_converter.
- template < typename Target, typename Source, class Enable = void >
- struct explicit_converter : detail::explicit_converter_aux<Target,Source,detail::is_optional<Target>::value, detail::is_optional<Source>::value> {};
-
-
-
-#endif
 
 
 #if defined(BOOST_CONVERSION_DOUBLE_CP)

Modified: sandbox/conversion/boost/conversion/implicit_convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/implicit_convert_to.hpp (original)
+++ sandbox/conversion/boost/conversion/implicit_convert_to.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -118,7 +118,7 @@
 
     namespace impl {
       template <typename Target, typename Source>
- Target convert_to_impl(Source const& from)
+ Target implicit_convert_to_impl(Source const& from)
       {
         using namespace boost::conversion::impl_2;
         //use boost::conversion::impl_2::implicit_convert_to if ADL fails
@@ -151,7 +151,7 @@
     implicit_convert_to(Source const& from)
     {
 #if defined(BOOST_CONVERSION_DOUBLE_CP)
- return boost::conversion::impl::convert_to_impl<Target>(from);
+ return boost::conversion::impl::implicit_convert_to_impl<Target>(from);
 #else
       return conversion::implicit_converter<Target,Source>()(from);
 #endif

Modified: sandbox/conversion/boost/conversion/std/pair.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/pair.hpp (original)
+++ sandbox/conversion/boost/conversion/std/pair.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -44,7 +44,7 @@
           ExtrinsicallyConvertible<S1,T1>
           && ExtrinsicallyConvertible<S2,T2>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
           is_extrinsically_convertible<S1,T1>::value
           && is_extrinsically_convertible<S2,T2>::value
@@ -58,16 +58,22 @@
         }
     };
 
-#if !defined(BOOST_CONVERSION_ENABLE_CND) && !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     /**
      * Partial specialization of @c assigner_cp for @c std::pair of extrinsic convertibles.
      */
     template < class T1, class T2, class S1, class S2>
     struct assigner_cp< std::pair<T1,T2>, std::pair<S1,S2>
- BOOST_CONVERSION_REQUIRES((
- is_extrinsically_convertible<S1,T1>::value
- && is_extrinsically_convertible<S2,T2>::value
- ))
+#if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
+ , requires(
+ ExtrinsicallyConvertible<S1,T1>
+ && ExtrinsicallyConvertible<S2,T2>
+ )
+#else
+ , typename enable_if_c<
+ is_extrinsically_convertible<S1,T1>::value
+ && is_extrinsically_convertible<S2,T2>::value
+ >::type
+#endif
> : true_type
     {
         std::pair<T1,T2>& operator()(std::pair<T1,T2>& to, const std::pair<S1,S2>& from)
@@ -77,7 +83,6 @@
             return to;
         }
     };
-#endif
   }
 }
 

Modified: sandbox/conversion/boost/conversion/std/string.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/string.hpp (original)
+++ sandbox/conversion/boost/conversion/std/string.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -72,36 +72,6 @@
       }
     };
 
-#if !defined(BOOST_CONVERSION_ENABLE_CND) && !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
- /**
- * Partial specialization of @c assigner_cp for convertibles to std::string.
- */
- template<typename T, typename CharT, typename Traits, typename Alloc>
- struct assigner_cp< std::basic_string<CharT,Traits,Alloc>, T
- > : true_type
- {
- std::basic_string<CharT,Traits,Alloc>&
- operator()(std::basic_string<CharT,Traits,Alloc>& to, const T& from)
- {
- to = boost::conversion::convert_to<std::basic_string<CharT,Traits,Alloc> >(from);
- return to;
- }
- };
- /**
- * Partial specialization of @c assigner_cp for convertibles from std::string.
- */
- template<typename T, typename CharT, typename Traits, typename Alloc>
- struct assigner_cp< T, std::basic_string<CharT,Traits,Alloc>
- > : true_type
- {
- T& operator()(T& to, const std::basic_string<CharT,Traits,Alloc>& from)
- {
- to = boost::conversion::convert_to<T>(from);
- return to;
- }
- };
-#endif
-
   }
 }
 

Modified: sandbox/conversion/boost/conversion/std/vector.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/vector.hpp (original)
+++ sandbox/conversion/boost/conversion/std/vector.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -46,7 +46,7 @@
         , requires
         ExtrinsicallyAssignable<T1,T2>
         )
-#elif defined(BOOST_CONVERSION_ENABLE_CND)
+#else
         , typename enable_if_c<
         is_extrinsically_assignable<T1,T2>::value
>::type
@@ -65,15 +65,20 @@
         }
     };
 
-#if !defined(BOOST_CONVERSION_ENABLE_CND) && !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
     /**
      * Partial specialization of @c assigner_cp for @c std::vector of extrinsic convertibles.
      */
     template < class T1, class A1, class T2, class A2>
     struct assigner_cp< std::vector<T1,A1>, std::vector<T2,A2>
- BOOST_CONVERSION_REQUIRES((
+#if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
+ , requires
+ ExtrinsicallyAssignable<T1,T2>
+ )
+#else
+ , typename enable_if_c<
         is_extrinsically_assignable<T1,T2>::value
- ))
+ >::type
+#endif
> : true_type
     {
         std::vector<T1,A1>& operator()(
@@ -87,7 +92,6 @@
             return to;
         }
     };
-#endif
 
   }
 }

Modified: sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp (original)
+++ sandbox/conversion/boost/conversion/type_traits/is_assignable.hpp 2011-07-18 19:57:48 EDT (Mon, 18 Jul 2011)
@@ -18,11 +18,6 @@
 #include <boost/config.hpp>
 #include <boost/utility/enable_if.hpp>
 
-#if ! defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
-#define BOOST_CONVERSION_REQUIRES(CND) \
- , typename enable_if_c< CND >::type
-#endif
-
 #if defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
   //! Macro stating if the compiler don't support the features needed to define the @c is_assignable type trait.
   #define BOOST_CONVERSION_NO_IS_ASSIGNABLE


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