Boost logo

Boost :

Subject: Re: [boost] [operators] The future of Boost.Operators
From: Daniel Frey (d.frey_at_[hidden])
Date: 2013-04-25 17:29:30


On 25.04.2013, at 23:04, Marc Glisse <marc.glisse_at_[hidden]> wrote:

> On Thu, 25 Apr 2013, Daniel Frey wrote:
>
>> 2) Given a set of non-constexpr overloads, could the user add even more overloads for constexpr and what is required for this to work? Example:
>>
>> struct X : private df::commutative_addable< X >
>> {
>> X& operator+=( const X& );
>> };
>>
>> constexpr X operator+( constexpr X lhs, constexpr X rhs ) {…}
>>
>> is the above possible? Are there problems/conflicts? What are the requirements for the non-constexpr overloads and the signature/requirements for the user-defined constexpr-overload to play together nicely?
>
> That's not how constexpr works, there is no overloading on whether the arguments are constexpr.

Oh, OK. I guess that kills constexpr for Boost.Operators in C++11 :-/

Thanks, Daniel


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