The following code sample is compiled by several other compilers. Gcc compiles the following example, when the function f is put into the global scope. The example can also be compiled, when v has only a single template parameter. template <class T1, class T2> class v { }; class c2 { void f(const v<int, int> &t = v<int, int>()) { } }; int main() { } The code cannot be compiled by gcc 3.4, 4.1.2 and 4.2 In the example it is of course essential that t is a _constant_ reference. Bernd Donner
*** This bug has been marked as a duplicate of 57 ***