Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-02-21 13:01:03


"Peter Dimov" <pdimov_at_[hidden]> 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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk