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:
parent
05555c4ad1
commit
f585f69b31
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
18
gcc/testsuite/g++.dg/cpp0x/ref-qual14.C
Normal file
18
gcc/testsuite/g++.dg/cpp0x/ref-qual14.C
Normal 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...) &&>
|
||||
{};
|
Loading…
Reference in New Issue
Block a user