19 Sep
2013
19 Sep
'13
2:22 p.m.
On 19 September 2013 08:53, Peter Dimov wrote:
The reason that there are two overloads, one without arguments, the other with Arg1&& and Args&&..., is that earlier versions of g++ treated new T(args...) as new T when args... is empty, instead of the correct new T(). There is a test that checks for this bug. If the current crop of supported compilers no longer suffers from it, the two overloads can be replaced by the simple variadic Args... version.
FWIW that should be fixed in G++ 4.3.0 onwards: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32597