bool.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Ifdefs
10 *****************************************************************************/
11 
12 #ifndef ECL_MPL_BOOL_HPP_
13 #define ECL_MPL_BOOL_HPP_
14 
15 /*****************************************************************************
16 ** Namespaces
17 *****************************************************************************/
18 
19 namespace ecl {
20 
21 /*****************************************************************************
22 ** Using
23 *****************************************************************************/
24 
31 template < bool x >
32 class Bool {
33 public:
34  static bool const value = x;
35  typedef Bool<x> type;
36  typedef bool value_type;
37  operator bool() const { return x; }
38  virtual ~Bool(){};
39 };
40 
41 typedef Bool<false> False;
42 typedef Bool<true> True;
44 } // namespace ecl
45 
46 #endif /* ECL_MPL_BOOL_HPP_ */
ecl::Bool::value_type
bool value_type
The type this wrapper's value.
Definition: bool.hpp:46
ecl::Bool::value
static const bool value
The value for this integral constant wrapper.
Definition: bool.hpp:44
ecl::Bool::~Bool
virtual ~Bool()
Definition: bool.hpp:48
ecl::True
Bool< true > True
Convenient typedef for the 'true' integral constant wrapper.
Definition: bool.hpp:46
ecl::Bool::type
Bool< x > type
This wrapper's nullary metafunction (simply returns itself).
Definition: bool.hpp:45
ecl::False
Bool< false > False
Convenient typedef for the 'false' integral constant wrapper.
Definition: bool.hpp:45
ecl
Embedded control libraries.


ecl_mpl
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:18