re PR c++/57825 (Template specialization for ref qualified member pointers)

PR c++/57825
	* tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.

From-SVN: r201550
This commit is contained in:
Jason Merrill 2013-08-06 21:17:36 -04:00 committed by Jason Merrill
parent 05555c4ad1
commit f585f69b31
3 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-08-06 Jason Merrill <jason@redhat.com>
PR c++/57825
* tree.c (strip_typedefs) [METHOD_TYPE]: Preserve ref-qualifier.
2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58080

View File

@ -1236,6 +1236,8 @@ strip_typedefs (tree t)
result =
build_method_type_directly (class_type, type,
TREE_CHAIN (arg_types));
result
= build_ref_qualified_type (result, type_memfn_rqual (t));
}
else
{

View File

@ -0,0 +1,18 @@
// PR c++/57825
// { dg-do compile { target c++11 } }
template<typename T>
struct target_class
{};
template<typename Class, typename Ret, typename... Args>
struct target_class<Ret (Class::*)(Args...)>
{};
template<typename Class, typename Ret, typename... Args>
struct target_class<Ret (Class::*)(Args...) &>
{};
template<typename Class, typename Ret, typename... Args>
struct target_class<Ret (Class::*)(Args...) &&>
{};