This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix typo in unordered_map deduction guide, missing "typename ="
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Stephan Bergmann <sbergman at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 27 Nov 2017 16:44:49 +0000
- Subject: Re: [PATCH] Fix typo in unordered_map deduction guide, missing "typename ="
- Authentication-results: sourceware.org; auth=none
- References: <a9122ba4-8348-1b44-fac1-3dd799ed101f@redhat.com>
On 24/11/17 18:03 +0100, Stephan Bergmann wrote:
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.
Committed to trunk, backport to gcc-7-branch will follow.
I created https://gcc.gnu.org/PR83181 for the accepts-invalid bug. All
our tests pass with or without the fix, and even with that deduction
guide completely deleted, so I don't understand what it's supposed to
be for. This is hardly the only thing I don't understand about
deduction guides.