push_front_if.hpp 882 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #ifndef BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP
  11. #define BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP
  12. namespace boost {
  13. namespace units {
  14. template<class T, class Next>
  15. struct list;
  16. namespace detail {
  17. template<bool>
  18. struct push_front_if;
  19. template<>
  20. struct push_front_if<true> {
  21. template<class L, class T>
  22. struct apply {
  23. typedef list<T, L> type;
  24. };
  25. };
  26. template<>
  27. struct push_front_if<false> {
  28. template<class L, class T>
  29. struct apply {
  30. typedef L type;
  31. };
  32. };
  33. }
  34. }
  35. }
  36. #endif