// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s
// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s
// expected-no-diagnostics
// Test default template arguments for function templates.
void ;
void ;
void
int &;
float &;
;
void
// rdar://23810407
// An IRGen failure due to a symbol collision due to a default argument
// being instantiated twice. Credit goes to Richard Smith for this
// reduction to a -fsyntax-only failure.
// rdar://problem/24480205
// rdar://problem/34167492
// Template B is instantiated during checking if defaulted A copy constructor
// is constexpr. For this we check if S<int> copy constructor is constexpr. And
// for this we check S constructor template with default argument that mentions
// template B. In turn, template instantiation triggers checking defaulted
// members exception spec. The problem is that it checks defaulted members not
// for instantiated class only, but all defaulted members so far. In this case
// we try to check exception spec for A default constructor which requires
// initializer for the field _a. But initializers are added after constexpr
// check so we reject the code because cannot find _a initializer.
// namespace lambda