Chris@16: // Boost.Units - A C++ library for zero-overhead dimensional analysis and Chris@16: // unit/quantity manipulation and conversion Chris@16: // Chris@16: // Copyright (C) 2003-2008 Matthias Christian Schabel Chris@16: // Copyright (C) 2008 Steven Watanabe Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #ifndef BOOST_UNITS_MAKE_SYSTEM_HPP Chris@16: #define BOOST_UNITS_MAKE_SYSTEM_HPP Chris@16: Chris@16: /// \file Chris@16: /// \brief Metafunction returning a homogeneous system that can Chris@16: /// represent any combination of the base units. Chris@16: /// \details Chris@16: /// Metafunction make_system returning a homogeneous system that can Chris@16: /// represent any combination of the base units. There must Chris@16: /// be no way to represent any of the base units in terms Chris@16: /// of the others. make_system::type Chris@16: /// is not allowed, for example. Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: Chris@16: namespace units { Chris@16: Chris@16: #ifdef BOOST_UNITS_DOXYGEN Chris@16: Chris@16: namespace detail { Chris@16: Chris@16: struct unspecified {}; Chris@16: Chris@16: } Chris@16: Chris@16: /// Metafunction returning a homogeneous system that can Chris@16: /// represent any combination of the base units. There must Chris@16: /// be no way to represent any of the base units in terms Chris@16: /// of the others. make_system::type Chris@16: /// is not allowed, for example. Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system type; Chris@16: }; Chris@16: Chris@16: #else Chris@16: Chris@16: struct na {}; Chris@16: Chris@16: template< Chris@16: class U0 = na, Chris@16: class U1 = na, Chris@16: class U2 = na, Chris@16: class U3 = na, Chris@16: class U4 = na, Chris@16: class U5 = na, Chris@16: class U6 = na, Chris@16: class U7 = na, Chris@16: class U8 = na, Chris@16: class U9 = na Chris@16: > Chris@16: struct make_system; Chris@16: Chris@16: template<> Chris@16: struct make_system<> Chris@16: { Chris@16: typedef homogeneous_system type; Chris@16: }; Chris@16: Chris@16: // Codewarrior 9.2 doesn't like using the defaults. Need Chris@16: // to specify na explicitly. Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > > > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > > > > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > > > > > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > > > > > > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > > > > > > > >::type> type; Chris@16: }; Chris@16: Chris@16: template Chris@16: struct make_system Chris@16: { Chris@16: typedef homogeneous_system > > > > > > > > > >::type> type; Chris@16: }; Chris@16: Chris@16: #endif Chris@16: Chris@16: } // namespace units Chris@16: Chris@16: } // namespace boost Chris@16: Chris@16: #endif