// RUN: %clang_cc1 -std=c++1z -verify %s
;
;
using B = SecretlyAbstract<int>;
using C = SecretlyAbstract<float>;
using D = SecretlyAbstract<char>;
B b; // expected-error {{abstract class}}
D d; // expected-error {{abstract class}}
;
// Note: C is not instantiated anywhere in this file, so we never discover that
// it is in fact abstract. The C++ standard suggests that we need to
// instantiate in all cases where abstractness could affect the validity of a
// program, but that breaks a *lot* of code, so we don't do that.
//
// FIXME: Once DR1640 is resolved, remove the check on forming an abstract
// array type entirely. The only restriction we need is that you can't create
// an object of abstract (most-derived) type.
// An abstract class shall not be used
// - as a parameter type
void ;
void ; // expected-error {{abstract class}}
void ; // expected-error {{abstract class}}
void ; // expected-error {{abstract class}}
void ; // expected-error {{abstract class}}
void ;
void ;
void ; // expected-error {{abstract class}}
void ; // expected-error {{abstract class}}
// - as a function return type
A &;
A *;
A ; // expected-error {{abstract class}}
; // expected-error {{abstract class}}
B ; // expected-error {{abstract class}}
; // expected-error {{abstract class}}
C ;
;
// - as the type of an explicit conversion
void ;
void
void ; // expected-note 2{{abstract class}}
void
;
std::initializer_list<A> ila = ; // expected-error {{abstract class}}