Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2007-07-27 15:17:50


Author: steven_watanabe
Date: 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
New Revision: 7567
URL: http://svn.boost.org/trac/boost/changeset/7567

Log:
Doxygen tweaks
Text files modified:
   sandbox/units/boost/units/base_dimension.hpp | 8 ++++++--
   sandbox/units/boost/units/base_unit.hpp | 8 ++++++--
   sandbox/units/boost/units/config.hpp | 22 ++++++++++++++++++++++
   sandbox/units/boost/units/operators.hpp | 2 +-
   sandbox/units/boost/units/quantity.hpp | 4 ++--
   sandbox/units/boost/units/scaled_base_unit.hpp | 4 ++++
   sandbox/units/boost/units/units_fwd.hpp | 2 ++
   7 files changed, 43 insertions(+), 7 deletions(-)

Modified: sandbox/units/boost/units/base_dimension.hpp
==============================================================================
--- sandbox/units/boost/units/base_dimension.hpp (original)
+++ sandbox/units/boost/units/base_dimension.hpp 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
@@ -37,11 +37,15 @@
 /// It is designed so that you will get an error message if you try
 /// to use the same value in multiple definitions.
 template<class Derived,
- long N,
+ long N
+#ifndef BOOST_UNITS_DOXYGEN
+ ,
          class = typename detail::ordinal_has_already_been_defined<
              sizeof(boost_units_is_registered(units::base_dimension_ordinal<N>())) == sizeof(detail::yes) &&
              sizeof(boost_units_is_registered(units::base_dimension_pair<Derived, N>())) != sizeof(detail::yes)
- >::type>
+ >::type
+#endif
+>
 class base_dimension :
     public mpl::long_<N>
 {

Modified: sandbox/units/boost/units/base_unit.hpp
==============================================================================
--- sandbox/units/boost/units/base_unit.hpp (original)
+++ sandbox/units/boost/units/base_unit.hpp 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
@@ -40,11 +40,15 @@
 /// to use the same value in multiple definitions.
 template<class Derived,
          class Dim,
- long N,
+ long N
+#ifndef BOOST_UNITS_DOXYGEN
+ ,
          class = typename detail::ordinal_has_already_been_defined<
              sizeof(boost_units_unit_is_registered(units::base_unit_ordinal<N>())) == sizeof(detail::yes) &&
              sizeof(boost_units_unit_is_registered(units::base_unit_pair<Derived, N>())) != sizeof(detail::yes)
- >::type>
+ >::type
+#endif
+>
 class base_unit :
     public mpl::long_<N>
 {

Modified: sandbox/units/boost/units/config.hpp
==============================================================================
--- sandbox/units/boost/units/config.hpp (original)
+++ sandbox/units/boost/units/config.hpp 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
@@ -15,8 +15,10 @@
 #include <boost/version.hpp>
 
 #if (BOOST_VERSION >= 103400)
+ ///INTERNAL ONLY
     #define BOOST_UNITS_HAS_BOOST_TYPEOF 1
 #else
+ ///INTERNAL ONLY
     #define BOOST_UNITS_HAS_BOOST_TYPEOF 0
 #endif
 
@@ -26,15 +28,21 @@
 
 #if (BOOST_UNITS_HAS_BOOST_TYPEOF)
     #include <boost/typeof/typeof.hpp>
+ ///INTERNAL ONLY
     #define BOOST_UNITS_HAS_TYPEOF 1
 #else
     #if (__GNUC__ && __cplusplus && __GNUC__ >= 3)
+ ///INTERNAL ONLY
         #define BOOST_UNITS_HAS_TYPEOF 1
+ ///INTERNAL ONLY
         #define BOOST_UNITS_HAS_GNU_TYPEOF 1
     #elif defined(__MWERKS__)
+ ///INTERNAL ONLY
         #define BOOST_UNITS_HAS_TYPEOF 1
+ ///INTERNAL ONLY
         #define BOOST_UNITS_HAS_MWERKS_TYPEOF 1
     #else
+ ///INTERNAL ONLY
         #define BOOST_UNITS_HAS_TYPEOF 0
     #endif
 #endif
@@ -72,9 +80,23 @@
 #endif
 
 #ifdef BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
+ ///INTERNAL ONLY
     #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) BOOST_STATIC_ASSERT((sizeof(a) == sizeof(b)))
 #else
+ ///INTERNAL ONLY
     #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) ((void)0)
 #endif
 
+#ifdef BOOST_UNITS_DOXYGEN
+
+/// If defined will trigger a static assertion if quantity<Unit, T>
+/// is not layout compatible with T
+#define BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
+
+/// If defined will diasable a preprocessor check that the
+/// compiler is able to handle the library.
+#define BOOST_UNITS_NO_COMPILER_CHECK
+
+#endif
+
 #endif

Modified: sandbox/units/boost/units/operators.hpp
==============================================================================
--- sandbox/units/boost/units/operators.hpp (original)
+++ sandbox/units/boost/units/operators.hpp 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
@@ -86,7 +86,7 @@
 template<typename X,typename Y> struct multiply_typeof_helper { typedef __typeof__((typeof_::make<X>()*typeof_::make<Y>())) type; };
 template<typename X,typename Y> struct divide_typeof_helper { typedef __typeof__((typeof_::make<X>()/typeof_::make<Y>())) type; };
 
-#elif (BOOST_UNITS_HAS_GNU_TYPEOF)
+#elif (BOOST_UNITS_HAS_GNU_TYPEOF) || defined(BOOST_UNITS_DOXYGEN)
 
 template<typename X> struct unary_plus_typeof_helper { typedef typeof((+typeof_::make<X>())) type; };
 template<typename X> struct unary_minus_typeof_helper { typedef typeof((-typeof_::make<X>())) type; };

Modified: sandbox/units/boost/units/quantity.hpp
==============================================================================
--- sandbox/units/boost/units/quantity.hpp (original)
+++ sandbox/units/boost/units/quantity.hpp 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
@@ -470,7 +470,7 @@
 /// quantity_cast provides mutating access to underlying quantity value_type
 template<class X,class Y>
 inline
-typename detail::quantity_cast_helper<X,Y>::type
+X
 quantity_cast(Y& source)
 {
     detail::quantity_cast_helper<X,Y> qch;
@@ -480,7 +480,7 @@
 
 template<class X,class Y>
 inline
-typename detail::quantity_cast_helper<X,const Y>::type
+X
 quantity_cast(const Y& source)
 {
     detail::quantity_cast_helper<X,const Y> qch;

Modified: sandbox/units/boost/units/scaled_base_unit.hpp
==============================================================================
--- sandbox/units/boost/units/scaled_base_unit.hpp (original)
+++ sandbox/units/boost/units/scaled_base_unit.hpp 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
@@ -66,6 +66,8 @@
     static std::string symbol_prefix() { return(std::string()); }
 };
 
+#ifndef BOOST_UNITS_DOXYGEN
+
 #define BOOST_UNITS_SCALE_SPECIALIZATION(base_,exponent_,val,name,symbol) \
 template<> \
 struct scale<base_, exponent_ > \
@@ -113,6 +115,8 @@
 #undef BOOST_UNITS_SCALE_DEF
 #undef BOOST_UNITS_SCALE_SPECIALIZATION
 
+#endif
+
 struct scaled_base_unit_tag {};
 
 template<class S, class Scale>

Modified: sandbox/units/boost/units/units_fwd.hpp
==============================================================================
--- sandbox/units/boost/units/units_fwd.hpp (original)
+++ sandbox/units/boost/units/units_fwd.hpp 2007-07-27 15:17:48 EDT (Fri, 27 Jul 2007)
@@ -11,6 +11,8 @@
 #ifndef BOOST_UNITS_UNITSFWD_HPP
 #define BOOST_UNITS_UNITSFWD_HPP
 
+/// \file Forward declarations of library components.
+
 namespace boost {
 
 namespace units {


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