24 Aug
2014
24 Aug
'14
4:11 a.m.
On Sat, 23 Aug 2014 17:55:06 -0700, Mostafa
Given the following code, if (1) is uncommented then it fails to compile under C++03 mode yet works in C++11 mode. If commented out, then it compiles successfully under both modes. (g++ 4.8.2 is being used) Is this behavior expected or a bug?
FWIW, both scenarios compile in VS2005. It seems gcc is unnecessarily instantiating (in function f2) the copy ctor for Bar<Foo> whenever that ctor is explicitly defined. Is this a gcc bug?