This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19894] pointer-to-void member not rejected in template
- From: "donaldc at csgsolar dot com dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 May 2005 03:06:04 -0000
- Subject: [Bug c++/19894] pointer-to-void member not rejected in template
- References: <20050211020409.19894.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From donaldc at csgsolar dot com dot au 2005-05-16 03:06 -------
> The third paragraph of [8.3.3] aka [dcl.mptr] says:
>
> A pointer to member shall not point to a static member of a class (9.4),
> a member with reference type, or "cv void."
It can be equal to null, though. The following should all compile:
a=0;
if (a==0) { } // always true
if (a!=0) {} // always false
I don't think there's a bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19894