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.
>From 0ecb03c59b9318b3f47e49daa2f45dd513035d55 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann <sberg...@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