os/ossrv/ossrv_pub/boost_apis/boost/mpl/integral_c.hpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
sl@0
     2
#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
sl@0
     3
#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
sl@0
     4
sl@0
     5
// Copyright Aleksey Gurtovoy 2000-2006
sl@0
     6
//
sl@0
     7
// Distributed under the Boost Software License, Version 1.0. 
sl@0
     8
// (See accompanying file LICENSE_1_0.txt or copy at 
sl@0
     9
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
    10
//
sl@0
    11
// See http://www.boost.org/libs/mpl for documentation.
sl@0
    12
sl@0
    13
// $Source: /cvsroot/boost/boost/boost/mpl/integral_c.hpp,v $
sl@0
    14
// $Date: 2006/11/08 21:44:27 $
sl@0
    15
// $Revision: 1.22.6.1 $
sl@0
    16
sl@0
    17
#include <boost/mpl/integral_c_fwd.hpp>
sl@0
    18
#include <boost/mpl/aux_/config/ctps.hpp>
sl@0
    19
#include <boost/mpl/aux_/config/static_constant.hpp>
sl@0
    20
#include <boost/mpl/aux_/config/workaround.hpp>
sl@0
    21
sl@0
    22
#if BOOST_WORKAROUND(__HP_aCC, <= 53800)
sl@0
    23
// the type of non-type template arguments may not depend on template arguments
sl@0
    24
#   define AUX_WRAPPER_PARAMS(N) typename T, long N
sl@0
    25
#else
sl@0
    26
#   define AUX_WRAPPER_PARAMS(N) typename T, T N
sl@0
    27
#endif
sl@0
    28
sl@0
    29
#define AUX_WRAPPER_NAME integral_c
sl@0
    30
#define AUX_WRAPPER_VALUE_TYPE T
sl@0
    31
#define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value >
sl@0
    32
#include <boost/mpl/aux_/integral_wrapper.hpp>
sl@0
    33
sl@0
    34
sl@0
    35
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
sl@0
    36
 && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
sl@0
    37
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
sl@0
    38
// 'bool' constant doesn't have 'next'/'prior' members
sl@0
    39
template< bool C >
sl@0
    40
struct integral_c<bool, C>
sl@0
    41
{
sl@0
    42
    BOOST_STATIC_CONSTANT(bool, value = C);
sl@0
    43
    typedef integral_c_tag tag;
sl@0
    44
    typedef integral_c type;
sl@0
    45
    typedef bool value_type;
sl@0
    46
    operator bool() const { return this->value; }
sl@0
    47
};
sl@0
    48
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
sl@0
    49
#endif
sl@0
    50
sl@0
    51
#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED