less_equal.hpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // Copyright Aleksey Gurtovoy 2000-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // *Preprocessed* version of the main "less_equal.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl {
  10. template<
  11. typename Tag1
  12. , typename Tag2
  13. >
  14. struct less_equal_impl
  15. : if_c<
  16. ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
  17. > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
  18. )
  19. , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
  20. , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
  21. >::type
  22. {
  23. };
  24. /// for Digital Mars C++/compilers with no CTPS/TTP support
  25. template<> struct less_equal_impl< na,na >
  26. {
  27. template< typename U1, typename U2 > struct apply
  28. {
  29. typedef apply type;
  30. BOOST_STATIC_CONSTANT(int, value = 0);
  31. };
  32. };
  33. template< typename Tag > struct less_equal_impl< na,Tag >
  34. {
  35. template< typename U1, typename U2 > struct apply
  36. {
  37. typedef apply type;
  38. BOOST_STATIC_CONSTANT(int, value = 0);
  39. };
  40. };
  41. template< typename Tag > struct less_equal_impl< Tag,na >
  42. {
  43. template< typename U1, typename U2 > struct apply
  44. {
  45. typedef apply type;
  46. BOOST_STATIC_CONSTANT(int, value = 0);
  47. };
  48. };
  49. template< typename T > struct less_equal_tag
  50. {
  51. typedef typename T::tag type;
  52. };
  53. template<
  54. typename BOOST_MPL_AUX_NA_PARAM(N1)
  55. , typename BOOST_MPL_AUX_NA_PARAM(N2)
  56. >
  57. struct less_equal
  58. : less_equal_impl<
  59. typename less_equal_tag<N1>::type
  60. , typename less_equal_tag<N2>::type
  61. >::template apply< N1,N2 >::type
  62. {
  63. BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
  64. };
  65. BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
  66. }}
  67. namespace boost { namespace mpl {
  68. template<>
  69. struct less_equal_impl< integral_c_tag,integral_c_tag >
  70. {
  71. template< typename N1, typename N2 > struct apply
  72. : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
  73. {
  74. };
  75. };
  76. }}