1 2 3 4 5 6 7 8 9 10 11 12 13 14 | template <typename T> struct X { /* ... */ }; template <typename T, typename ... U> struct X<T(U..., ... )> { /* ... */}; template <typename T, typename ... U> struct X<T(U... ... )> { /* ... */}; int main() { } |
dGVtcGxhdGUgPHR5cGVuYW1lIFQ+CnN0cnVjdCBYCnsgLyogLi4uICovIH07Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVCwgdHlwZW5hbWUgLi4uIFU+CnN0cnVjdCBYPFQoVS4uLiwgLi4uICk+CnsgLyogLi4uICovfTsKCnRlbXBsYXRlIDx0eXBlbmFtZSBULCB0eXBlbmFtZSAuLi4gVT4Kc3RydWN0IFg8VChVLi4uIC4uLiApPgp7IC8qIC4uLiAqL307CgppbnQgbWFpbigpCnsgfQ==
prog.cpp:10:8: error: redefinition of 'struct X<T(U ..., ...)>' prog.cpp:7:1: error: previous definition of 'struct X<T(U ..., ...)>'
-
result: Compilation error (maybe you wish to see an example for C++11)


