| 1 | // Boost.Units - A C++ library for zero-overhead dimensional analysis and |
| 2 | // unit/quantity manipulation and conversion |
| 3 | // |
| 4 | // Copyright (C) 2003-2008 Matthias Christian Schabel |
| 5 | // Copyright (C) 2008 Steven Watanabe |
| 6 | // |
| 7 | // Distributed under the Boost Software License, Version 1.0. (See |
| 8 | // accompanying file LICENSE_1_0.txt or copy at |
| 9 | // http://www.boost.org/LICENSE_1_0.txt) |
| 10 | |
| 11 | #ifndef BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP |
| 12 | #define BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP |
| 13 | |
| 14 | namespace boost { |
| 15 | |
| 16 | namespace units { |
| 17 | |
| 18 | template<class T, class Next> |
| 19 | struct list; |
| 20 | |
| 21 | namespace detail { |
| 22 | |
| 23 | template<bool> |
| 24 | struct push_front_if; |
| 25 | |
| 26 | template<> |
| 27 | struct push_front_if<true> { |
| 28 | template<class L, class T> |
| 29 | struct apply { |
| 30 | typedef list<T, L> type; |
| 31 | }; |
| 32 | }; |
| 33 | |
| 34 | template<> |
| 35 | struct push_front_if<false> { |
| 36 | template<class L, class T> |
| 37 | struct apply { |
| 38 | typedef L type; |
| 39 | }; |
| 40 | }; |
| 41 | |
| 42 | } |
| 43 | |
| 44 | } |
| 45 | |
| 46 | } |
| 47 | |
| 48 | #endif |
| 49 | |