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