Boost logo

Boost :

Subject: Re: [boost] review request: addition to type_traits library of is_less_comparable<T, U> and others
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2009-10-08 13:14:04


Andrey Semashev wrote:
> Frédéric Bron wrote:
>> I would like to propose to your review the following addition to the
>> type_traits library (at
>> https://svn.boost.org/trac/boost/browser/sandbox/type_traits
>> and http://dl.free.fr/tK0BwIzYy).
>
> Is it reasonable to additionally verify the returned type? IMO, such
> kind of traits should not make assumptions about the operators meaning,
> they should merely show whether the comparison expression is valid. Thus
> there also should not be a fails-to-compile case.
>

+1; perhaps there should be a 3rd template parameter, defaulted to bool
to preserve the current semantics, which the user may specify as void to
ignore the return type...?

- Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk