Commit 866115cd by Jason Merrill Committed by Jason Merrill

PR c++/78198 - inherited template ctor with default arg

	* call.c (convert_default_arg): Look through inheriting ctors.

From-SVN: r241843
parent 491483b0
2016-11-03 Jason Merrill <jason@redhat.com>
PR c++/78198
* call.c (convert_default_arg): Look through inheriting ctors.
2016-11-03 Jakub Jelinek <jakub@redhat.com> 2016-11-03 Jakub Jelinek <jakub@redhat.com>
Alexandre Oliva <aoliva@redhat.com> Alexandre Oliva <aoliva@redhat.com>
Jason Merrill <jason@redhat.com> Jason Merrill <jason@redhat.com>
......
...@@ -7193,6 +7193,9 @@ convert_default_arg (tree type, tree arg, tree fn, int parmnum, ...@@ -7193,6 +7193,9 @@ convert_default_arg (tree type, tree arg, tree fn, int parmnum,
/* See through clones. */ /* See through clones. */
fn = DECL_ORIGIN (fn); fn = DECL_ORIGIN (fn);
/* And inheriting ctors. */
if (flag_new_inheriting_ctors)
fn = strip_inheriting_ctors (fn);
/* Detect recursion. */ /* Detect recursion. */
FOR_EACH_VEC_SAFE_ELT (default_arg_context, i, t) FOR_EACH_VEC_SAFE_ELT (default_arg_context, i, t)
......
// { dg-do compile { target c++11 } }
class A { };
template<typename> using UniquePtr = int;
template<typename AllocPolicy> struct BufferList {
BufferList(unsigned, unsigned, unsigned, AllocPolicy = AllocPolicy());
};
class D : BufferList<A> {
using BufferList::BufferList;
};
template<typename , typename... Args> UniquePtr<D> MakeUnique(Args... aArgs)
{
D d(aArgs...);
return 0;
}
UniquePtr<D> setCloneBuffer_impl_buf = MakeUnique<D>(0, 0, 0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment