Boost logo

Boost :

Subject: Re: [boost] [contract] concepts: pseudo-signatures vs. usage patterns
From: Dave Abrahams (dave_at_[hidden])
Date: 2012-10-12 10:18:16


on Fri Oct 12 2012, Andrew Sutton <asutton.list-AT-gmail.com> wrote:

>>> If I remember correctly, we assumed that a conversion requirement on
>>> the result of an operation, would actually convert (if necessary).
>>
>> What does "if necessary" mean? I can think of at least two different
>> ways to decide whether a conversion is necessary.
>
> If the expression returns bool, no conversion is necessary. If it does
> not, then a conversion is needed.

Sorry, that's still too vague to tell me what you mean. Surely this has
nothing to do with "bool-ness," so I have to assume bool shows up in an
example you have in mind. Could you show a concrete example with
specific requirements?

>>> You couldn't, for example, return tribool from == and expect the
>>> compiler to pick up overloads for &&, ||, and !.
>>
>> I don't understand quite how this can be an example of the previous
>> statement (or what you're driving at overall).
>
> Perhaps I misunderstood what you're aiming at.

Perhaps, but I think it's more likely that you simply have something
specific in mind that you haven't spelled out, and I am unable to fill
in the details without help.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost

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