From patchwork Tue Oct 9 16:11:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [C++,testcase] PR 53763 Date: Tue, 09 Oct 2012 06:11:48 -0000 From: Paolo Carlini X-Patchwork-Id: 190356 Message-Id: <50744CC4.6060902@oracle.com> To: "gcc-patches@gcc.gnu.org" Hi, I'm adding the testcase and closing the PR as fixed for 4.8.0. Thanks, Paolo. ///////////////////////// 2012-10-09 Paolo Carlini PR c++/53763 * g++.dg/cpp0x/decltype43.C: New. Index: g++.dg/cpp0x/decltype43.C =================================================================== --- g++.dg/cpp0x/decltype43.C (revision 0) +++ g++.dg/cpp0x/decltype43.C (working copy) @@ -0,0 +1,27 @@ +// PR c++/53763 +// { dg-do compile { target c++11 } } + +template +struct A +{ + static int a(TYPE value) + { + return value; + } +}; + +template +struct B +{ + static int b(ARGS...) + { + return 0; + } +}; + +int main() +{ + int x = B::a(1))>::b(A::a(1)); + int y = B::b(A::a(2)); // { dg-error "template argument" } + return x + y; +}