// 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_DETAIL_PUSH_FRONT_OR_ADD_HPP #define BOOST_UNITS_DETAIL_PUSH_FRONT_OR_ADD_HPP #include #include #include #include #include #include #include namespace boost { namespace units { template struct list; namespace detail { template struct is_empty_dim; /// add an instantiation of dim to Sequence. template struct push_front_or_add_impl; template<> struct push_front_or_add_impl { template struct apply { typedef typename mpl::plus::type item; typedef typename push_front_if::value>::template apply< typename Sequence::next, item > type; }; }; template<> struct push_front_or_add_impl { template struct apply { typedef list type; }; }; template struct push_front_or_add { typedef typename push_front_or_add_impl::value>::template apply< Sequence, T >::type type; }; template struct push_front_or_add { typedef list type; }; } // namespace detail } // namespace units } // namespace boost #endif