From: Stephan Bergmann <sbergman@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix typo in unordered_map deduction guide, missing "typename ="
Date: Fri, 24 Nov 2017 17:21:00 -0000 [thread overview]
Message-ID: <a9122ba4-8348-1b44-fac1-3dd799ed101f@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
Otherwise, at least recent Clang trunk with -std=gnu++17 complains
> In file included from lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/functional:60:
> In file included from lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/unordered_map:47:
> lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/bits/unordered_map.h:1197:5: error: deduction guide template contains a template parameter that cannot be deduced
> unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
> ^
> lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/8.0.0/bits/unordered_map.h:1196:34: note: non-deducible template parameter (anonymous)
> _RequireAllocator<_Allocator>>
> ^
> 1 error generated.
[-- Attachment #2: 0001-Fix-typo-in-unordered_map-deduction-guide-missing-ty.patch --]
[-- Type: text/x-patch, Size: 1761 bytes --]
From 0ecb03c59b9318b3f47e49daa2f45dd513035d55 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Fri, 24 Nov 2017 17:55:38 +0100
Subject: [PATCH] Fix typo in unordered_map deduction guide, missing "typename
="
...as correctly appears in all the other deduction guides in these files.
---
libstdc++-v3/include/bits/unordered_map.h | 2 +-
libstdc++-v3/include/debug/unordered_map | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h
index cb5bcb89a16..27c89f172e1 100644
--- a/libstdc++-v3/include/bits/unordered_map.h
+++ b/libstdc++-v3/include/bits/unordered_map.h
@@ -1193,7 +1193,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
-> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
template<typename _Key, typename _Tp, typename _Allocator,
- _RequireAllocator<_Allocator>>
+ typename = _RequireAllocator<_Allocator>>
unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
-> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index c5734304846..c68ccaa3372 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -679,7 +679,7 @@ namespace __debug
-> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
template<typename _Key, typename _Tp, typename _Allocator,
- _RequireAllocator<_Allocator>>
+ typename = _RequireAllocator<_Allocator>>
unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
-> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
--
2.13.6
next reply other threads:[~2017-11-24 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-24 17:21 Stephan Bergmann [this message]
2017-11-27 17:03 ` Jonathan Wakely
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=a9122ba4-8348-1b44-fac1-3dd799ed101f@redhat.com \
--to=sbergman@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@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).