This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53009] New: pointer to static member function of template class is âinvalidâ as a template argument of another template class


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]