Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Type Traits Extension by Frederic Bron
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2011-03-15 09:16:28


On 3/15/2011 1:38 AM, Frédéric Bron wrote:
[...]
>> There is a declval function on Boost.Utility that creates a rvalue reference
>> that could be used instead of the make() function. Please could you check if
>> this function is adapted to your needs?
>
> Unfortunately I need a l-value, espacially for += type of operators.

declval should give you an lvalue if you give it a (lvalue-) reference
type, e.g., declval< T& >() where T is a non-reference type...

[...]
>> Last I agree that the use of equal should be replaced by assign when
>> assignment is intended
>> += has_operator_plus_equal -> has_operator_plus_assign
>> -= has_operator_minus_equal -> has_operator_minus_assign
>
> Why? is it to avoid confusion with "equal to"?
> I like plus_equal because plus is a sign and equal is also a sign. So
> I think it is easier to remember.

I prefer op_equal as well, but it's not a strong preference.

- Jeff


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