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_ */
Embedded control libraries.
bool value_type
The type this wrapper&#39;s value.
Definition: bool.hpp:36
virtual ~Bool()
Definition: bool.hpp:38
Bool< true > True
Convenient typedef for the &#39;true&#39; integral constant wrapper.
Definition: bool.hpp:42
static bool const value
The value for this integral constant wrapper.
Definition: bool.hpp:34
Integral constant wrapper for boolean values.
Definition: bool.hpp:32
Bool< false > False
Convenient typedef for the &#39;false&#39; integral constant wrapper.
Definition: bool.hpp:41
Bool< x > type
This wrapper&#39;s nullary metafunction (simply returns itself).
Definition: bool.hpp:35


ecl_mpl
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:14