Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26569/boost/units
Modified Files:
base_dimension.hpp
Log Message:
move implementation to separate header
Index: base_dimension.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/base_dimension.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- base_dimension.hpp 15 Apr 2007 06:51:00 -0000 1.7
+++ base_dimension.hpp 15 Apr 2007 06:58:05 -0000 1.8
@@ -11,50 +11,18 @@
#ifndef BOOST_UNITS_BASE_DIMENSION_HPP
#define BOOST_UNITS_BASE_DIMENSION_HPP
-#include <boost/mpl/long.hpp>
-
#include <boost/units/config.hpp>
-#include <boost/units/static_rational.hpp>
#include <boost/units/dim.hpp>
#include <boost/units/dimension_list.hpp>
+#include <boost/units/static_rational.hpp>
#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/base_dimension_impl.hpp>
+
namespace boost {
namespace units {
-namespace detail {
-
-typedef char no;
-struct yes { no dummy[2]; };
-
-template<bool> struct ordinal_has_already_been_defined;
-
-template<>
-struct ordinal_has_already_been_defined<true> { };
-
-template<>
-struct ordinal_has_already_been_defined<false> { typedef void type; };
-
-}
-
-/// This must be in namespace boost::units so that ADL
-/// will work with friend functions defined inline.
-/// INTERNAL ONLY
-template<long N> struct long_ { };
-
-/// Again this needs to be in the same namespace as long_
-/// we need a mangled name because it must be found by ADL
-/// INTERNAL ONLY
-template<class T>
-detail::no
-boost_units_prevent_redefinition(const T&)
-{ return(detail::no()); }
-
-/// Ditto.
-/// INTERNAL ONLY
-template<class T, long N> struct base_dimension_pair { };
-
/// Defines a base dimension. To define a dimension you need to provide
/// the derived class (CRTP) and a unique integer.
/// struct my_dimension : boost::units::base_dimension<my_dimension, 1> {};
@@ -70,9 +38,9 @@
public mpl::long_<N>
{
public:
- typedef base_dimension this_type;
- typedef mpl::long_<N> value;
- typedef dimension_list<dim<Derived,static_rational<1> >, dimensionless_type> type;
+ typedef base_dimension this_type;
+ typedef mpl::long_<N> value;
+ typedef dimension_list<dim<Derived,static_rational<1> >, dimensionless_type> type;
private:
/// Register this ordinal
|