$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r72308 - in sandbox/conversion/boost/conversion: . boost fp std
From: vicente.botet_at_[hidden]
Date: 2011-05-31 10:13:01
Author: viboes
Date: 2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
New Revision: 72308
URL: http://svn.boost.org/trac/boost/changeset/72308
Log:
Conversion: cleanup
Text files modified: 
   sandbox/conversion/boost/conversion/assign_to.hpp                                    |     4 +-                                      
   sandbox/conversion/boost/conversion/boost/array.hpp                                  |     4 +-                                      
   sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp |     4 +-                                      
   sandbox/conversion/boost/conversion/boost/chrono_posix_time.hpp                      |     6 +++                                     
   sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp  |     4 +-                                      
   sandbox/conversion/boost/conversion/boost/interval.hpp                               |     4 +-                                      
   sandbox/conversion/boost/conversion/boost/optional.hpp                               |    16 ++++++--                                
   sandbox/conversion/boost/conversion/boost/rational.hpp                               |    16 +--------                               
   sandbox/conversion/boost/conversion/boost/tuple.hpp                                  |     4 +-                                      
   sandbox/conversion/boost/conversion/ca_wrapper.hpp                                   |     4 +-                                      
   sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp                       |     4 +-                                      
   sandbox/conversion/boost/conversion/fp/convert_to.hpp                                |     6 +++                                     
   sandbox/conversion/boost/conversion/include.hpp                                      |     4 +-                                      
   sandbox/conversion/boost/conversion/pack.hpp                                         |     4 +-                                      
   sandbox/conversion/boost/conversion/std/complex.hpp                                  |     4 +-                                      
   sandbox/conversion/boost/conversion/std/pair.hpp                                     |     4 +-                                      
   sandbox/conversion/boost/conversion/std/string.hpp                                   |     4 +-                                      
   sandbox/conversion/boost/conversion/std/vector.hpp                                   |     4 +-                                      
   sandbox/conversion/boost/conversion/try_assign_to.hpp                                |    67 +++++++++++++++++++-------------------- 
   sandbox/conversion/boost/conversion/try_convert_to.hpp                               |     4 +-                                      
   20 files changed, 88 insertions(+), 83 deletions(-)
Modified: sandbox/conversion/boost/conversion/assign_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/assign_to.hpp	(original)
+++ sandbox/conversion/boost/conversion/assign_to.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -8,8 +8,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 /*!
- \file
- \brief
+ @file
+ @brief
  Defines the free function @c assign_to.
 
 The function @c assign_to assigns the @c from parameter to the @c to parameter.
Modified: sandbox/conversion/boost/conversion/boost/array.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/array.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/array.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c boost::array<> of convertible types.
  */
 
Modified: sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/chrono_duration_to_posix_time_duration.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c boost::posix_time::time_duration and @c boost::chrono::duration<>.
  */
 
Modified: sandbox/conversion/boost/conversion/boost/chrono_posix_time.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_posix_time.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/chrono_posix_time.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -8,6 +8,12 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
+/**
+ * @file
+ * @brief Include this file when using conversions between @c boost::posix_time ptime and
+ * time_duration and @c boost::chrono time_point and duration respectively.
+ */
+
 #ifndef BOOST_CONVERSION_CHRONO_POSIX_TIME_HPP
 #define BOOST_CONVERSION_CHRONO_POSIX_TIME_HPP
 
Modified: sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/chrono_time_point_to_posix_time_ptime.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c boost::ptime and @c boost::chrono::time_point<>.
  */
 
Modified: sandbox/conversion/boost/conversion/boost/interval.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/interval.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/interval.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @ile
+ @brief
  Include this file when using conversions between @c boost::numeric::interval<> of convertible types.
  */
 
Modified: sandbox/conversion/boost/conversion/boost/optional.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/optional.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/optional.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c boost::optional<> of convertible types.
  */
 
@@ -56,16 +56,22 @@
         }
       };
       
