
6 Aug
2005
6 Aug
'05
7:06 p.m.
"David Abrahams" <dave@boost-consulting.com> wrote in message news:u64ujvtre.fsf@boost-consulting.com...
"Andy Little" <andy@servocomm.freeserve.co.uk> writes:
The use of the dummy expression |frobnicates| is a poor substitute for a user defined operator.
Best we can do today. And it's not bad, once you understand how the library works. Just like in Boost.Lambda a+b doesn't add anything: it builds a function object. Just like in Boost.Spirit the operators are used for parsing.
The inbuilt operator you choose to subvert influences how the expression is evaluated of course: #define OP1 |frobnicates| #define OP2 *frobnicates* int a=0,b=0; double c=0.,d=0.; a+c OP1 b+d; a+c OP2 b+d; regards Andy Little