Boost logo

Boost :

Subject: Re: [boost] review request: addition to type_traits library of is_less_comparable<T, U> and others
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2009-12-08 06:28:32

>>> > If you really want to support the "don't care"
>>> > case for a return type, use has_operator_less<T, dont_care> where
>>> > "dont_care" is a special placeholder type that you define
>>> > (could use a better name though?).
>> I like the idea and the name, though perhaps "any" would work, too.
> Doesn't that potentially get confused with boost::any ?

It would be has_operator<T, U, boost::type_traits::any>
Then boost::type_traits::any_return would be more appropriate.

I prefer void because it is shorter but this could make people think
it will check for operator return void... which is not the case; so
maybe the long version boost::type_traits::any_return is better.

Boost list run by bdawes at, gregod at, cpdaniel at, john at