[Bug c++/57626] New: [C++11] ICE with template alias and member function pointer

bluescarni at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Jun 15 17:06:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57626

            Bug ID: 57626
           Summary: [C++11] ICE with template alias and member function
                    pointer
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bluescarni at gmail dot com

Created attachment 30309
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30309&action=edit
Test case showing the problem

The attached reduced code snippet produces an ICE in both GCC 4.8.1 and 4.7.3.
The error messages are respectively:

---
bug.cpp: In substitution of ‘template<class T, template<class ...> class TT,
class ... Args> using bar = void (T::*)(TT<Args ...>&, const symbol_set&) [with
T = Term; TT = Args ...; Args = {Args ...}]’:
bug.cpp:8:86:   required from here
bug.cpp:4:58: internal compiler error: in tsubst, at cp/pt.c:11324
 using bar = void(T::*)(TT<Args...> &, const symbol_set &);
                                                          ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
---

and

---
bug.cpp:4:58: internal compiler error: in tsubst, at cp/pt.c:11057
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
---

Note that the code snippet is malformed and it is not supposed to compile.
clang++ 3.2 produces the error message:

---
bug.cpp:8:79: error: template argument for template template parameter must be
a class template or type alias template
     template <typename Term, typename ... Args, typename =
decltype(bar<Term,Args...>(&Term::multiply))>
                                                                              ^
1 error generated.
---


More information about the Gcc-bugs mailing list