
I'm not writing for C++03. "Start fresh". That's my motto. (It isn't really).
I'm waving my hands a bit since F() and Args() require everything to be
default constructible, but you can get around that with some clever metaprogramming machinery and fake accessor functions.
Which is why I use make<T>() instead of T().
I used something similar (cons<T>), which is specialized for lvalue, rvalue references.
Caveat: you probably need an SVN build of GCC to actually make that work
without internal compiler errors :)
I've had no problem at all with a standard GCC 4.4 build. What kind of ICEs are they? If it's mangling issues, they're not very hard to circumvent usually.
With GCC 4.5... It wasn't this particular example - and it may have just been a regression - but I had an ICE using a similar technique when trying to determine if list<int>::iterator (i.e. list_iterator<int> or whatever it is) had an operator*. The error was in tsubst_copy, but it seems to have gone away. Andrew Sutton andrew.n.sutton@gmail.com