author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
|
williamr@2 | 2 |
#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED |
williamr@2 | 3 |
#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED |
williamr@2 | 4 |
|
williamr@2 | 5 |
// Copyright Aleksey Gurtovoy 2000-2006 |
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/integral_c.hpp,v $ |
williamr@2 | 14 |
// $Date: 2006/11/08 21:44:27 $ |
williamr@2 | 15 |
// $Revision: 1.22.6.1 $ |
williamr@2 | 16 |
|
williamr@2 | 17 |
#include <boost/mpl/integral_c_fwd.hpp> |
williamr@2 | 18 |
#include <boost/mpl/aux_/config/ctps.hpp> |
williamr@2 | 19 |
#include <boost/mpl/aux_/config/static_constant.hpp> |
williamr@2 | 20 |
#include <boost/mpl/aux_/config/workaround.hpp> |
williamr@2 | 21 |
|
williamr@2 | 22 |
#if BOOST_WORKAROUND(__HP_aCC, <= 53800) |
williamr@2 | 23 |
// the type of non-type template arguments may not depend on template arguments |
williamr@2 | 24 |
# define AUX_WRAPPER_PARAMS(N) typename T, long N |
williamr@2 | 25 |
#else |
williamr@2 | 26 |
# define AUX_WRAPPER_PARAMS(N) typename T, T N |
williamr@2 | 27 |
#endif |
williamr@2 | 28 |
|
williamr@2 | 29 |
#define AUX_WRAPPER_NAME integral_c |
williamr@2 | 30 |
#define AUX_WRAPPER_VALUE_TYPE T |
williamr@2 | 31 |
#define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value > |
williamr@2 | 32 |
#include <boost/mpl/aux_/integral_wrapper.hpp> |
williamr@2 | 33 |
|
williamr@2 | 34 |
|
williamr@2 | 35 |
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ |
williamr@2 | 36 |
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x551) |
williamr@2 | 37 |
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN |
williamr@2 | 38 |
// 'bool' constant doesn't have 'next'/'prior' members |
williamr@2 | 39 |
template< bool C > |
williamr@2 | 40 |
struct integral_c<bool, C> |
williamr@2 | 41 |
{ |
williamr@2 | 42 |
BOOST_STATIC_CONSTANT(bool, value = C); |
williamr@2 | 43 |
typedef integral_c_tag tag; |
williamr@2 | 44 |
typedef integral_c type; |
williamr@2 | 45 |
typedef bool value_type; |
williamr@2 | 46 |
operator bool() const { return this->value; } |
williamr@2 | 47 |
}; |
williamr@2 | 48 |
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE |
williamr@2 | 49 |
#endif |
williamr@2 | 50 |
|
williamr@2 | 51 |
#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED |