* PR libstdc++/89477 for Debug mode
@ 2019-03-07 21:53 François Dumont
2019-03-07 23:57 ` Jonathan Wakely
0 siblings, 1 reply; 2+ messages in thread
From: François Dumont @ 2019-03-07 21:53 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 776 bytes --]
Hi
   PR 89477 fixes haven't been applied to the Debug mode. Here it is
to fix the different deduction.cc tests.
   PR libstdc++/89477
   * include/debug/map.h (map): Use _RequireNotAllocator to constrain
   parameters in deduction guides.
   * include/debug/multimap.h (multimap): Likewise.
   * include/debug/set.h (multimap): Likewise.
   * include/debug/multiset.h (multimap): Likewise.
   * include/debug/unordered_map (unordered_map): Likewise.
   (unordered_multimap): Likewise.
   * include/debug/unordered_set (unordered_set): Likewise.
   (unordered_multiset): Likewise.
   Tested under Linux x86_64, ok to commit ?
François
[-- Attachment #2: debug_89477.patch --]
[-- Type: text/x-patch, Size: 10910 bytes --]
diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h
index 5063325cb97..80ca1bebbd2 100644
--- a/libstdc++-v3/include/debug/map.h
+++ b/libstdc++-v3/include/debug/map.h
@@ -704,6 +704,7 @@ namespace __debug
typename _Compare = less<__iter_key_t<_InputIterator>>,
typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
map(_InputIterator, _InputIterator,
_Compare = _Compare(), _Allocator = _Allocator())
@@ -712,6 +713,7 @@ namespace __debug
template<typename _Key, typename _Tp, typename _Compare = less<_Key>,
typename _Allocator = allocator<pair<const _Key, _Tp>>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
map(initializer_list<pair<_Key, _Tp>>,
_Compare = _Compare(), _Allocator = _Allocator())
diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h
index 38659aaba26..560aa7dda95 100644
--- a/libstdc++-v3/include/debug/multimap.h
+++ b/libstdc++-v3/include/debug/multimap.h
@@ -585,6 +585,7 @@ namespace __debug
typename _Compare = less<__iter_key_t<_InputIterator>>,
typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
multimap(_InputIterator, _InputIterator,
_Compare = _Compare(), _Allocator = _Allocator())
@@ -593,6 +594,7 @@ namespace __debug
template<typename _Key, typename _Tp, typename _Compare = less<_Key>,
typename _Allocator = allocator<pair<const _Key, _Tp>>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
multimap(initializer_list<pair<_Key, _Tp>>,
_Compare = _Compare(), _Allocator = _Allocator())
diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h
index 19dc8ea6a1e..8fb11f871ac 100644
--- a/libstdc++-v3/include/debug/multiset.h
+++ b/libstdc++-v3/include/debug/multiset.h
@@ -555,6 +555,7 @@ namespace __debug
typename _Allocator =
allocator<typename iterator_traits<_InputIterator>::value_type>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
multiset(_InputIterator, _InputIterator,
_Compare = _Compare(), _Allocator = _Allocator())
@@ -564,6 +565,7 @@ namespace __debug
template<typename _Key,
typename _Compare = less<_Key>,
typename _Allocator = allocator<_Key>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
multiset(initializer_list<_Key>,
_Compare = _Compare(), _Allocator = _Allocator())
diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h
index 88b84905ba2..9f16a9190b8 100644
--- a/libstdc++-v3/include/debug/set.h
+++ b/libstdc++-v3/include/debug/set.h
@@ -567,6 +567,7 @@ namespace __debug
typename _Allocator =
allocator<typename iterator_traits<_InputIterator>::value_type>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
set(_InputIterator, _InputIterator,
_Compare = _Compare(), _Allocator = _Allocator())
@@ -575,6 +576,7 @@ namespace __debug
template<typename _Key, typename _Compare = less<_Key>,
typename _Allocator = allocator<_Key>,
+ typename = _RequireNotAllocator<_Compare>,
typename = _RequireAllocator<_Allocator>>
set(initializer_list<_Key>,
_Compare = _Compare(), _Allocator = _Allocator())
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map
index 163acd7f7ec..895d5cd227c 100644
--- a/libstdc++-v3/include/debug/unordered_map
+++ b/libstdc++-v3/include/debug/unordered_map
@@ -651,6 +651,8 @@ namespace __debug
typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_map(_InputIterator, _InputIterator,
typename unordered_map<int, int>::size_type = {},
@@ -662,6 +664,8 @@ namespace __debug
template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
typename _Pred = equal_to<_Key>,
typename _Allocator = allocator<pair<const _Key, _Tp>>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_map(initializer_list<pair<_Key, _Tp>>,
typename unordered_map<int, int>::size_type = {},
@@ -691,6 +695,7 @@ namespace __debug
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_map(_InputIterator, _InputIterator,
typename unordered_map<int, int>::size_type,
@@ -712,6 +717,7 @@ namespace __debug
-> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_map(initializer_list<pair<_Key, _Tp>>,
typename unordered_map<int, int>::size_type,
@@ -1250,6 +1256,8 @@ namespace __debug
typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_multimap(_InputIterator, _InputIterator,
unordered_multimap<int, int>::size_type = {},
@@ -1262,6 +1270,8 @@ namespace __debug
template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
typename _Pred = equal_to<_Key>,
typename _Allocator = allocator<pair<const _Key, _Tp>>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_multimap(initializer_list<pair<_Key, _Tp>>,
unordered_multimap<int, int>::size_type = {},
@@ -1290,6 +1300,7 @@ namespace __debug
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_multimap(_InputIterator, _InputIterator,
unordered_multimap<int, int>::size_type, _Hash,
@@ -1311,6 +1322,7 @@ namespace __debug
-> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_multimap(initializer_list<pair<_Key, _Tp>>,
unordered_multimap<int, int>::size_type,
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set
index 22e0abd3283..924ff7671ee 100644
--- a/libstdc++-v3/include/debug/unordered_set
+++ b/libstdc++-v3/include/debug/unordered_set
@@ -539,6 +539,8 @@ namespace __debug
typename _Allocator =
allocator<typename iterator_traits<_InputIterator>::value_type>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_set(_InputIterator, _InputIterator,
unordered_set<int>::size_type = {},
@@ -549,6 +551,8 @@ namespace __debug
template<typename _Tp, typename _Hash = hash<_Tp>,
typename _Pred = equal_to<_Tp>,
typename _Allocator = allocator<_Tp>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_set(initializer_list<_Tp>,
unordered_set<int>::size_type = {},
@@ -569,6 +573,7 @@ namespace __debug
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_set(_InputIterator, _InputIterator,
unordered_set<int>::size_type,
@@ -586,6 +591,7 @@ namespace __debug
-> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
template<typename _Tp, typename _Hash, typename _Allocator,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_set(initializer_list<_Tp>,
unordered_set<int>::size_type, _Hash, _Allocator)
@@ -1093,6 +1099,8 @@ namespace __debug
typename _Allocator =
allocator<typename iterator_traits<_InputIterator>::value_type>,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_multiset(_InputIterator, _InputIterator,
unordered_multiset<int>::size_type = {},
@@ -1104,6 +1112,8 @@ namespace __debug
template<typename _Tp, typename _Hash = hash<_Tp>,
typename _Pred = equal_to<_Tp>,
typename _Allocator = allocator<_Tp>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
+ typename = _RequireNotAllocator<_Pred>,
typename = _RequireAllocator<_Allocator>>
unordered_multiset(initializer_list<_Tp>,
unordered_multiset<int>::size_type = {},
@@ -1125,6 +1135,7 @@ namespace __debug
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_multiset(_InputIterator, _InputIterator,
unordered_multiset<int>::size_type,
@@ -1144,6 +1155,7 @@ namespace __debug
-> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
template<typename _Tp, typename _Hash, typename _Allocator,
+ typename = _RequireNotAllocatorOrIntegral<_Hash>,
typename = _RequireAllocator<_Allocator>>
unordered_multiset(initializer_list<_Tp>,
unordered_multiset<int>::size_type, _Hash, _Allocator)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PR libstdc++/89477 for Debug mode
2019-03-07 21:53 PR libstdc++/89477 for Debug mode François Dumont
@ 2019-03-07 23:57 ` Jonathan Wakely
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2019-03-07 23:57 UTC (permalink / raw)
To: François Dumont; +Cc: libstdc++, gcc-patches
On 07/03/19 22:34 +0100, François Dumont wrote:
>Hi
>
>Â Â Â PR 89477 fixes haven't been applied to the Debug mode. Here it is
>to fix the different deduction.cc tests.
>
>Â Â Â PR libstdc++/89477
>Â Â Â * include/debug/map.h (map): Use _RequireNotAllocator to constrain
>Â Â Â parameters in deduction guides.
>Â Â Â * include/debug/multimap.h (multimap): Likewise.
>Â Â Â * include/debug/set.h (multimap): Likewise.
>Â Â Â * include/debug/multiset.h (multimap): Likewise.
>Â Â Â * include/debug/unordered_map (unordered_map): Likewise.
>Â Â Â (unordered_multimap): Likewise.
>Â Â Â * include/debug/unordered_set (unordered_set): Likewise.
>Â Â Â (unordered_multiset): Likewise.
>
>Â Â Â Tested under Linux x86_64, ok to commit ?
OK, thanks for catching this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-07 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 21:53 PR libstdc++/89477 for Debug mode François Dumont
2019-03-07 23:57 ` Jonathan Wakely
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).