blocxx
Namespaces | Defines

SafeBool.hpp File Reference

#include "blocxx/BLOCXX_config.h"

Go to the source code of this file.

Namespaces

namespace  BLOCXX_NAMESPACE
 

Taken from RFC 1321.


Defines

#define BLOCXX_SAFE_BOOL_IMPL(classname, type, variable, test)

Define Documentation

#define BLOCXX_SAFE_BOOL_IMPL (   classname,
  type,
  variable,
  test 
)
Value:
typedef type classname::*safe_bool; \
   operator safe_bool () const \
   { \
      return (test) ? &variable : 0; \
   } \
   bool operator !() const \
   { \
      return !(test); \
   }

Definition at line 58 of file SafeBool.hpp.