public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member
@ 2012-05-27 14:00 schaub.johannes at googlemail dot com
  2012-05-27 14:33 ` [Bug c++/53499] " schaub.johannes at googlemail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: schaub.johannes at googlemail dot com @ 2012-05-27 14:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499

             Bug #: 53499
           Summary: Incorrect partial ordering result with member vs
                    non-member
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: schaub.johannes@googlemail.com


I think that this is ambiguous for partial ordering ambiguities, but GCC
accepts this code, selecting the non-member

template <class P>
class ptr
{
public:
  // Picked in C++11 mode.
  template<class T>
  void operator- (T) const   
  {  static_assert(sizeof(T) == 0, "#1"); }
};

// Picked in default C++ mode.
template<class T1, class T2>
void operator- (const ptr<T1>&, const ptr<T2>&)
{  static_assert(sizeof(T1) == 0, "#2"); }

int
main ()
{
  ptr <int> a, b;
  (void) (b - a);
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-01 18:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-27 14:00 [Bug c++/53499] New: Incorrect partial ordering result with member vs non-member schaub.johannes at googlemail dot com
2012-05-27 14:33 ` [Bug c++/53499] " schaub.johannes at googlemail dot com
2015-07-17 15:30 ` redi at gcc dot gnu.org
2015-07-17 15:30 ` redi at gcc dot gnu.org
2021-12-09 13:09 ` pinskia at gcc dot gnu.org
2023-12-06 14:02 ` cvs-commit at gcc dot gnu.org
2023-12-22 21:23 ` ppalka at gcc dot gnu.org
2024-01-12 15:27 ` jason at gcc dot gnu.org
2024-02-01 18:33 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).