+      //! @brief @c convert_to 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 convert_to< optional<Target>, Source > 
+      struct convert_to< optional<Target>, Source>
       {
+        //! @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.
         inline static optional<Target> apply(Source const & from)
         {
           try
           {
             return optional<Target>(boost::conversion::convert_to<Target>(from));
-          } 
-          catch (...) 
+          }
+          catch (...)
           {
             return optional<Target>();
           }
Modified: sandbox/conversion/boost/conversion/boost/rational.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/rational.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/rational.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c boost::rational<> of convertible types.
  */
 
@@ -26,18 +26,6 @@
 
 namespace boost {
 
-#if !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
-    namespace conversion {
-      namespace detail {
-        template <typename T>
-        struct is_rational : mpl::false_ {};
-        template <typename T>
-        struct is_rational< ::boost::rational<T> > : mpl::true_ {};
-
-      }
-    }
-#endif
-
   namespace conversion {
     namespace overload_workaround {
       //! @brief @c convert_to specialization for source and target been @c boost::rational.
Modified: sandbox/conversion/boost/conversion/boost/tuple.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/boost/tuple.hpp	(original)
+++ sandbox/conversion/boost/conversion/boost/tuple.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c boost::fusion::tuple<> of convertible types.
  */
 #ifndef BOOST_CONVERSION_TUPLE_HPP
Modified: sandbox/conversion/boost/conversion/ca_wrapper.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/ca_wrapper.hpp	(original)
+++ sandbox/conversion/boost/conversion/ca_wrapper.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Defines the free function @c mca.
  */
 #ifndef BOOST_CONVERSION_CA_WRAPPER_HPP
Modified: sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp	(original)
+++ sandbox/conversion/boost/conversion/convert_to_or_fallback.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -8,8 +8,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 /*!
- \file
- \brief
+ @file
+ @brief
  Defines the free function @c convert_to_or_fallback.
 
  The @c convert_to_or_fallback function converts the @c from parameter to a @c To type. If the conversion fails the fallback value is used to construct a To @c instance. 
Modified: sandbox/conversion/boost/conversion/fp/convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/fp/convert_to.hpp	(original)
+++ sandbox/conversion/boost/conversion/fp/convert_to.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -8,6 +8,12 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
+/*!
+ @file
+ @brief
+ Defines a converter factory: @c make_converter_to.
+ */
+
 #ifndef BOOST_CONVERSION_FP_CONVERT_TO_HPP
 #define BOOST_CONVERSION_FP_CONVERT_TO_HPP
 
Modified: sandbox/conversion/boost/conversion/include.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/include.hpp	(original)
+++ sandbox/conversion/boost/conversion/include.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
 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.
  */
 
Modified: sandbox/conversion/boost/conversion/pack.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/pack.hpp	(original)
+++ sandbox/conversion/boost/conversion/pack.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -18,8 +18,8 @@
 #include <boost/fusion/support/pair.hpp>
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Defines the pack function.
 
 
Modified: sandbox/conversion/boost/conversion/std/complex.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/complex.hpp	(original)
+++ sandbox/conversion/boost/conversion/std/complex.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c std::complex<> of convertible types.
  */
 
Modified: sandbox/conversion/boost/conversion/std/pair.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/pair.hpp	(original)
+++ sandbox/conversion/boost/conversion/std/pair.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -8,8 +8,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c std::pair<> of convertible types.
  */
 
Modified: sandbox/conversion/boost/conversion/std/string.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/string.hpp	(original)
+++ sandbox/conversion/boost/conversion/std/string.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions from/to @c std::string.
  */
 
Modified: sandbox/conversion/boost/conversion/std/vector.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/std/vector.hpp	(original)
+++ sandbox/conversion/boost/conversion/std/vector.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 
 /*!
- \file
- \brief
+ @file
+ @brief
  Include this file when using conversions between @c std::vector<> of convertible types.
  */
 
Modified: sandbox/conversion/boost/conversion/try_assign_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/try_assign_to.hpp	(original)
+++ sandbox/conversion/boost/conversion/try_assign_to.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -8,8 +8,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 /*!
- \file
- \brief
+ @file
+ @brief
  Defines the free function @c try_assign_to.
 
 The function @c try_assign_to assigns the @c from parameter to the @c to parameter. Return @c true if assignation done and @c false otherwise.
@@ -87,47 +87,46 @@
         }
       };
     }
-
+  }
 
 #if !defined(BOOST_CONVERSION_DOXYGEN_INVOKED)
-    namespace impl_2 {
-      //! @brief Default @c try_assign_to overload, used when ADL fails.
-      //!
-      //! @Effects  Converts the @c from parameter to  the @c to parameter, using by default the assignment operator.
-      //! @NoThrow
-      //! @Returns the converted value if success or the fallback when conversion fails.
-      //! Forwards the call to the overload workaround, which can yet be specialized by the user for standard C++ types.
-      template < typename To, typename From >
-      bool try_assign_to(To& to, const From& from, dummy::type_tag<To> const&)
-      {
-        return conversion::overload_workaround::try_assign_to<To,From>::apply(to, from);
-      }
-    }
-
-    namespace impl {
-      template <typename Target, typename Source>
-      bool try_assign_to_impl(Target& to, const Source& from)
-      {
-        using namespace boost::conversion::impl_2;
-        //use boost::conversion::try_assign_to if ADL fails
-        return try_assign_to(to, from, dummy::type_tag<Target>());
-      }
-    }
-#endif
-
+  namespace conversion_impl_2 {
+    //! @brief Default @c try_assign_to overload, used when ADL fails.
+    //!
     //! @Effects  Converts the @c from parameter to  the @c to parameter, using by default the assignment operator.
     //! @NoThrow
     //! @Returns the converted value if success or the fallback when conversion fails.
-    //!
-    //! This function can be partially specialized on compilers supporting it.
+    //! Forwards the call to the overload workaround, which can yet be specialized by the user for standard C++ types.
+    template < typename To, typename From >
+    bool try_assign_to(To& to, const From& from)
+    {
+      return conversion::overload_workaround::try_assign_to<To,From>::apply(to, from);
+    }
+  }
+
+  namespace conversion_impl {
     template <typename Target, typename Source>
-    bool try_assign_to(Target& to, const Source& from, dummy::base_tag<Target> const& p=dummy::base_tag<Target>()
-    )
+    bool try_assign_to_impl(Target& to, const Source& from)
     {
-      (void)p;
-      return conversion::impl::try_assign_to_impl<Target, Source>(to, from);
+      using namespace boost::conversion_impl_2;
+      //use boost::conversion::try_assign_to if ADL fails
+      return try_assign_to(to, from);
     }
   }
+#endif
+  namespace conversion {
+
+  //! @Effects  Converts the @c from parameter to  the @c to parameter, using by default the assignment operator.
+  //! @NoThrow
+  //! @Returns the converted value if success or the fallback when conversion fails.
+  //!
+  //! This function can be partially specialized on compilers supporting it.
+  template <typename Target, typename Source>
+  bool try_assign_to(Target& to, const Source& from)
+  {
+    return conversion_impl::try_assign_to_impl<Target, Source>(to, from);
+  }
+}
 }
 
 #endif
Modified: sandbox/conversion/boost/conversion/try_convert_to.hpp
==============================================================================
--- sandbox/conversion/boost/conversion/try_convert_to.hpp	(original)
+++ sandbox/conversion/boost/conversion/try_convert_to.hpp	2011-05-31 10:12:58 EDT (Tue, 31 May 2011)
@@ -8,8 +8,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 /*!
- \file
- \brief
+ @file
+ @brief
  Defines the free function @c try_convert_to.
 
  The @c try_convert_to function converts the @c from parameter to a @c To type and returns an optional<To>, uninitialized if conversion fails.