// RUN: %clang_cc1 -std=c++11 -verify %s
// RUN: %clang_cc1 -std=c++2a -verify %s
;
// "The substitution occurs in all types and expressions that are used in [...]
// template parameter declarations." In particular, we must substitute into the
// type of a parameter pack that is not a pack expansion, even if we know the
// corresponding argument pack is empty.
void ;
int &;
int &a_disabled = ;
int &a_enabled = ; // expected-error {{cannot bind to a temporary of type 'void'}}
void ;
int &;
int &b_disabled = ;
int &b_enabled = ; // expected-error {{cannot bind to a temporary of type 'void'}}
void ;
int &;
int &c_disabled = ;
int &c_enabled = ; // expected-error {{cannot bind to a temporary of type 'void'}}
// The substitution proceeds in lexical order and stops when a condition that
// causes deduction to fail is encountered.