Boost logo

Boost :

Subject: Re: [boost] [contract] toward N3351 concepts
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2012-09-26 16:59:44


On Wed, Sep 26, 2012 at 9:00 PM, Lorenzo Caminiti <lorcaminiti_at_[hidden]>wrote:

>
> So what am I supposed to do with axioms? Do nothing? Axioms are just
> "comments" that document the semantic?
>
>
Hi,
I am far from being a specialist, but so far my understanding was that
Axioms helps
the compiler to generate useful code (maybe to unlock optimization too?)
Like if A + B <=> B + A, then you can be sure that A+= B <=> B += A .
Then if it's written as an axiom, the compiler can generate the +=operator
automatically
where you use the concept and provide a type that only have the + operator.

That being said, I can't say where I got this understanding.
Certainly in one of the recent video with Stroustrup and other people
explaining Concepts.

Joel Lamotte


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