Files
boost_mpl/include/boost/mpl/bool.hpp
T

40 lines
952 B
C++
Raw Normal View History

2003-02-25 23:11:41 +00:00
#ifndef BOOST_MPL_BOOL_HPP_INCLUDED
#define BOOST_MPL_BOOL_HPP_INCLUDED
2004-09-02 15:41:37 +00:00
// Copyright Aleksey Gurtovoy 2000-2004
2003-02-25 23:11:41 +00:00
//
2004-09-02 15:41:37 +00:00
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
2003-02-25 23:11:41 +00:00
//
// See http://www.boost.org/libs/mpl for documentation.
2004-09-02 15:41:37 +00:00
// $Source$
// $Date$
// $Revision$
2003-02-25 23:11:41 +00:00
2004-09-02 15:41:37 +00:00
#include <boost/mpl/bool_fwd.hpp>
2004-09-26 09:54:25 +00:00
#include <boost/mpl/integral_c_tag.hpp>
2004-09-02 15:41:37 +00:00
#include <boost/mpl/aux_/config/static_constant.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
2003-02-25 23:11:41 +00:00
template< bool C_ > struct bool_
{
BOOST_STATIC_CONSTANT(bool, value = C_);
2004-09-26 09:54:25 +00:00
typedef integral_c_tag tag;
2003-02-25 23:11:41 +00:00
typedef bool_ type;
typedef bool value_type;
operator bool() const { return this->value; }
};
2003-04-12 18:25:44 +00:00
#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
template< bool C_ >
bool const bool_<C_>::value;
#endif
2004-09-02 15:41:37 +00:00
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
2003-02-25 23:11:41 +00:00
#endif // BOOST_MPL_BOOL_HPP_INCLUDED