c++/8171: pointers to member functions comparison

bangerth@dealii.org bangerth@dealii.org
Mon Nov 4 08:15:00 GMT 2002


Synopsis: pointers to member functions comparison

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Nov  4 08:15:06 2002
State-Changed-Why:
    I agree. In particular, the referenced part of the standard
    states:
      Pointer  to  member  conversions(_conv.mem_) and
      qualification conversions (_conv.qual_) are performed
      to bring them to a common type.
    This does not seem to happen. (Conversion by hand yields
    the desired result though, so there is a way to work
    around this problem.)
    
    W.
    
    
    PS: As a sidenote (for the curious), the standard also says
    this on comparing pointers to member functions:
      if either [operand] is a pointer to a virtual  member  func-
      tion,  the result is unspecified
    That seems like a trap you don't want to fall into... (And
    there isn't even a way for the compiler to warn you about.)
    
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8171



More information about the Gcc-prs mailing list