From: Marek Polacek Date: Fri, 2 Aug 2019 17:51:53 +0000 (+0000) Subject: re PR c++/53009 (pointer to static member function of template class is “invalid... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a2e0013a04dc28e249660b4c49992b14b5dcc09;p=gcc.git re PR c++/53009 (pointer to static member function of template class is “invalid” as a template argument of another template class) PR c++/53009 * g++.dg/cpp0x/nontype3.C: New test. From-SVN: r274027 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3ba2518d8f2..d57410cb92b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-08-02 Marek Polacek + + PR c++/53009 + * g++.dg/cpp0x/nontype3.C: New test. + 2019-08-02 Marek Polacek PR c++/77575 diff --git a/gcc/testsuite/g++.dg/cpp0x/nontype3.C b/gcc/testsuite/g++.dg/cpp0x/nontype3.C new file mode 100644 index 00000000000..02b5f60c3fc --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nontype3.C @@ -0,0 +1,32 @@ +// PR c++/53009 +// { dg-do compile { target c++11 } } + +template class function_proxy; + +template +struct function_proxy +{ + static void wrapper(){ } +}; + +template class member_helper; + +template +struct member_helper +{ + static void as_free(Class& obj){ } + + static void worker(){ + (void) function_proxy::wrapper; + } +}; + +struct Test +{ + void test(){ } +}; + +int main() +{ + member_helper::worker(); +}