OSDN Git Service

PR c++/51641 - Lookup finds enclosing class member instead of template parameter
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Jan 2012 14:26:12 +0000 (14:26 +0000)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Jan 2012 14:26:12 +0000 (14:26 +0000)
commit76e0ef62e55eee590216a74e2bbbd42ecae6d76e
tree6fa1c59809d4ba0642ed4689478aa521b88c87d1
parentf9a7b5538fd8e7841c0780c2c5a764a6fbda5a9b
PR c++/51641 - Lookup finds enclosing class member instead of template parameter

gcc/cp/

PR c++/51641
* cp-tree.h (template_type_parameter_p): Declare new function.
(parameter_of_template_p): Remove
* pt.c (template_type_parameter_p): Define new function.
(parameter_of_template_p): Remove.
* name-lookup.c (binding_to_template_parms_of_scope_p): Don't rely
on parameter_of_template_p anymore.  Compare the level of the
template parameter to the depth of the template.

gcc/testsuite/

PR c++/51641
* g++.dg/lookup/hidden-class17.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183726 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/name-lookup.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/hidden-class17.C [new file with mode: 0644]