os/ossrv/ossrv_pub/boost_apis/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
sl@0
     2
// Copyright Aleksey Gurtovoy 2000-2004
sl@0
     3
//
sl@0
     4
// Distributed under the Boost Software License, Version 1.0. 
sl@0
     5
// (See accompanying file LICENSE_1_0.txt or copy at 
sl@0
     6
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
     7
//
sl@0
     8
sl@0
     9
// Preprocessed version of "boost/mpl/equal_to.hpp" header
sl@0
    10
// -- DO NOT modify by hand!
sl@0
    11
sl@0
    12
namespace boost { namespace mpl {
sl@0
    13
sl@0
    14
template<
sl@0
    15
      typename Tag1
sl@0
    16
    , typename Tag2
sl@0
    17
    >
sl@0
    18
struct equal_to_impl
sl@0
    19
    : if_c<
sl@0
    20
          ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
sl@0
    21
              > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
sl@0
    22
            )
sl@0
    23
sl@0
    24
        , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
sl@0
    25
        , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
sl@0
    26
        >::type
sl@0
    27
{
sl@0
    28
};
sl@0
    29
sl@0
    30
/// for Digital Mars C++/compilers with no CTPS/TTP support
sl@0
    31
template<> struct equal_to_impl< na,na >
sl@0
    32
{
sl@0
    33
    template< typename U1, typename U2 > struct apply
sl@0
    34
    {
sl@0
    35
        typedef apply type;
sl@0
    36
        BOOST_STATIC_CONSTANT(int, value  = 0);
sl@0
    37
    };
sl@0
    38
};
sl@0
    39
sl@0
    40
template< typename Tag > struct equal_to_impl< na,Tag >
sl@0
    41
{
sl@0
    42
    template< typename U1, typename U2 > struct apply
sl@0
    43
    {
sl@0
    44
        typedef apply type;
sl@0
    45
        BOOST_STATIC_CONSTANT(int, value  = 0);
sl@0
    46
    };
sl@0
    47
};
sl@0
    48
sl@0
    49
template< typename Tag > struct equal_to_impl< Tag,na >
sl@0
    50
{
sl@0
    51
    template< typename U1, typename U2 > struct apply
sl@0
    52
    {
sl@0
    53
        typedef apply type;
sl@0
    54
        BOOST_STATIC_CONSTANT(int, value  = 0);
sl@0
    55
    };
sl@0
    56
};
sl@0
    57
sl@0
    58
template< typename T > struct equal_to_tag
sl@0
    59
{
sl@0
    60
    typedef typename T::tag type;
sl@0
    61
};
sl@0
    62
sl@0
    63
template<
sl@0
    64
      typename BOOST_MPL_AUX_NA_PARAM(N1)
sl@0
    65
    , typename BOOST_MPL_AUX_NA_PARAM(N2)
sl@0
    66
    >
sl@0
    67
struct equal_to
sl@0
    68
sl@0
    69
    : equal_to_impl<
sl@0
    70
          typename equal_to_tag<N1>::type
sl@0
    71
        , typename equal_to_tag<N2>::type
sl@0
    72
        >::template apply< N1,N2 >::type
sl@0
    73
{
sl@0
    74
    BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2))
sl@0
    75
sl@0
    76
};
sl@0
    77
sl@0
    78
BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to)
sl@0
    79
sl@0
    80
}}
sl@0
    81
sl@0
    82
namespace boost { namespace mpl {
sl@0
    83
sl@0
    84
template<>
sl@0
    85
struct equal_to_impl< integral_c_tag,integral_c_tag >
sl@0
    86
{
sl@0
    87
    template< typename N1, typename N2 > struct apply
sl@0
    88
sl@0
    89
    {
sl@0
    90
        BOOST_STATIC_CONSTANT(bool, value =
sl@0
    91
             ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ==
sl@0
    92
             BOOST_MPL_AUX_VALUE_WKND(N2)::value )
sl@0
    93
            );
sl@0
    94
        typedef bool_<value> type;
sl@0
    95
    };
sl@0
    96
};
sl@0
    97
sl@0
    98
}}