// $Id$ // // Copyright (C) 2006 // Definition of inline template functions //#include "SafeBool.ih" // Custom includes #define prefix_ inline ///////////////////////////////cti.p/////////////////////////////////////// template prefix_ senf::SafeBool::operator bool_type() const { return (static_cast(this))->boolean_test() ? &SafeBoolBase::this_type_does_not_support_comparisons : 0; } template prefix_ bool senf::SafeBool::operator!() const { return ! (static_cast(this))->boolean_test(); } template prefix_ senf::SafeBool::~SafeBool() {} template prefix_ void senf::operator==(const SafeBool& lhs, const SafeBool& rhs) { lhs.this_type_does_not_support_comparisons(); } template prefix_ void senf::operator!=(const SafeBool& lhs, const SafeBool& rhs) { lhs.this_type_does_not_support_comparisons(); } ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_ // Local Variables: // mode: c++ // End: