Boost logo

Boost :

Subject: [boost] [generic] possible new syntax
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-11-27 12:50:57

Hello all,

I have been in contact with Matt Calabrese to design a new syntax for
Boost.Generic that leverages the preprocessor EDSL techniques
introduced by Boost.Contract. See the "This Library" column in the
links below for a side-by-side comparison with the existing
Boost.Generic syntax and the N2914 syntax.

*** It's important to finalize the syntax before I start implementing
the macros that will parse it: Please tell me what you think of the
new syntax and ask questions if you have any. ***

Container concept:

EmplacementContainer concept:

Allocator concept:

All N2914 concepts (that's a lot!):

Code, notes, to-dos, etc:

* I'm assuming the library will be renamed Boost.Concepts so I'm using
BOOST_CONCEPTS_... and boost::concepts::... but Matt and I have not
agreed on this.
* Some extra commas `,` might be needed at the end of each function
and axiom definition. In this case, it might also be possible to use {
... } instead of ( ... ) around function definitions (but not for
axiom definitions) at the cost of users handling unwrapped commas in
function definitions using BOOST_IDENTITY_TYPE or similar.
* I'm assuming a C++11 preprocessor that can correctly handle empty
macro parameters (workarounds will be provided when that's not the


Boost list run by bdawes at, gregod at, cpdaniel at, john at