Boost logo

Boost :

Subject: Re: [boost] [type_erasure] default implementation of concept signatures
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-05-28 17:20:54


AMDG

On 05/28/2011 02:00 PM, Matt Calabrese wrote:
> On Sat, May 28, 2011 at 4:16 PM, Steven Watanabe <watanabesj_at_[hidden]>wrote:
> Sorry, this is sort of on a tangent, but this is, imo, one of the problems
> with what would have been 0x concepts. According to N2914,
> LessThanComparable is an auto concept, meaning that as long as a type has an
> operation that matches the pseudo-signature bool operator< ( T const&, T
> const& ), then that type is LessThanComparable, even though the compiler
> can't really "check" the axioms. So in hypothetical 0x concept-land,
> checking if double models LessThanComparable would yield true.
>

That's usually what we want, because double
is close enough to being LessThanComparable
as long as you avoid NaNs.

> Most auto concepts that have axioms are scary.
>

In Christ,
Steven Watanabe




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