Re: [patch] libstdc++/61390 don't redeclare template-parameters

2014-08-04 Thread Jonathan Wakely

On 10/06/14 19:09 +0100, Jonathan Wakely wrote:

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.




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.


Committed to the 4.9 branch too.


[patch] libstdc++/61390 don't redeclare template-parameters

2014-06-10 Thread Jonathan Wakely

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 
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
 	 class Node_Update,
 	 class Node,
@@ -161,7 +161,7 @@ namespace __gnu_pbds
 	 class Cmp_Fn,
 	 template
 	 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 ItType>
+  template  class ItType>
   struct test_container
   {
 typename ItType::ContainerType bounds;