This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44743] Parser does not recogize local variable in constant expression for member function pointers
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2010 12:47:01 -0000
- Subject: [Bug c++/44743] Parser does not recogize local variable in constant expression for member function pointers
- References: <bug-44743-19300@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from redi at gcc dot gnu dot org 2010-07-01 12:47 -------
works as expected in 4.4.3 and later
$ g++ temp.cc
temp.cc: In function 'void deduce_type(void (T::*)()) [with T = A]':
temp.cc:17: instantiated from here
temp.cc:13: error: 'fnc' is not a valid template argument for type 'void
(A::*)()'
temp.cc:13: error: it must be a pointer-to-member of the form `&X::Y'
temp.cc:13: error: no matching function for call to 'call()'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44743