$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] safe bool operator
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-03-01 15:41:19
Domagoj Saric wrote:
> It enables a one liner implementation for a safe_bool operator:
>
> class my_class
> {
> public:
> bool some_is_valid_function() const;
> operator boost::unspecified_bool_type() const { return
> boost::make_safe_bool( some_is_valid_function() ); }
Using a single type allows unrelated classes to compare equal with
operator==.