10 Feb
2009
10 Feb
'09
7:57 a.m.
Eric Niebler
You can get pretty far with preprocessor hacks to hide the msvc workarounds. Here's something to get your gears turning:
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) #define _value(x) callproto::_value(x) #endif
Now, if proto::_value(proto::_left) shows up in your grammar, it gets turned into proto::callproto::_value(proto::_left). I use this trick a lot.
Cool stuff, Eric, but I nearly missed that one. Could you copy'n'paste this to the "Unsorted tips and tricks" section of the proto docs? Markus (Who is forced to program in C#/CLI for a while instead of working with proto :-( )