10 //#include "SafeBool.mpp"
11 ///////////////////////////////hh.p////////////////////////////////////////
16 // This is a direct copy of a safe bool solution by Bjorn Karlsson
17 // from http://www.artima.com/cppsource/safebool.html
20 // class TestableWithVirtual
21 // : public safe_bool<>
24 // bool boolean_test() const
26 // // Perform Boolean logic here
30 // class TestableWithoutVirtual
31 // : public safe_bool <TestableWithoutVirtual>
34 // bool boolean_test() const
36 // // Perform Boolean logic here
43 typedef void (SafeBoolBase::*bool_type)() const;
44 void this_type_does_not_support_comparisons() const;
47 SafeBoolBase(const SafeBoolBase&);
48 SafeBoolBase& operator=(const SafeBoolBase&);
52 template <typename T=void>
57 operator bool_type() const;
58 bool operator !() const;
64 template <typename T, typename U>
65 void operator==(const SafeBool<T>& lhs,const SafeBool<U>& rhs);
67 template <typename T,typename U>
68 void operator!=(const SafeBool<T>& lhs,const SafeBool<U>& rhs);
72 ///////////////////////////////hh.e////////////////////////////////////////
73 #include "SafeBool.cci"
74 //#include "SafeBool.ct"
75 #include "SafeBool.cti"
76 //#include "SafeBool.mpp"