public inbox for overseers@sourceware.org
 help / color / mirror / Atom feed
From: Allen Webb <vertago1@gmail.com>
To: overseers@gcc.gnu.org
Subject: gcc bugzilla account creation
Date: Fri, 03 Oct 2014 19:53:00 -0000	[thread overview]
Message-ID: <542EFEB4.3000107@gmail.com> (raw)

overseers@gcc.gnu.org,

I need to see about filing a bug for the gcc c++11 standard library, but 
I don't have a bugzilla account. the std::map::lower_bound() function 
doesn't work properly when the map only has one element. I have appended 
some test code that shows the problem. When the map has size()==1, the 
lower_bound function returns end() even though there is an element less 
than the key being compared.

Allen

////////////////////////////////////////////////////////////////////////////////

#include <cstdlib>
#include <iostream>
#include <map>

#define ts_t std::pair<uint64_t,uint64_t>

int main() {

     std::map<ts_t,uint32_t> test;

     uint32_t count = 0;

     test.insert(std::make_pair(
         std::make_pair(1403187740ull,698599ull),
         count++
     ));

     ts_t key = std::make_pair(1403187740ull,698600ull);

     auto lower = test.lower_bound(key);
     auto upper = test.upper_bound(key);

     if(lower==test.end()) std::cout<<"no lower bound\n";
     if(upper==test.end()) std::cout<<"no upper bound\n";
     if(test.begin()->first < key) std::cout<<"key is less than begin()\n";

     test.insert(std::make_pair(
         std::make_pair(1403187740ull,698601ull),
         count++
     ));

     lower = test.lower_bound(key);
     upper = test.upper_bound(key);

     if(lower==test.end()) std::cout<<"no lower bound\n";
     if(upper==test.end()) std::cout<<"no upper bound\n";
     if(test.begin()->first < key) std::cout<<"key is less than begin()\n";

     return EXIT_SUCCESS;
}

             reply	other threads:[~2014-10-03 19:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 19:53 Allen Webb [this message]
2014-10-07  8:34 GCC " Mihai Neagu
2014-10-11  0:14 GCC Bugzilla Account Creation Steve Jarvis
2015-01-13 23:06 GCC bugzilla account creation Dimitar Pashov
2015-01-30  3:57 GCC Bugzilla " Benjamin Braun
2016-09-15 14:24 Marcin Bajor
2016-11-03  3:35 Elizebeth Punnoose
2016-11-21 12:34 gcc " Bo Lind
2016-12-11 22:01 GCC Bugzilla Account Creation Mingye Wang (Arthur2e5)
     [not found] <1820848854.2047985.1482206766467.ref@mail.yahoo.com>
2016-12-20  4:12 ` Jacob Smith
2017-02-07 23:44 R0b0t1
2017-05-22 17:41 GCC Bugzilla account creation George Burgess IV
2017-05-24 22:34 Lodi London
2017-06-16 21:48 GCC Bugzilla Account Creation John Agapeyev
2017-06-19 18:53 Webstrand

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=542EFEB4.3000107@gmail.com \
    --to=vertago1@gmail.com \
    --cc=overseers@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).