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

42 lines
1.2 KiB
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
// + file: boost/mpl/bool.hpp
2003-04-12 18:25:44 +00:00
// + last modified: 12/apr/03
2003-02-25 23:11:41 +00:00
// Copyright (c) 2000-03
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
//
// See http://www.boost.org/libs/mpl for documentation.
2003-03-09 02:30:59 +00:00
#include "boost/mpl/bool_fwd.hpp"
2003-02-25 23:11:41 +00:00
#include "boost/mpl/aux_/config/static_constant.hpp"
namespace boost { namespace mpl {
template< bool C_ > struct bool_
{
BOOST_STATIC_CONSTANT(bool, value = C_);
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
2003-02-25 23:11:41 +00:00
}} // namespace boost::mpl
#endif // BOOST_MPL_BOOL_HPP_INCLUDED