
On Thu, Sep 27, 2012 at 5:09 PM, Matt Calabrese <rivorus@gmail.com> wrote:
On Thu, Sep 27, 2012 at 4:00 PM, Lorenzo Caminiti <lorcaminiti@gmail.com>wrote:
I'd probably be more interested in the part of the impl that expands the macro code to implement concepts, not necessarily the pp stuff.
Refer to boost/generic/concept.hpp line 253 BOOST_GENERIC_CONCEPT_IMPL_VALID_
It's probably hard to decipher since, as you probably realize, pretty much everything needs to go into its own, separate metafunction and everything needs to be expanded inside of template specialization argument lists in order for SFINAE to take place, and all of the associated types of the concept need to be template arguments to every single one of those metafunctions for SFINAE to work with them as well. Also, on the macro side, in order to reduce compile times, I avoid making multiple passes over the top-level macro arguments and instead preprocess it all at once, putting code that will eventually go into different locations into different boost preprocessor sequence elements, and then I pull those out individually at the end. This succeeded at greatly reducing compile-times, but it makes the code harder to read.
Also, if you want to simply see the preprocessor output, refer to the "*.hei" files in the include directories. These are the pre-preprocessed forms of the standard concepts, individually. -- -Matt Calabrese