public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ich at az2000 dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/40186] floating point comparision works wrong ( !(a < b) && (b > a) is true )
Date: Mon, 18 May 2009 13:16:00 -0000	[thread overview]
Message-ID: <20090518131610.31486.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40186-17447@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from ich at az2000 dot de  2009-05-18 13:16 -------
This is a real problem, because in my real application, I tried to use a very
similar order in a std::set<tmp*,CustomOrder>, defined like this:

struct CustomOrder {
        bool operator()(const Tmp* a, const Tmp* b) const {
                return a->get() < b->get();
        }
};

STLport gives this assertion when inserting Tmp pointers with equal values
(returned by get() function):

/usr/include/stlport/stl/debug/_tree.h(63): STL error : Invalid strict weak
ordering predicate, if pred(a, b) then we should have !pred(b, a)
/usr/include/stlport/stl/debug/_tree.h(63): STL assertion failure:    
!_M_non_dbg_cmp(__rhs, __lhs) 


-- 


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


  parent reply	other threads:[~2009-05-18 13:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18 13:08 [Bug c++/40186] New: " ich at az2000 dot de
2009-05-18 13:11 ` [Bug c++/40186] " ich at az2000 dot de
2009-05-18 13:16 ` ich at az2000 dot de [this message]
2009-05-18 13:17 ` ich at az2000 dot de
2009-05-18 13:38 ` [Bug c++/40186] floating point comparison is " ich at az2000 dot de
2009-05-18 14:12 ` pinskia at gcc dot gnu dot org
2009-05-18 14:49 ` pinskia at gcc dot gnu dot org
2009-05-18 14:53 ` sliwa at cft dot edu dot pl
2009-05-18 14:56 ` vincent at vinc17 dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090518131610.31486.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).