This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[patch] libstdc++/61390 don't redeclare template-parameters
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Jun 2014 19:09:55 +0100
- Subject: [patch] libstdc++/61390 don't redeclare template-parameters
- Authentication-results: sourceware.org; auth=none
Yo dawg, I heard you like templates, so I renamed the
template-parameters of your template template-parameters so they are
not the same as the template-parameters of your templates.
G++ fails to diagnose this (PR17267) but Clang gives an error and EDG
gives a warning.
Tested x86_64-linux, committed to trunk.
commit 4e4fcc91a4edd9e0955dc3cd0412fa7e3f2fd93c
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jun 10 18:52:37 2014 +0100
PR libstdc++/61390
* include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
(bin_search_tree_traits): Do not redeclare template-parameters.
* testsuite/util/testsuite_iterators.h (test_container): Likewise.
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
index d97b432..7ada365 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
@@ -55,7 +55,7 @@ namespace __gnu_pbds
class Cmp_Fn,
template<typename Node_CItr,
class Node_Itr,
- class Cmp_Fn,
+ class _Cmp_Fn,
typename _Alloc>
class Node_Update,
class Node,
@@ -161,7 +161,7 @@ namespace __gnu_pbds
class Cmp_Fn,
template<typename Node_CItr,
class Node_Itr,
- class Cmp_Fn,
+ class _Cmp_Fn,
typename _Alloc>
class Node_Update,
class Node,
diff --git a/libstdc++-v3/testsuite/util/testsuite_iterators.h b/libstdc++-v3/testsuite/util/testsuite_iterators.h
index c690581..6cf18b4 100644
--- a/libstdc++-v3/testsuite/util/testsuite_iterators.h
+++ b/libstdc++-v3/testsuite/util/testsuite_iterators.h
@@ -518,7 +518,7 @@ namespace __gnu_test
* It takes two pointers representing a range and presents them as
* a container of iterators.
*/
- template <class T, template<class T> class ItType>
+ template <class T, template<class TT> class ItType>
struct test_container
{
typename ItType<T>::ContainerType bounds;