public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/59167] New: Add a specialization for std::hash<__gnu_debug::string>
@ 2013-11-18  8:26 bmerry at gmail dot com
  2015-04-09 15:04 ` [Bug libstdc++/59167] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: bmerry at gmail dot com @ 2013-11-18  8:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59167
           Summary: Add a specialization for
                    std::hash<__gnu_debug::string>
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bmerry at gmail dot com

I have code for which I am explicitly selecting debug containers from the
__gnu_debug namespace (I'm not using -D_GLIBCXX_DEBUG since it breaks the ABI
with Boost and I don't want to require people to rebuild Boost to use a debug
build of my code).

This mostly works, but when I try to use an unordered_map with
__gnu_debug::string as the key type I get errors because std::hash hasn't been
specialized for it. I can write my own specialization, but it would be nice if
the library just provided it.

Obviously the other variants (wstring, u16string, u32string should be handled
too).


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

* [Bug libstdc++/59167] Add a specialization for std::hash<__gnu_debug::string>
  2013-11-18  8:26 [Bug libstdc++/59167] New: Add a specialization for std::hash<__gnu_debug::string> bmerry at gmail dot com
@ 2015-04-09 15:04 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-09 15:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59167

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-04-09
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
#include <debug/string>
auto h = std::hash<__gnu_debug::string>{}({});




hh.cc:3:41: error: invalid use of incomplete type ‘struct
std::hash<__gnu_debug::basic_string<char> >’
 auto h = std::hash<__gnu_debug::string>{}({});
                                         ^
In file included from
/home/jwakely/gcc/5/include/c++/5.0.0/bits/basic_string.h:5466:0,
                 from /home/jwakely/gcc/5/include/c++/5.0.0/string:52,
                 from /home/jwakely/gcc/5/include/c++/5.0.0/debug/string:32,
                 from hh.cc:1:
/home/jwakely/gcc/5/include/c++/5.0.0/bits/functional_hash.h:58:12: note:
declaration of ‘struct std::hash<__gnu_debug::basic_string<char> >’
     struct hash;
            ^
>From gcc-bugs-return-483148-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 09 15:07:34 2015
Return-Path: <gcc-bugs-return-483148-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7642 invoked by alias); 9 Apr 2015 15:07:33 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7235 invoked by uid 55); 9 Apr 2015 15:07:29 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65690] [5 Regression] typedef alignment lost since r219705
Date: Thu, 09 Apr 2015 15:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65690-4-1Elpkza2Hm@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65690-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65690-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg00700.txt.bz2
Content-length: 564

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide690

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Apr  9 15:06:56 2015
New Revision: 221952

URL: https://gcc.gnu.org/viewcvs?rev"1952&root=gcc&view=rev
Log:
    PR c++/65690
    * tree.c (build_cplus_array_type): Layout type before variants are
    set, but copy over TYPE_SIZE and TYPE_SIZE_UNIT from the main
    variant.

    * c-c++-common/attr-aligned-1.c: New test.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2015-04-09 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18  8:26 [Bug libstdc++/59167] New: Add a specialization for std::hash<__gnu_debug::string> bmerry at gmail dot com
2015-04-09 15:04 ` [Bug libstdc++/59167] " redi 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).