[cfe-dev] Is variadic template a default constructor ? gcc 4.8.1 test case variadic-default.C
SENTHIL KUMAR THANGAVELU
senthil.t at samsung.com
Wed Oct 30 00:10:19 PDT 2013
Hello all,
There is a test case "variadic-default.C" in gcc 4.8.1 test suite discussed in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49205 . I can see "consensus at clang was that WG21 made an oversight in allowing this" in the discussion. Anyone knows the history? also in the same discussion its mentioned "We should just treat the variadic template as a default constructor". gcc 4.8.1 and intel 64 bit compiler 13.1.3 accepts this test case. Should this be fixed in clang? or clang behaviour is correct?
#include <initializer_list>
struct A {
template<typename ...T> A(T...);
A(std::initializer_list<short>);
A(std::initializer_list<long>);
};
A a{};
Regards
Senthil Kumar
More information about the cfe-dev
mailing list