New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
integral_constant.hpp in vendors/XIOS/current/extern/boost/include/boost/type_traits – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/type_traits/integral_constant.hpp @ 3408

Last change on this file since 3408 was 3408, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1//  (C) Copyright John Maddock 2005.
2//  Use, modification and distribution are subject to the
3//  Boost Software License, Version 1.0. (See accompanying file
4//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP
7#define BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP
8
9#include <boost/config.hpp>
10#include <boost/mpl/bool.hpp>
11#include <boost/mpl/integral_c.hpp>
12
13namespace boost{
14
15#if defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) || defined(__BORLANDC__)
16template <class T, int val>
17#else
18template <class T, T val>
19#endif
20struct integral_constant : public mpl::integral_c<T, val>
21{
22   typedef integral_constant<T,val> type;
23};
24
25template<> struct integral_constant<bool,true> : public mpl::true_
26{
27#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
28# pragma warning(push)
29# pragma warning(disable:4097)
30   typedef mpl::true_ base_;
31   using base_::value;
32# pragma warning(pop)
33#endif
34   typedef integral_constant<bool,true> type;
35};
36template<> struct integral_constant<bool,false> : public mpl::false_
37{
38#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
39# pragma warning(push)
40# pragma warning(disable:4097)
41   typedef mpl::false_ base_;
42   using base_::value;
43# pragma warning(pop)
44#endif
45   typedef integral_constant<bool,false> type;
46};
47
48typedef integral_constant<bool,true> true_type;
49typedef integral_constant<bool,false> false_type;
50
51}
52
53#endif
Note: See TracBrowser for help on using the repository browser.