
21 Feb
2004
21 Feb
'04
6:01 p.m.
"Peter Dimov" <pdimov@mmltd.net> writes:
David Abrahams wrote:
Simple: specializations that follow the point of instantiation aren't considered. This program exits with an error:
template <class T> int f(T) { return 1; }
int main() { return ::f(0); }
template <> int f(int) { return 0; }
It's ill-formed, actually.
Er, Right. An order dependency, but less dangerous than the one you get with overloading. -- Dave Abrahams Boost Consulting www.boost-consulting.com