On 11/03/2015 08:49, Andrey Semashev wrote:
On Wed, Mar 11, 2015 at 10:29 AM, Damien Buhl
wrote: [...] Perhaps, 'auto' would be shorter?
BOOST_FUSION_ADAPT_STRUCT( demo::employee, (auto, name) (auto, age) )
It also looks kind of similar to C++14 lambdas.
That looks nice, and it may be great, but I'm a bit concerned in giving a slight different meaning than the official one to a standard keyword.
Could you describe the difference?
Actually there is not much difference, but what I wanted to say is that I am concerned, because it is the responsibilities of the compiler to implement the auto keyword, and if I was just forwarding it in the macros it would make sense to me, but I'm replacing it with BOOST_TYPEOF. Which is a decltype on recent compiler but an emulation on older compilier. In fact I'm just unsure if this wouldn't be a mistake by reusing a keyword which is already reserved by the standard and where is well defined usage for it : variable initialization and function return statement. Possibly decltype would make more sense ? Or even typeof ?