From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-28 14:34:49
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
> 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)>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk