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:
http://contractpp.svn.sourceforge.net/viewvc/contractpp/branches/n2914_concepts/libs/doc/html/boost_generic/standard_concepts/container_concepts/container.html

EmplacementContainer concept:
http://contractpp.svn.sourceforge.net/viewvc/contractpp/branches/n2914_concepts/libs/doc/html/boost_generic/standard_concepts/container_concepts/emplacementcontainer.html

Allocator concept:
http://contractpp.svn.sourceforge.net/viewvc/contractpp/branches/n2914_concepts/libs/doc/html/boost_generic/standard_concepts/memory_concepts/allocator.html

All N2914 concepts (that's a lot!):
http://contractpp.svn.sourceforge.net/viewvc/contractpp/branches/n2914_concepts/libs/doc/html/boost_generic/standard_concepts.html

Code, notes, to-dos, etc:
http://contractpp.svn.sourceforge.net/viewvc/contractpp/branches/n2914_concepts/include/boost/generic/new_syntax.hpp

NOTES
* 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
case).

Thanks,
--Lorenzo


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