
"Martin Bonner" <martin.bonner@pitechnology.com> wrote
This is going to get messy as you say with templates (which would FORCE a space in).
if (any_of(...) ^some_predicate()^ 5)... // 3
if (any_of(...) /some_predicate()/ 5)... // 4 These two are visually too light-weight for my taste.
Why not: if (any_of(...) *some_predicate()* 5)... or if (any_of(...) %some_predicate()% 5)...
IMO this argument boils down to whether C++ will be getting user-definable operators ( IOW using a name as an operator). If user-definable operators are not likely to become part of the languge, then it seems to me to be unproductive to pursue the above, when a function call syntax will work just as well. Alternatively, if user-definable operators are likely to become part of C++, then its most closely representable using a macro: if ( any_of(...) BOOST_OPERATOR(some_predicate) 5 )... For simplicity the precedence should be as high as possible( as close as possible to function-call). FWIW the argument on comp.std.c++ regarding user definable operators seems to be mostly against. regards Andy Little