epoc32/include/stdapis/boost/mpl/same_as.hpp
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
williamr@2
     2
#ifndef BOOST_MPL_SAME_AS_HPP_INCLUDED
williamr@2
     3
#define BOOST_MPL_SAME_AS_HPP_INCLUDED
williamr@2
     4
williamr@2
     5
// Copyright Aleksey Gurtovoy 2000-2004
williamr@2
     6
//
williamr@2
     7
// Distributed under the Boost Software License, Version 1.0. 
williamr@2
     8
// (See accompanying file LICENSE_1_0.txt or copy at 
williamr@2
     9
// http://www.boost.org/LICENSE_1_0.txt)
williamr@2
    10
//
williamr@2
    11
// See http://www.boost.org/libs/mpl for documentation.
williamr@2
    12
williamr@2
    13
// $Source: /cvsroot/boost/boost/boost/mpl/same_as.hpp,v $
williamr@2
    14
// $Date: 2004/09/02 15:40:42 $
williamr@2
    15
// $Revision: 1.6 $
williamr@2
    16
williamr@2
    17
#include <boost/mpl/not.hpp>
williamr@2
    18
#include <boost/mpl/aux_/lambda_spec.hpp>
williamr@2
    19
#include <boost/mpl/aux_/config/forwarding.hpp>
williamr@2
    20
williamr@2
    21
#include <boost/type_traits/is_same.hpp>
williamr@2
    22
williamr@2
    23
namespace boost { namespace mpl {
williamr@2
    24
williamr@2
    25
template< typename T1 >
williamr@2
    26
struct same_as
williamr@2
    27
{
williamr@2
    28
    template< typename T2 > struct apply
williamr@2
    29
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
williamr@2
    30
        : is_same<T1,T2>
williamr@2
    31
    {
williamr@2
    32
#else
williamr@2
    33
    {
williamr@2
    34
        typedef typename is_same<T1,T2>::type type;
williamr@2
    35
#endif
williamr@2
    36
    };
williamr@2
    37
};
williamr@2
    38
williamr@2
    39
template< typename T1 >
williamr@2
    40
struct not_same_as
williamr@2
    41
{
williamr@2
    42
    template< typename T2 > struct apply
williamr@2
    43
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
williamr@2
    44
        : not_< is_same<T1,T2> >
williamr@2
    45
    {
williamr@2
    46
#else
williamr@2
    47
    {
williamr@2
    48
        typedef typename not_< is_same<T1,T2> >::type type;
williamr@2
    49
#endif
williamr@2
    50
    };
williamr@2
    51
};
williamr@2
    52
williamr@2
    53
}}
williamr@2
    54
williamr@2
    55
#endif // BOOST_MPL_SAME_AS_HPP_INCLUDED