|
Boost : |
Subject: Re: [boost] [review] Formal review period for VMD library begins today, Aug 21, and ends Sat, Aug 30
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-08-23 08:30:11
On 22 Aug 2014 at 17:00, Edward Diener wrote:
> But here is a possible example, although purely theoretical as to its
> use. Suppose you designed a macro where you were creating a C++ class.
> In the macro you might have some input parameter which, if the user
> specified the identifier 'public' the code you were creating from
> further macro input would go in a base class, if the user specified the
> identifier "protected' the code you were creating from further macro
> input would go in a derived class, and if the user specified 'private'
> the code you were creating from further macro input would go in a pimpl
> class connected to the base class by a pimpl sort of identifier. VMD has
> the ability to test for specific identifiers, such as 'public',
> 'protected', 'private', and based on the test you could use the Boost PP
> macro 'BOOST_PP_IIF' to create the output you needed.
Are you saying here that one can use macros to do static reflection
of the member access attributes of member functions, or that one can
use macros to synthesise the member access attributes of member
functions?
If the former that is something we cannot do in C++ 14 without extra
manually inserted metadata. If the latter then it is something we can
easily do in C++ 98 via policy inheritance, let alone C++ 14.
Niall
-- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk