
17 Sep
2005
17 Sep
'05
10:17 a.m.
Jonathan Turkanis wrote:
Arkadiy Vertleyb wrote:
"Joel de Guzman" wrote
Arkadiy Vertleyb wrote:
Hi All,
Do you think it makes sense to write a utility that, using a syntax like following:
template<class T, class U> class foo /*typeof*/ { . . . };
I played with this a bit (using Spirit), and the most challenging part seems to be parsing the default parameters, which can be complicated expressions, for example:
template<class T, int n = traits<T*>::size + 1> class x{};
I don't actually need to parse it, just to skip till the next comma or angle bracket (considering nesting).
Don't forget comments! ;-)
Why not build it on top of Wave :D? Or even build it as an extended-Wave that adds the typeof information as part of it's preprocessed output? - Reece