Quick Links:

bal | bbl | bdl | bsl

Classes | Public Member Functions

bsltf::EvilBooleanType Struct Reference

#include <bsltf_evilbooleantype.h>

List of all members.

Classes

struct  ImpDetail

Public Member Functions

 EvilBooleanType (bool value)
 operator BoolResult () const
EvilBooleanType operator! () const

Detailed Description

This class provides a test type for predicates returning a type that is convertible-to-bool. It makes life reasonably difficult by disabling the address-of and comma operators, but deliberately does not overload the && and || operators, as we hope the standard will be updated to no longer require such support. Once C++11 becomes available, this class would use an explicit operator bool() conversion operator, and explicitly supply the == and != operators, but we use the convertible-to-pointer-to-member idiom in the meantime. Implicitly defined operations fill out the API as needed.

See Component bsltf_evilbooleantype


Constructor & Destructor Documentation

bsltf::EvilBooleanType::EvilBooleanType ( bool  value  ) 

IMPLICIT: Create a EvilBooleanType object having the attribute value defined by the specified value.


Member Function Documentation

bsltf::EvilBooleanType::operator BoolResult (  )  const

Return the value of this object.

EvilBooleanType bsltf::EvilBooleanType::operator! (  )  const

Return the newly created object having the logically negated value of this object.


The documentation for this struct was generated from the following file: