1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 enum copy_traits
{ movable
= 1 };
6 struct optional_ctor_base
{};
8 struct ctor_copy_traits
{
9 // this would produce a c++98-compat warning, which would erroneously get the
10 // no-matching-function-call error's notes attached to it (or suppress those
11 // notes if this diagnostic was suppressed, as it is in this case)
12 static constexpr int traits
= copy_traits::movable
;
15 struct optional
: optional_ctor_base
<ctor_copy_traits
<T
>::traits
> {
17 constexpr optional(U
&& v
);
26 XB(const optional
<B
>&);
31 void InsertRow(const XA
&, const YB
&); // expected-note {{candidate function not viable: no known conversion from 'int' to 'const XA' for 1st argument}}
32 void ReproducesBugSimply() {
33 InsertRow(3, B
{}); // expected-error {{no matching function for call to 'InsertRow'}}