Bool.hpp

A bool representation that doesn’t trip up std::vector.

Note

Status: ALPHA

class Bool
#include <Bool.hpp>

A simple replacement for bool type that doesn’t trip up std::vector.

Public Functions

inline Bool(bool b = false)
inline Bool &operator=(bool b)
inline operator bool() const

Conversion of this proxy to Boolean (as an rvalue)

inline bool &Value()
inline bool Value() const
inline Bool &operator&=(bool b)

Compound assignement operators using Bool as lvalue.

inline Bool &operator|=(bool b)
inline Bool &operator^=(bool b)
inline Bool &operator+=(bool b)
inline Bool &operator-=(bool b)
inline Bool &operator*=(bool b)
inline Bool &operator/=(bool b)

Private Members

bool value
namespace std

STL namespace.

Functions

inline std::istream &operator>>(std::istream &in, Bool &b)

Setup operator<< to work with ostream (must be in std to work)

inline std::ostream &operator<<(std::ostream &out, const Bool &b)

Setup operator<< to work with ostream (must be in std to work)