This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53009] New: pointer to static member function of template class is âinvalidâ as a template argument of another template class
- From: "blaffablaffa at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Apr 2012 16:07:59 +0000
- Subject: [Bug c++/53009] New: pointer to static member function of template class is âinvalidâ as a template argument of another template class
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53009
Bug #: 53009
Summary: pointer to static member function of template class is
âinvalidâ as a template argument of another template
class
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: blaffablaffa@gmail.com
I believe that this bug is somewhat related to #35167: probably g++ thinks that
the address of a static member function of a template class is not a constant
expression, whereas it is. I'm filing a new bug though because the situation
here involves two distinct class templates, the error message is different
("error: template argument 2 is invalid", not helpful at all), and because it's
said in the comments of #35167 that it's fixed if C++11 is used, whereas my
testcase is compiled with and needs C++11 (for variadic templates).
Fails to build with g++ 4.6.2 4.5.4 4.4.6.