
AMDG David Abrahams wrote:
on Fri Mar 28 2008, Steven Watanabe <watanabesj-AT-gmail.com> wrote:
It can break today under certain conditions.
I don't understand how that is a case of what I'm describing. It looks like a simple instantiation failure.
Yep. The problem turns out to be that ADL causes msvc to instantate all the template parameters recursively. The result is that any constructs involving templates that cannot be instantiated cannot safely appear in the interfaces of non-metafunction class templates. This means that using MPL lambda expressions as a replacement for template template parameters for instance doesn't work in general.
In C++0x you won't even be able to write
typedef vector<foo(bar)> x;
without getting an error.
And this is better than the possibility of obscure errors when the compiler unexpectedly instantiates vector<foo(bar)> In Christ, Steven Watanabe