
on Fri Apr 20 2012, lcaminiti <lorcaminiti-AT-gmail.com> wrote:
Dave Abrahams wrote
on Thu Apr 19 2012, lcaminiti <lorcaminiti-AT-gmail.com> wrote:
Hello all,
Does this Addable concept definition make sense to you?
Well, it "makes sense," but...
Is there any error?
That depends on what concept constraints you're trying to express. This definition tests that x + y is convertible to T.
I wanted to check that there exist an operator+ from T x T to T "T operator+(T, T)" so I think that is what Addable<T> checks...
Actually it checks that there exists an operator+ from T non-const lvalue x T non-const lvalue to U, where U is convertible to T const&
maybe the Sun's linker errors below are from something else (I've changed a regression test to get more info when it cycles tomorrow).
I don't know, but it seems unlikely. Probably Sun's linker just needs a body for return_type(). Cheers, -- Dave Abrahams BoostPro Computing http://www.boostpro.com