17121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -std=gnu++11 -fms-extensions -Wno-microsoft %s
264b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl#define T(b) (b) ? 1 : -1
364b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl#define F(b) (b) ? -1 : 1
464b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
564b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct NonPOD { NonPOD(int); };
664b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
764b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl// PODs
864b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlenum Enum { EV };
964b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct POD { Enum e; int i; float f; NonPOD* p; };
101d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct Empty {};
111d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmantypedef Empty EmptyAr[10];
1264b45f7e0d3167f040841ac2920aead7f080730dSebastian Redltypedef int Int;
1364b45f7e0d3167f040841ac2920aead7f080730dSebastian Redltypedef Int IntAr[10];
14607a1788d9529c8e8494ac528764aa2c678a1a97Sebastian Redltypedef Int IntArNB[];
1564b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlclass Statics { static int priv; static NonPOD np; };
161d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanunion EmptyUnion {};
1787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarunion IncompleteUnion;
181d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanunion Union { int i; float f; };
191d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct HasFunc { void f (); };
201d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct HasOp { void operator *(); };
211d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct HasConv { operator int(); };
221d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct HasAssign { void operator =(int); };
2364b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
242cf9d656f6283f2a8be0549da110d7cfbb1ea4b2Douglas Gregorstruct HasAnonymousUnion {
252cf9d656f6283f2a8be0549da110d7cfbb1ea4b2Douglas Gregor  union {
262cf9d656f6283f2a8be0549da110d7cfbb1ea4b2Douglas Gregor    int i;
272cf9d656f6283f2a8be0549da110d7cfbb1ea4b2Douglas Gregor    float f;
282cf9d656f6283f2a8be0549da110d7cfbb1ea4b2Douglas Gregor  };
292cf9d656f6283f2a8be0549da110d7cfbb1ea4b2Douglas Gregor};
302cf9d656f6283f2a8be0549da110d7cfbb1ea4b2Douglas Gregor
3125df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruthtypedef int Vector __attribute__((vector_size(16)));
3225df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruthtypedef int VectorExt __attribute__((ext_vector_type(4)));
3325df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruth
3464b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl// Not PODs
35607a1788d9529c8e8494ac528764aa2c678a1a97Sebastian Redltypedef const void cvoid;
3664b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct Derives : POD {};
3734eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruthtypedef Derives DerivesAr[10];
3834eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruthtypedef Derives DerivesArNB[];
391d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct DerivesEmpty : Empty {};
4064b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct HasCons { HasCons(int); };
411d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct HasCopyAssign { HasCopyAssign operator =(const HasCopyAssign&); };
427a614d8380297fcd2bc23986241905d97222948cRichard Smithstruct HasMoveAssign { HasMoveAssign operator =(const HasMoveAssign&&); };
439ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasNoThrowMoveAssign {
449ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  HasNoThrowMoveAssign& operator=(
459ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos    const HasNoThrowMoveAssign&&) throw(); };
469ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasNoExceptNoThrowMoveAssign {
479ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  HasNoExceptNoThrowMoveAssign& operator=(
489ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos    const HasNoExceptNoThrowMoveAssign&&) noexcept;
499ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos};
509ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasThrowMoveAssign {
519ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  HasThrowMoveAssign& operator=(
529ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos    const HasThrowMoveAssign&&) throw(POD); };
539ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasNoExceptFalseMoveAssign {
549ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  HasNoExceptFalseMoveAssign& operator=(
559ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos    const HasNoExceptFalseMoveAssign&&) noexcept(false); };
569ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasMoveCtor { HasMoveCtor(const HasMoveCtor&&); };
579ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasMemberMoveCtor { HasMoveCtor member; };
589ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasMemberMoveAssign { HasMoveAssign member; };
599ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasStaticMemberMoveCtor { static HasMoveCtor member; };
609ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasStaticMemberMoveAssign { static HasMoveAssign member; };
619ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasMemberThrowMoveAssign { HasThrowMoveAssign member; };
629ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasMemberNoExceptFalseMoveAssign {
639ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  HasNoExceptFalseMoveAssign member; };
649ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasMemberNoThrowMoveAssign { HasNoThrowMoveAssign member; };
659ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct HasMemberNoExceptNoThrowMoveAssign {
669ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  HasNoExceptNoThrowMoveAssign member; };
679ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
6825d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregorstruct HasDefaultTrivialCopyAssign {
699ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  HasDefaultTrivialCopyAssign &operator=(
709ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos    const HasDefaultTrivialCopyAssign&) = default;
7125d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor};
7225d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregorstruct TrivialMoveButNotCopy {
7325d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  TrivialMoveButNotCopy &operator=(TrivialMoveButNotCopy&&) = default;
7425d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  TrivialMoveButNotCopy &operator=(const TrivialMoveButNotCopy&);
7525d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor};
764ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregorstruct NonTrivialDefault {
774ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  NonTrivialDefault();
784ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor};
794ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor
8064b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct HasDest { ~HasDest(); };
8164b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlclass  HasPriv { int priv; };
8264b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlclass  HasProt { protected: int prot; };
8364b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct HasRef { int i; int& ref; HasRef() : i(0), ref(i) {} };
8464b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct HasNonPOD { NonPOD np; };
8564b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct HasVirt { virtual void Virt() {}; };
8634eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruthtypedef NonPOD NonPODAr[10];
875e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregortypedef HasVirt VirtAr[10];
8834eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruthtypedef NonPOD NonPODArNB[];
891d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanunion NonPODUnion { int i; Derives n; };
90c69f636a32485b64d571490e3980463dd7752aaaChandler Carruthstruct DerivesHasCons : HasCons {};
91c69f636a32485b64d571490e3980463dd7752aaaChandler Carruthstruct DerivesHasCopyAssign : HasCopyAssign {};
924d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruthstruct DerivesHasMoveAssign : HasMoveAssign {};
93c69f636a32485b64d571490e3980463dd7752aaaChandler Carruthstruct DerivesHasDest : HasDest {};
94c69f636a32485b64d571490e3980463dd7752aaaChandler Carruthstruct DerivesHasPriv : HasPriv {};
95c69f636a32485b64d571490e3980463dd7752aaaChandler Carruthstruct DerivesHasProt : HasProt {};
96c69f636a32485b64d571490e3980463dd7752aaaChandler Carruthstruct DerivesHasRef : HasRef {};
97c69f636a32485b64d571490e3980463dd7752aaaChandler Carruthstruct DerivesHasVirt : HasVirt {};
989ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct DerivesHasMoveCtor : HasMoveCtor {};
9964b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
100c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasNoThrowCopyAssign {
101c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  void operator =(const HasNoThrowCopyAssign&) throw();
102c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl};
103c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasMultipleCopyAssign {
104c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  void operator =(const HasMultipleCopyAssign&) throw();
105c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  void operator =(volatile HasMultipleCopyAssign&);
106c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl};
107c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasMultipleNoThrowCopyAssign {
108c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  void operator =(const HasMultipleNoThrowCopyAssign&) throw();
109c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  void operator =(volatile HasMultipleNoThrowCopyAssign&) throw();
110c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl};
111c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl
112c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasNoThrowConstructor { HasNoThrowConstructor() throw(); };
113c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasNoThrowConstructorWithArgs {
114c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  HasNoThrowConstructorWithArgs(HasCons i = HasCons(0)) throw();
115c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl};
116651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesstruct HasMultipleDefaultConstructor1 {
117651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  HasMultipleDefaultConstructor1() throw();
118651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  HasMultipleDefaultConstructor1(int i = 0);
119651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines};
120651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesstruct HasMultipleDefaultConstructor2 {
121651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  HasMultipleDefaultConstructor2(int i = 0);
122651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  HasMultipleDefaultConstructor2() throw();
123651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines};
124c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl
125c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasNoThrowCopy { HasNoThrowCopy(const HasNoThrowCopy&) throw(); };
126c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasMultipleCopy {
127c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  HasMultipleCopy(const HasMultipleCopy&) throw();
128c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  HasMultipleCopy(volatile HasMultipleCopy&);
129c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl};
130c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlstruct HasMultipleNoThrowCopy {
131c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  HasMultipleNoThrowCopy(const HasMultipleNoThrowCopy&) throw();
132c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl  HasMultipleNoThrowCopy(volatile HasMultipleNoThrowCopy&) throw();
133c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl};
134c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl
135d4b25cbde13fc973673234f26de48c940723e679Sebastian Redlstruct HasVirtDest { virtual ~HasVirtDest(); };
136d4b25cbde13fc973673234f26de48c940723e679Sebastian Redlstruct DerivedVirtDest : HasVirtDest {};
137d4b25cbde13fc973673234f26de48c940723e679Sebastian Redltypedef HasVirtDest VirtDestAr[1];
138d4b25cbde13fc973673234f26de48c940723e679Sebastian Redl
139d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregorclass AllPrivate {
140d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  AllPrivate() throw();
141d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  AllPrivate(const AllPrivate&) throw();
142d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  AllPrivate &operator=(const AllPrivate &) throw();
143d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  ~AllPrivate() throw();
144d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor};
145d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor
1464ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregorstruct ThreeArgCtor {
1474ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  ThreeArgCtor(int*, char*, int);
1484ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor};
1494ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor
150176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hinesstruct VariadicCtor {
151176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines  template<typename...T> VariadicCtor(T...);
152176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines};
153176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines
15487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarstruct ThrowingDtor {
15587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  ~ThrowingDtor() throw(int);
15687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar};
15787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
15887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarstruct NoExceptDtor {
15987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  ~NoExceptDtor() noexcept(true);
16087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar};
16187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
16287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarstruct NoThrowDtor {
16387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  ~NoThrowDtor() throw();
16487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar};
16587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
16664b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlvoid is_pod()
16764b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl{
168e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(int))]; }
169e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(Enum))]; }
170e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(POD))]; }
171e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(Int))]; }
172e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(IntAr))]; }
173e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(Statics))]; }
174e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(Empty))]; }
175e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(EmptyUnion))]; }
176e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(Union))]; }
177e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(HasFunc))]; }
178e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(HasOp))]; }
179e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(HasConv))]; }
180e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(HasAssign))]; }
181e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(IntArNB))]; }
182e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_pod(HasAnonymousUnion))]; }
18325df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruth  { int arr[T(__is_pod(Vector))]; }
18425df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruth  { int arr[T(__is_pod(VectorExt))]; }
185152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(Derives))]; }
186152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(DerivesAr))]; }
187152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(DerivesArNB))]; }
188152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(DerivesEmpty))]; }
189152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(HasPriv))]; }
190152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(HasProt))]; }
191152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(DerivesHasPriv))]; }
192152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__is_pod(DerivesHasProt))]; }
193e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
194e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(HasCons))]; }
195e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(HasCopyAssign))]; }
1964d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[F(__is_pod(HasMoveAssign))]; }
197e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(HasDest))]; }
198e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(HasRef))]; }
199e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(HasVirt))]; }
200c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_pod(DerivesHasCons))]; }
201c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_pod(DerivesHasCopyAssign))]; }
2024d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[F(__is_pod(DerivesHasMoveAssign))]; }
203c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_pod(DerivesHasDest))]; }
204c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_pod(DerivesHasRef))]; }
205c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_pod(DerivesHasVirt))]; }
20634eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__is_pod(NonPOD))]; }
20734eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__is_pod(HasNonPOD))]; }
208e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(NonPODAr))]; }
20934eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__is_pod(NonPODArNB))]; }
210e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(void))]; }
211e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_pod(cvoid))]; }
212e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth// { int arr[F(__is_pod(NonPODUnion))]; }
2131d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedman}
2141d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedman
2151d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmantypedef Empty EmptyAr[10];
2161d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct Bit0 { int : 0; };
2171d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct Bit0Cons { int : 0; Bit0Cons(); };
2181d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanstruct BitOnly { int x : 3; };
2199ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct DerivesVirt : virtual POD {};
2201d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedman
2211d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmanvoid is_empty()
2221d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedman{
223e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(Empty))]; }
224e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(DerivesEmpty))]; }
225e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(HasCons))]; }
226e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(HasCopyAssign))]; }
2274d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__is_empty(HasMoveAssign))]; }
228e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(HasDest))]; }
229e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(HasFunc))]; }
230e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(HasOp))]; }
231e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(HasConv))]; }
232e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(HasAssign))]; }
233e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(Bit0))]; }
234e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_empty(Bit0Cons))]; }
235e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
236e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(Int))]; }
237e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(POD))]; }
238e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(EmptyUnion))]; }
23987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_empty(IncompleteUnion))]; }
240e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(EmptyAr))]; }
241e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(HasRef))]; }
242e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(HasVirt))]; }
243e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(BitOnly))]; }
244e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(void))]; }
245e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(IntArNB))]; }
246e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_empty(HasAnonymousUnion))]; }
247e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth//  { int arr[F(__is_empty(DerivesVirt))]; }
24864b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl}
24964b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
25064b45f7e0d3167f040841ac2920aead7f080730dSebastian Redltypedef Derives ClassType;
25164b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
25264b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlvoid is_class()
25364b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl{
254e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_class(Derives))]; }
255e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_class(HasPriv))]; }
256e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_class(ClassType))]; }
257e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_class(HasAnonymousUnion))]; }
258e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
259e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_class(int))]; }
260e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_class(Enum))]; }
261e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_class(Int))]; }
262e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_class(IntAr))]; }
26334eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__is_class(DerivesAr))]; }
264e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_class(Union))]; }
265e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_class(cvoid))]; }
266e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_class(IntArNB))]; }
26764b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl}
26864b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
26964b45f7e0d3167f040841ac2920aead7f080730dSebastian Redltypedef Union UnionAr[10];
27064b45f7e0d3167f040841ac2920aead7f080730dSebastian Redltypedef Union UnionType;
27164b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
27264b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlvoid is_union()
27364b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl{
274e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_union(Union))]; }
275e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_union(UnionType))]; }
276e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
277e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(int))]; }
278e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(Enum))]; }
279e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(Int))]; }
280e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(IntAr))]; }
281e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(UnionAr))]; }
282e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(cvoid))]; }
283e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(IntArNB))]; }
284e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_union(HasAnonymousUnion))]; }
28564b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl}
28664b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
28764b45f7e0d3167f040841ac2920aead7f080730dSebastian Redltypedef Enum EnumType;
28864b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
28964b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlvoid is_enum()
29064b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl{
291e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_enum(Enum))]; }
292e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_enum(EnumType))]; }
293e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
294e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(int))]; }
295e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(Union))]; }
296e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(Int))]; }
297e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(IntAr))]; }
298e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(UnionAr))]; }
299e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(Derives))]; }
300e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(ClassType))]; }
301e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(cvoid))]; }
302e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(IntArNB))]; }
303e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_enum(HasAnonymousUnion))]; }
30464b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl}
30564b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
3065e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregorstruct FinalClass final {
3075e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor};
3085e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor
3095e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregortemplate<typename T>
3105e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregorstruct PotentiallyFinal { };
3115e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor
3125e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregortemplate<typename T>
3135e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregorstruct PotentiallyFinal<T*> final { };
3145e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor
3155e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregortemplate<>
3165e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregorstruct PotentiallyFinal<int> final { };
3175e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor
31887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarstruct SealedClass sealed {
31987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar};
32087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
32187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainartemplate<typename T>
32287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarstruct PotentiallySealed { };
32387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
32487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainartemplate<typename T>
32587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarstruct PotentiallySealed<T*> sealed { };
32687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
32787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainartemplate<>
32887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarstruct PotentiallySealed<int> sealed { };
32987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
3305e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregorvoid is_final()
3315e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor{
33287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[T(__is_final(SealedClass))]; }
33387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[T(__is_final(PotentiallySealed<float*>))]; }
33487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[T(__is_final(PotentiallySealed<int>))]; }
3355e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[T(__is_final(FinalClass))]; }
3365e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[T(__is_final(PotentiallyFinal<float*>))]; }
3375e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[T(__is_final(PotentiallyFinal<int>))]; }
3385e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor
3395e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(int))]; }
3405e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(Union))]; }
3415e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(Int))]; }
3425e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(IntAr))]; }
3435e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(UnionAr))]; }
3445e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(Derives))]; }
3455e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(ClassType))]; }
3465e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(cvoid))]; }
3475e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(IntArNB))]; }
3485e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(HasAnonymousUnion))]; }
3495e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor	{ int arr[F(__is_final(PotentiallyFinal<float>))]; }
35087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[F(__is_final(PotentiallySealed<float>))]; }
3515e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor}
3525e9392ba18f5925e26cc5714d1412eda0d219826Douglas Gregor
3537121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemervoid is_sealed()
3547121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer{
3557121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[T(__is_sealed(SealedClass))]; }
3567121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[T(__is_sealed(PotentiallySealed<float*>))]; }
3577121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[T(__is_sealed(PotentiallySealed<int>))]; }
35887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[T(__is_sealed(FinalClass))]; }
35987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[T(__is_sealed(PotentiallyFinal<float*>))]; }
36087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[T(__is_sealed(PotentiallyFinal<int>))]; }
3617121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer
3627121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(int))]; }
3637121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(Union))]; }
3647121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(Int))]; }
3657121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(IntAr))]; }
3667121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(UnionAr))]; }
3677121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(Derives))]; }
3687121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(ClassType))]; }
3697121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(cvoid))]; }
3707121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(IntArNB))]; }
3717121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(HasAnonymousUnion))]; }
3727121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer	{ int arr[F(__is_sealed(PotentiallyFinal<float>))]; }
37387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar	{ int arr[F(__is_sealed(PotentiallySealed<float>))]; }
3747121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer}
3757121bdb91b86f6053765bda18dd0a8a118929aceDavid Majnemer
3761d954f6a0057cb55a3a5d483904a3c57d03c996fEli Friedmantypedef HasVirt Polymorph;
37764b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlstruct InheritPolymorph : Polymorph {};
37864b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl
37964b45f7e0d3167f040841ac2920aead7f080730dSebastian Redlvoid is_polymorphic()
38064b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl{
381e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_polymorphic(Polymorph))]; }
382e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_polymorphic(InheritPolymorph))]; }
383e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
384e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(int))]; }
385e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(Union))]; }
38687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_polymorphic(IncompleteUnion))]; }
387e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(Int))]; }
388e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(IntAr))]; }
389e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(UnionAr))]; }
390e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(Derives))]; }
391e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(ClassType))]; }
392e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(Enum))]; }
393e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(cvoid))]; }
394e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_polymorphic(IntArNB))]; }
39564b45f7e0d3167f040841ac2920aead7f080730dSebastian Redl}
3965e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor
39720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_integral()
39820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
39920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_integral(bool))];
40020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_integral(char))];
40120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_integral(signed char))];
40220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_integral(unsigned char))];
40320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t05[T(__is_integral(char16_t))];
40420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t06[T(__is_integral(char32_t))];
40520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_integral(wchar_t))];
40620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_integral(short))];
40720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t09[T(__is_integral(unsigned short))];
40820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[T(__is_integral(int))];
40920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_integral(unsigned int))];
41020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_integral(long))];
41120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_integral(unsigned long))];
41220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
41320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_integral(float))];
41420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_integral(double))];
41520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_integral(long double))];
41620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_integral(Union))];
41720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_integral(UnionAr))];
41820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_integral(Derives))];
41920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_integral(ClassType))];
42020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_integral(Enum))];
42120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_integral(void))];
42220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_integral(cvoid))];
42320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_integral(IntArNB))];
42420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
42520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
42620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_floating_point()
42720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
42820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_floating_point(float))];
42920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_floating_point(double))];
43020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_floating_point(long double))];
43120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
43220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_floating_point(bool))];
43320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_floating_point(char))];
43420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_floating_point(signed char))];
43520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_floating_point(unsigned char))];
43620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t15[F(__is_floating_point(char16_t))];
43720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t16[F(__is_floating_point(char32_t))];
43820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_floating_point(wchar_t))];
43920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_floating_point(short))];
44020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_floating_point(unsigned short))];
44120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_floating_point(int))];
44220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_floating_point(unsigned int))];
44320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_floating_point(long))];
44420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_floating_point(unsigned long))];
44520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_floating_point(Union))];
44620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_floating_point(UnionAr))];
44720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_floating_point(Derives))];
44820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_floating_point(ClassType))];
44920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_floating_point(Enum))];
45020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_floating_point(void))];
45120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_floating_point(cvoid))];
45220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_floating_point(IntArNB))];
45320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
45420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
45520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_arithmetic()
45620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
45720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_arithmetic(float))];
45820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_arithmetic(double))];
45920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_arithmetic(long double))];
46020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_arithmetic(bool))];
46120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_arithmetic(char))];
46220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_arithmetic(signed char))];
46320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_arithmetic(unsigned char))];
46420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t15[T(__is_arithmetic(char16_t))];
46520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t16[T(__is_arithmetic(char32_t))];
46620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[T(__is_arithmetic(wchar_t))];
46720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[T(__is_arithmetic(short))];
46820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[T(__is_arithmetic(unsigned short))];
46920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[T(__is_arithmetic(int))];
47020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[T(__is_arithmetic(unsigned int))];
47120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[T(__is_arithmetic(long))];
47220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[T(__is_arithmetic(unsigned long))];
47320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
47420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_arithmetic(Union))];
47520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_arithmetic(UnionAr))];
47620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_arithmetic(Derives))];
47720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_arithmetic(ClassType))];
47820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_arithmetic(Enum))];
47920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_arithmetic(void))];
48020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_arithmetic(cvoid))];
48120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_arithmetic(IntArNB))];
48220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
48320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
48420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct ACompleteType {};
48520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct AnIncompleteType;
48620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
48720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_complete_type()
48820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
48920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_complete_type(float))];
49020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_complete_type(double))];
49120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_complete_type(long double))];
49220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_complete_type(bool))];
49320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_complete_type(char))];
49420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_complete_type(signed char))];
49520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_complete_type(unsigned char))];
49620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t15[T(__is_complete_type(char16_t))];
49720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t16[T(__is_complete_type(char32_t))];
49820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[T(__is_complete_type(wchar_t))];
49920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[T(__is_complete_type(short))];
50020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[T(__is_complete_type(unsigned short))];
50120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[T(__is_complete_type(int))];
50220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[T(__is_complete_type(unsigned int))];
50320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[T(__is_complete_type(long))];
50420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[T(__is_complete_type(unsigned long))];
50520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[T(__is_complete_type(ACompleteType))];
50620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
50720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_complete_type(AnIncompleteType))];
50820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
50920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
51020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_void()
51120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
51220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_void(void))];
51320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_void(cvoid))];
51420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
51520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_void(float))];
51620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_void(double))];
51720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_void(long double))];
51820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_void(bool))];
51920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_void(char))];
52020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_void(signed char))];
52120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_void(unsigned char))];
52220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_void(wchar_t))];
52320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_void(short))];
52420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_void(unsigned short))];
52520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_void(int))];
52620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_void(unsigned int))];
52720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_void(long))];
52820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_void(unsigned long))];
52920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_void(Union))];
53020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_void(UnionAr))];
53120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_void(Derives))];
53220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_void(ClassType))];
53320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_void(Enum))];
53420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_void(IntArNB))];
53520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_void(void*))];
53620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_void(cvoid*))];
53720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
53820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
53920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_array()
54020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
54120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_array(IntAr))];
54220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_array(IntArNB))];
54320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_array(UnionAr))];
54420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
54520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_array(void))];
54620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_array(cvoid))];
54720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_array(float))];
54820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_array(double))];
54920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_array(long double))];
55020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_array(bool))];
55120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_array(char))];
55220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_array(signed char))];
55320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_array(unsigned char))];
55420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_array(wchar_t))];
55520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_array(short))];
55620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_array(unsigned short))];
55720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_array(int))];
55820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_array(unsigned int))];
55920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_array(long))];
56020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_array(unsigned long))];
56120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_array(Union))];
56220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_array(Derives))];
56320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_array(ClassType))];
56420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_array(Enum))];
56520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_array(void*))];
56620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_array(cvoid*))];
56720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
56820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
56920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleytemplate <typename T> void tmpl_func(T&) {}
57020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
57120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleytemplate <typename T> struct type_wrapper {
57220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef T type;
57320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef T* ptrtype;
57420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef T& reftype;
57520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
57620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
57720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_function()
57820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
57920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_function(type_wrapper<void(void)>::type))];
58020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_function(typeof(tmpl_func<int>)))];
58120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
58220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef void (*ptr_to_func_type)(void);
58320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
58420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_function(void))];
58520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_function(cvoid))];
58620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_function(float))];
58720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_function(double))];
58820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_function(long double))];
58920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_function(bool))];
59020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_function(char))];
59120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_function(signed char))];
59220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_function(unsigned char))];
59320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_function(wchar_t))];
59420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_function(short))];
59520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_function(unsigned short))];
59620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_function(int))];
59720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_function(unsigned int))];
59820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_function(long))];
59920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_function(unsigned long))];
60020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_function(Union))];
60120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_function(Derives))];
60220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_function(ClassType))];
60320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_function(Enum))];
60420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_function(void*))];
60520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_function(cvoid*))];
60620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_function(void(*)()))];
60720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_function(ptr_to_func_type))];
60820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_function(type_wrapper<void(void)>::ptrtype))];
60920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_function(type_wrapper<void(void)>::reftype))];
61020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
61120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
61220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_reference()
61320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
61420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_reference(int&))];
61520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_reference(const int&))];
61620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_reference(void *&))];
61720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
61820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_reference(int))];
61920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_reference(const int))];
62020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_reference(void *))];
62120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
62220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
62320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_lvalue_reference()
62420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
62520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_lvalue_reference(int&))];
62620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_lvalue_reference(void *&))];
62720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_lvalue_reference(const int&))];
62820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_lvalue_reference(void * const &))];
62920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
63020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_lvalue_reference(int))];
63120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_lvalue_reference(const int))];
63220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_lvalue_reference(void *))];
63320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
63420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
63520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley#if __has_feature(cxx_rvalue_references)
63620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
63720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_rvalue_reference()
63820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
63920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_rvalue_reference(const int&&))];
64020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_rvalue_reference(void * const &&))];
64120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
64220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_rvalue_reference(int&))];
64320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_rvalue_reference(void *&))];
64420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_rvalue_reference(const int&))];
64520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_rvalue_reference(void * const &))];
64620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_rvalue_reference(int))];
64720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_rvalue_reference(const int))];
64820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_rvalue_reference(void *))];
64920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
65020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
65120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley#endif
65220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
65320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_fundamental()
65420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
65520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_fundamental(float))];
65620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_fundamental(double))];
65720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_fundamental(long double))];
65820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_fundamental(bool))];
65920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_fundamental(char))];
66020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_fundamental(signed char))];
66120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_fundamental(unsigned char))];
66220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t15[T(__is_fundamental(char16_t))];
66320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t16[T(__is_fundamental(char32_t))];
66420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[T(__is_fundamental(wchar_t))];
66520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[T(__is_fundamental(short))];
66620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[T(__is_fundamental(unsigned short))];
66720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[T(__is_fundamental(int))];
66820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[T(__is_fundamental(unsigned int))];
66920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[T(__is_fundamental(long))];
67020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[T(__is_fundamental(unsigned long))];
67120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[T(__is_fundamental(void))];
67220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[T(__is_fundamental(cvoid))];
67320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
67420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_fundamental(Union))];
67520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_fundamental(UnionAr))];
67620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_fundamental(Derives))];
67720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_fundamental(ClassType))];
67820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_fundamental(Enum))];
67920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_fundamental(IntArNB))];
68020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
68120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
68220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_object()
68320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
68420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_object(int))];
68520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_object(int *))];
68620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_object(void *))];
68720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_object(Union))];
68820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_object(UnionAr))];
68920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_object(ClassType))];
69020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_object(Enum))];
69120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
69220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_object(type_wrapper<void(void)>::type))];
69320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_object(int&))];
69420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_object(void))];
69520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
69620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
69720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_scalar()
69820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
69920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_scalar(float))];
70020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_scalar(double))];
70120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_scalar(long double))];
70220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_scalar(bool))];
70320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_scalar(char))];
70420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_scalar(signed char))];
70520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_scalar(unsigned char))];
70620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_scalar(wchar_t))];
70720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t09[T(__is_scalar(short))];
70820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[T(__is_scalar(unsigned short))];
70920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_scalar(int))];
71020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_scalar(unsigned int))];
71120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_scalar(long))];
71220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_scalar(unsigned long))];
71320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[T(__is_scalar(Enum))];
71420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[T(__is_scalar(void*))];
71520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[T(__is_scalar(cvoid*))];
71620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
71720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_scalar(void))];
71820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_scalar(cvoid))];
71920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_scalar(Union))];
72020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_scalar(UnionAr))];
72120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_scalar(Derives))];
72220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_scalar(ClassType))];
72320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_scalar(IntArNB))];
72420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
72520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
72620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct StructWithMembers {
72720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int member;
72820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  void method() {}
72920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
73020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
73120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_compound()
73220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
73320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_compound(void*))];
73420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_compound(cvoid*))];
73520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_compound(void (*)()))];
73620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_compound(int StructWithMembers::*))];
73720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_compound(void (StructWithMembers::*)()))];
73820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_compound(int&))];
73920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_compound(Union))];
74020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_compound(UnionAr))];
74120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t09[T(__is_compound(Derives))];
74220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[T(__is_compound(ClassType))];
74320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_compound(IntArNB))];
74420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_compound(Enum))];
74520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
74620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_compound(float))];
74720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_compound(double))];
74820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_compound(long double))];
74920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_compound(bool))];
75020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_compound(char))];
75120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_compound(signed char))];
75220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_compound(unsigned char))];
75320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_compound(wchar_t))];
75420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_compound(short))];
75520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_compound(unsigned short))];
75620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_compound(int))];
75720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_compound(unsigned int))];
75820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_compound(long))];
75920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_compound(unsigned long))];
76020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_compound(void))];
76120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_compound(cvoid))];
76220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
76320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
76420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_pointer()
76520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
76620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  StructWithMembers x;
76720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
76820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_pointer(void*))];
76920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_pointer(cvoid*))];
77020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_pointer(cvoid*))];
77120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_pointer(char*))];
77220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_pointer(int*))];
77320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_pointer(int**))];
77420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_pointer(ClassType*))];
77520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_pointer(Derives*))];
77620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t09[T(__is_pointer(Enum*))];
77720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[T(__is_pointer(IntArNB*))];
77820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_pointer(Union*))];
77920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_pointer(UnionAr*))];
78020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_pointer(StructWithMembers*))];
78120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_pointer(void (*)()))];
78220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
78320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_pointer(void))];
78420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_pointer(cvoid))];
78520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_pointer(cvoid))];
78620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_pointer(char))];
78720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_pointer(int))];
78820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_pointer(int))];
78920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_pointer(ClassType))];
79020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_pointer(Derives))];
79120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_pointer(Enum))];
79220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_pointer(IntArNB))];
79320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_pointer(Union))];
79420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_pointer(UnionAr))];
79520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_pointer(StructWithMembers))];
79620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_pointer(int StructWithMembers::*))];
79720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_pointer(void (StructWithMembers::*) ()))];
79820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
79920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
80020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_member_object_pointer()
80120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
80220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  StructWithMembers x;
80320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
80420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_member_object_pointer(int StructWithMembers::*))];
80520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
80620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_member_object_pointer(void (StructWithMembers::*) ()))];
80720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_member_object_pointer(void*))];
80820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_member_object_pointer(cvoid*))];
80920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_member_object_pointer(cvoid*))];
81020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_member_object_pointer(char*))];
81120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_member_object_pointer(int*))];
81220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_member_object_pointer(int**))];
81320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_member_object_pointer(ClassType*))];
81420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_member_object_pointer(Derives*))];
81520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_member_object_pointer(Enum*))];
81620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_member_object_pointer(IntArNB*))];
81720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_member_object_pointer(Union*))];
81820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_member_object_pointer(UnionAr*))];
81920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_member_object_pointer(StructWithMembers*))];
82020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_member_object_pointer(void))];
82120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_member_object_pointer(cvoid))];
82220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_member_object_pointer(cvoid))];
82320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_member_object_pointer(char))];
82420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_member_object_pointer(int))];
82520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_member_object_pointer(int))];
82620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_member_object_pointer(ClassType))];
82720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_member_object_pointer(Derives))];
82820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_member_object_pointer(Enum))];
82920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_member_object_pointer(IntArNB))];
83020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_member_object_pointer(Union))];
83120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_member_object_pointer(UnionAr))];
83220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t36[F(__is_member_object_pointer(StructWithMembers))];
83320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t37[F(__is_member_object_pointer(void (*)()))];
83420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
83520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
83620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_member_function_pointer()
83720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
83820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  StructWithMembers x;
83920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
84020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_member_function_pointer(void (StructWithMembers::*) ()))];
84120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
84220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_member_function_pointer(int StructWithMembers::*))];
84320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_member_function_pointer(void*))];
84420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_member_function_pointer(cvoid*))];
84520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_member_function_pointer(cvoid*))];
84620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_member_function_pointer(char*))];
84720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_member_function_pointer(int*))];
84820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_member_function_pointer(int**))];
84920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_member_function_pointer(ClassType*))];
85020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_member_function_pointer(Derives*))];
85120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_member_function_pointer(Enum*))];
85220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_member_function_pointer(IntArNB*))];
85320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_member_function_pointer(Union*))];
85420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_member_function_pointer(UnionAr*))];
85520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_member_function_pointer(StructWithMembers*))];
85620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_member_function_pointer(void))];
85720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_member_function_pointer(cvoid))];
85820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_member_function_pointer(cvoid))];
85920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_member_function_pointer(char))];
86020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_member_function_pointer(int))];
86120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_member_function_pointer(int))];
86220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_member_function_pointer(ClassType))];
86320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_member_function_pointer(Derives))];
86420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_member_function_pointer(Enum))];
86520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_member_function_pointer(IntArNB))];
86620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_member_function_pointer(Union))];
86720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_member_function_pointer(UnionAr))];
86820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t36[F(__is_member_function_pointer(StructWithMembers))];
86920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t37[F(__is_member_function_pointer(void (*)()))];
87020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
87120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
87220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_member_pointer()
87320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
87420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  StructWithMembers x;
87520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
87620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_member_pointer(int StructWithMembers::*))];
87720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_member_pointer(void (StructWithMembers::*) ()))];
87820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
87920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_member_pointer(void*))];
88020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_member_pointer(cvoid*))];
88120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_member_pointer(cvoid*))];
88220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_member_pointer(char*))];
88320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_member_pointer(int*))];
88420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_member_pointer(int**))];
88520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_member_pointer(ClassType*))];
88620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_member_pointer(Derives*))];
88720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_member_pointer(Enum*))];
88820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_member_pointer(IntArNB*))];
88920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_member_pointer(Union*))];
89020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_member_pointer(UnionAr*))];
89120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_member_pointer(StructWithMembers*))];
89220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_member_pointer(void))];
89320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_member_pointer(cvoid))];
89420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_member_pointer(cvoid))];
89520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_member_pointer(char))];
89620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t27[F(__is_member_pointer(int))];
89720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t28[F(__is_member_pointer(int))];
89820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t29[F(__is_member_pointer(ClassType))];
89920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_member_pointer(Derives))];
90020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_member_pointer(Enum))];
90120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_member_pointer(IntArNB))];
90220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_member_pointer(Union))];
90320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_member_pointer(UnionAr))];
90420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_member_pointer(StructWithMembers))];
90520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t36[F(__is_member_pointer(void (*)()))];
90620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
90720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
90820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_const()
90920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
91020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_const(cvoid))];
91120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_const(const char))];
91220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_const(const int))];
91320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_const(const long))];
91420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_const(const short))];
91520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_const(const signed char))];
91620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_const(const wchar_t))];
91720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_const(const bool))];
91820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t09[T(__is_const(const float))];
91920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[T(__is_const(const double))];
92020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_const(const long double))];
92120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_const(const unsigned char))];
92220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_const(const unsigned int))];
92320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_const(const unsigned long long))];
92420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[T(__is_const(const unsigned long))];
92520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[T(__is_const(const unsigned short))];
92620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[T(__is_const(const void))];
92720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[T(__is_const(const ClassType))];
92820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[T(__is_const(const Derives))];
92920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[T(__is_const(const Enum))];
93020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[T(__is_const(const IntArNB))];
93120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[T(__is_const(const Union))];
93220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[T(__is_const(const UnionAr))];
93320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
93420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_const(char))];
93520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_const(int))];
93620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_const(long))];
93720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_const(short))];
93820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_const(signed char))];
93920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_const(wchar_t))];
94020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t36[F(__is_const(bool))];
94120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t37[F(__is_const(float))];
94220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t38[F(__is_const(double))];
94320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t39[F(__is_const(long double))];
94420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t40[F(__is_const(unsigned char))];
94520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t41[F(__is_const(unsigned int))];
94620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t42[F(__is_const(unsigned long long))];
94720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t43[F(__is_const(unsigned long))];
94820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t44[F(__is_const(unsigned short))];
94920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t45[F(__is_const(void))];
95020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t46[F(__is_const(ClassType))];
95120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t47[F(__is_const(Derives))];
95220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t48[F(__is_const(Enum))];
95320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t49[F(__is_const(IntArNB))];
95420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t50[F(__is_const(Union))];
95520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t51[F(__is_const(UnionAr))];
95620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
95720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
95820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_volatile()
95920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
96020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_volatile(volatile char))];
96120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_volatile(volatile int))];
96220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_volatile(volatile long))];
96320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_volatile(volatile short))];
96420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_volatile(volatile signed char))];
96520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_volatile(volatile wchar_t))];
96620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_volatile(volatile bool))];
96720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t09[T(__is_volatile(volatile float))];
96820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[T(__is_volatile(volatile double))];
96920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_volatile(volatile long double))];
97020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_volatile(volatile unsigned char))];
97120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_volatile(volatile unsigned int))];
97220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_volatile(volatile unsigned long long))];
97320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[T(__is_volatile(volatile unsigned long))];
97420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[T(__is_volatile(volatile unsigned short))];
97520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[T(__is_volatile(volatile void))];
97620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[T(__is_volatile(volatile ClassType))];
97720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[T(__is_volatile(volatile Derives))];
97820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[T(__is_volatile(volatile Enum))];
97920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[T(__is_volatile(volatile IntArNB))];
98020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[T(__is_volatile(volatile Union))];
98120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[T(__is_volatile(volatile UnionAr))];
98220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
98320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_volatile(char))];
98420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_volatile(int))];
98520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t32[F(__is_volatile(long))];
98620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t33[F(__is_volatile(short))];
98720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t34[F(__is_volatile(signed char))];
98820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t35[F(__is_volatile(wchar_t))];
98920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t36[F(__is_volatile(bool))];
99020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t37[F(__is_volatile(float))];
99120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t38[F(__is_volatile(double))];
99220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t39[F(__is_volatile(long double))];
99320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t40[F(__is_volatile(unsigned char))];
99420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t41[F(__is_volatile(unsigned int))];
99520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t42[F(__is_volatile(unsigned long long))];
99620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t43[F(__is_volatile(unsigned long))];
99720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t44[F(__is_volatile(unsigned short))];
99820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t45[F(__is_volatile(void))];
99920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t46[F(__is_volatile(ClassType))];
100020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t47[F(__is_volatile(Derives))];
100120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t48[F(__is_volatile(Enum))];
100220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t49[F(__is_volatile(IntArNB))];
100320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t50[F(__is_volatile(Union))];
100420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t51[F(__is_volatile(UnionAr))];
100520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
100620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
100720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct TrivialStruct {
100820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int member;
100920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
101020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
101120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct NonTrivialStruct {
101220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int member;
101320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  NonTrivialStruct() {
101420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley    member = 0;
101520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  }
101620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
101720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
1018feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Huntstruct SuperNonTrivialStruct {
1019feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  SuperNonTrivialStruct() { }
1020feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  ~SuperNonTrivialStruct() { }
1021feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt};
1022feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt
1023feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Huntstruct NonTCStruct {
1024feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  NonTCStruct(const NonTCStruct&) {}
1025feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt};
1026feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt
1027e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smithstruct AllDefaulted {
1028e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDefaulted() = default;
1029e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDefaulted(const AllDefaulted &) = default;
1030e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDefaulted(AllDefaulted &&) = default;
1031e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDefaulted &operator=(const AllDefaulted &) = default;
1032e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDefaulted &operator=(AllDefaulted &&) = default;
1033e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ~AllDefaulted() = default;
1034e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith};
1035e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith
10369ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct NoDefaultMoveAssignDueToUDCopyCtor {
10379ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  NoDefaultMoveAssignDueToUDCopyCtor(const NoDefaultMoveAssignDueToUDCopyCtor&);
10389ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos};
10399ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
10409ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct NoDefaultMoveAssignDueToUDCopyAssign {
10419ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  NoDefaultMoveAssignDueToUDCopyAssign& operator=(
10429ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos    const NoDefaultMoveAssignDueToUDCopyAssign&);
10439ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos};
10449ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
10459ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosstruct NoDefaultMoveAssignDueToDtor {
10469ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  ~NoDefaultMoveAssignDueToDtor();
10479ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos};
10489ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
1049e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smithstruct AllDeleted {
1050e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDeleted() = delete;
1051e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDeleted(const AllDeleted &) = delete;
1052e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDeleted(AllDeleted &&) = delete;
1053e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDeleted &operator=(const AllDeleted &) = delete;
1054e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  AllDeleted &operator=(AllDeleted &&) = delete;
1055e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ~AllDeleted() = delete;
1056e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith};
1057e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith
1058e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smithstruct ExtDefaulted {
1059e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ExtDefaulted();
1060e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ExtDefaulted(const ExtDefaulted &);
1061e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ExtDefaulted(ExtDefaulted &&);
1062e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ExtDefaulted &operator=(const ExtDefaulted &);
1063e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ExtDefaulted &operator=(ExtDefaulted &&);
1064e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  ~ExtDefaulted();
1065e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith};
1066e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith
1067e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith// Despite being defaulted, these functions are not trivial.
1068e653ba2f3b6d993b5d410554c12416c03ec7775bRichard SmithExtDefaulted::ExtDefaulted() = default;
1069e653ba2f3b6d993b5d410554c12416c03ec7775bRichard SmithExtDefaulted::ExtDefaulted(const ExtDefaulted &) = default;
1070e653ba2f3b6d993b5d410554c12416c03ec7775bRichard SmithExtDefaulted::ExtDefaulted(ExtDefaulted &&) = default;
1071e653ba2f3b6d993b5d410554c12416c03ec7775bRichard SmithExtDefaulted &ExtDefaulted::operator=(const ExtDefaulted &) = default;
1072e653ba2f3b6d993b5d410554c12416c03ec7775bRichard SmithExtDefaulted &ExtDefaulted::operator=(ExtDefaulted &&) = default;
1073e653ba2f3b6d993b5d410554c12416c03ec7775bRichard SmithExtDefaulted::~ExtDefaulted() = default;
1074e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith
107520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_trivial2()
107620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
107720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_trivial(char))];
107820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_trivial(int))];
107920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_trivial(long))];
108020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_trivial(short))];
108120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_trivial(signed char))];
108220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_trivial(wchar_t))];
108320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_trivial(bool))];
108420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_trivial(float))];
108520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t09[T(__is_trivial(double))];
108620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[T(__is_trivial(long double))];
108720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[T(__is_trivial(unsigned char))];
108820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[T(__is_trivial(unsigned int))];
108920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[T(__is_trivial(unsigned long long))];
109020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[T(__is_trivial(unsigned long))];
109120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[T(__is_trivial(unsigned short))];
109220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[T(__is_trivial(ClassType))];
109320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[T(__is_trivial(Derives))];
109420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[T(__is_trivial(Enum))];
109520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[T(__is_trivial(IntAr))];
109620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[T(__is_trivial(Union))];
109720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[T(__is_trivial(UnionAr))];
109820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[T(__is_trivial(TrivialStruct))];
1099e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t23[T(__is_trivial(AllDefaulted))];
1100e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t24[T(__is_trivial(AllDeleted))];
110120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
110220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t30[F(__is_trivial(void))];
110320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t31[F(__is_trivial(NonTrivialStruct))];
1104feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t32[F(__is_trivial(SuperNonTrivialStruct))];
1105feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t33[F(__is_trivial(NonTCStruct))];
1106e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t34[F(__is_trivial(ExtDefaulted))];
1107feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt}
1108feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt
1109feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Huntvoid is_trivially_copyable2()
1110feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt{
1111feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t01[T(__is_trivially_copyable(char))];
1112feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t02[T(__is_trivially_copyable(int))];
1113feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t03[T(__is_trivially_copyable(long))];
1114feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t04[T(__is_trivially_copyable(short))];
1115feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t05[T(__is_trivially_copyable(signed char))];
1116feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t06[T(__is_trivially_copyable(wchar_t))];
1117feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t07[T(__is_trivially_copyable(bool))];
1118feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t08[T(__is_trivially_copyable(float))];
1119feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t09[T(__is_trivially_copyable(double))];
1120feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t10[T(__is_trivially_copyable(long double))];
1121feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t11[T(__is_trivially_copyable(unsigned char))];
1122feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t12[T(__is_trivially_copyable(unsigned int))];
1123feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t13[T(__is_trivially_copyable(unsigned long long))];
1124feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t14[T(__is_trivially_copyable(unsigned long))];
1125feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t15[T(__is_trivially_copyable(unsigned short))];
1126feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t16[T(__is_trivially_copyable(ClassType))];
1127feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t17[T(__is_trivially_copyable(Derives))];
1128feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t18[T(__is_trivially_copyable(Enum))];
1129feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t19[T(__is_trivially_copyable(IntAr))];
1130feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t20[T(__is_trivially_copyable(Union))];
1131feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t21[T(__is_trivially_copyable(UnionAr))];
1132feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t22[T(__is_trivially_copyable(TrivialStruct))];
1133feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t23[T(__is_trivially_copyable(NonTrivialStruct))];
1134e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t24[T(__is_trivially_copyable(AllDefaulted))];
1135e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t25[T(__is_trivially_copyable(AllDeleted))];
1136feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt
1137feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  int t30[F(__is_trivially_copyable(void))];
1138e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t31[F(__is_trivially_copyable(SuperNonTrivialStruct))];
1139e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t32[F(__is_trivially_copyable(NonTCStruct))];
1140e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  int t33[F(__is_trivially_copyable(ExtDefaulted))];
1141a3d727ba775eaecd4fd69e1c90b81732394716a6Eli Friedman
1142a3d727ba775eaecd4fd69e1c90b81732394716a6Eli Friedman  int t34[T(__is_trivially_copyable(const int))];
1143a3d727ba775eaecd4fd69e1c90b81732394716a6Eli Friedman  int t35[F(__is_trivially_copyable(volatile int))];
114420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
114520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
114620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CStruct {
114720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int one;
114820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int two;
114920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
115020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
115120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CEmptyStruct {};
115220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
115320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppEmptyStruct : CStruct {};
115420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructStandard : CEmptyStruct {
115520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int three;
115620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int four;
115720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
115820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructNonStandardByBase : CStruct {
115920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int three;
116020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int four;
116120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
116220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructNonStandardByVirt : CStruct {
116320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  virtual void method() {}
116420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
116520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructNonStandardByMemb : CStruct {
116620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  CppStructNonStandardByVirt member;
116720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
116820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructNonStandardByProt : CStruct {
116920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int five;
117020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyprotected:
117120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int six;
117220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
117320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructNonStandardByVirtBase : virtual CStruct {
117420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
117520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructNonStandardBySameBase : CEmptyStruct {
117620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  CEmptyStruct member;
117720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
117820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct CppStructNonStandardBy2ndVirtBase : CEmptyStruct {
117920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  CEmptyStruct member;
118020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
118120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
118220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_standard_layout()
118320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
118420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef const int ConstInt;
118520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef ConstInt ConstIntAr[4];
118620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef CppStructStandard CppStructStandardAr[4];
118720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
118820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_standard_layout(int))];
118920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_standard_layout(ConstInt))];
119020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_standard_layout(ConstIntAr))];
119120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_standard_layout(CStruct))];
119220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_standard_layout(CppStructStandard))];
119320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_standard_layout(CppStructStandardAr))];
119425df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruth  int t07[T(__is_standard_layout(Vector))];
119525df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruth  int t08[T(__is_standard_layout(VectorExt))];
119620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
119720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  typedef CppStructNonStandardByBase CppStructNonStandardByBaseAr[4];
119820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
119920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_standard_layout(CppStructNonStandardByVirt))];
120020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_standard_layout(CppStructNonStandardByMemb))];
120120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_standard_layout(CppStructNonStandardByProt))];
120220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_standard_layout(CppStructNonStandardByVirtBase))];
120320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_standard_layout(CppStructNonStandardByBase))];
120420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_standard_layout(CppStructNonStandardByBaseAr))];
120520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_standard_layout(CppStructNonStandardBySameBase))];
120620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_standard_layout(CppStructNonStandardBy2ndVirtBase))];
120720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
120820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
120920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_signed()
121020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
121120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  //int t01[T(__is_signed(char))];
121220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_signed(int))];
121320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_signed(long))];
121420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_signed(short))];
121520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_signed(signed char))];
121620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_signed(wchar_t))];
121720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
121820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_signed(bool))];
121920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_signed(cvoid))];
122020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_signed(float))];
122120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_signed(double))];
122220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_signed(long double))];
122320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t15[F(__is_signed(unsigned char))];
122420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_signed(unsigned int))];
122520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_signed(unsigned long long))];
122620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_signed(unsigned long))];
122720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_signed(unsigned short))];
122820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_signed(void))];
122920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_signed(ClassType))];
123020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_signed(Derives))];
123120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_signed(Enum))];
123220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_signed(IntArNB))];
123320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_signed(Union))];
123420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_signed(UnionAr))];
123520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
123620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
123720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_unsigned()
123820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
123920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_unsigned(bool))];
124020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_unsigned(unsigned char))];
124120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_unsigned(unsigned short))];
124220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_unsigned(unsigned int))];
124320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_unsigned(unsigned long))];
124420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_unsigned(unsigned long long))];
124520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_unsigned(Enum))];
124620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
124720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_unsigned(void))];
124820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_unsigned(cvoid))];
124920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_unsigned(float))];
125020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t13[F(__is_unsigned(double))];
125120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t14[F(__is_unsigned(long double))];
125220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t16[F(__is_unsigned(char))];
125320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t17[F(__is_unsigned(signed char))];
125420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t18[F(__is_unsigned(wchar_t))];
125520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t19[F(__is_unsigned(short))];
125620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t20[F(__is_unsigned(int))];
125720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t21[F(__is_unsigned(long))];
125820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t22[F(__is_unsigned(Union))];
125920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t23[F(__is_unsigned(UnionAr))];
126020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t24[F(__is_unsigned(Derives))];
126120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t25[F(__is_unsigned(ClassType))];
126220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t26[F(__is_unsigned(IntArNB))];
126320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
126420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
12655e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregortypedef Int& IntRef;
12665e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregortypedef const IntAr ConstIntAr;
12675e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregortypedef ConstIntAr ConstIntArAr[4];
12685e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor
12695e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregorstruct HasCopy {
12705e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor  HasCopy(HasCopy& cp);
12715e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor};
12725e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor
12734d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruthstruct HasMove {
12747a614d8380297fcd2bc23986241905d97222948cRichard Smith  HasMove(HasMove&& cp);
12754d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth};
12764d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth
127708295a592d7e54e6bea00daeb2abe7ac79a3aabaSebastian Redlstruct HasTemplateCons {
127808295a592d7e54e6bea00daeb2abe7ac79a3aabaSebastian Redl  HasVirt Annoying;
127908295a592d7e54e6bea00daeb2abe7ac79a3aabaSebastian Redl
128008295a592d7e54e6bea00daeb2abe7ac79a3aabaSebastian Redl  template <typename T>
128108295a592d7e54e6bea00daeb2abe7ac79a3aabaSebastian Redl  HasTemplateCons(const T&);
128208295a592d7e54e6bea00daeb2abe7ac79a3aabaSebastian Redl};
128308295a592d7e54e6bea00daeb2abe7ac79a3aabaSebastian Redl
12845e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregorvoid has_trivial_default_constructor() {
1285e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(Int))]; }
1286e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(IntAr))]; }
1287e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(Union))]; }
1288e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(UnionAr))]; }
1289e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(POD))]; }
1290e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(Derives))]; }
129134eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_trivial_constructor(DerivesAr))]; }
1292e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(ConstIntAr))]; }
1293e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(ConstIntArAr))]; }
1294e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(HasDest))]; }
1295e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_constructor(HasPriv))]; }
129634eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_trivial_constructor(HasCopyAssign))]; }
12974d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_trivial_constructor(HasMoveAssign))]; }
129834eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_trivial_constructor(const Int))]; }
1299e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_constructor(AllDefaulted))]; }
1300e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_constructor(AllDeleted))]; }
130134eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth
1302e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(HasCons))]; }
1303e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(HasRef))]; }
1304e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(HasCopy))]; }
1305e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(IntRef))]; }
1306e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(VirtAr))]; }
1307e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(void))]; }
1308e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(cvoid))]; }
1309e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_constructor(HasTemplateCons))]; }
1310d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[F(__has_trivial_constructor(AllPrivate))]; }
1311e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F(__has_trivial_constructor(ExtDefaulted))]; }
13125e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor}
13135e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor
13149ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosvoid has_trivial_move_constructor() {
13159ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  // n3376 12.8 [class.copy]/12
1316d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  // A copy/move constructor for class X is trivial if it is not
1317d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  // user-provided, its declared parameter type is the same as
13189ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  // if it had been implicitly declared, and if
1319d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  //   - class X has no virtual functions (10.3) and no virtual
13209ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //     base classes (10.1), and
1321d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  //   - the constructor selected to copy/move each direct base
13229ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //     class subobject is trivial, and
1323d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  //   - for each non-static data member of X that is of class
13249ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //     type (or array thereof), the constructor selected
13259ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //     to copy/move that member is trivial;
13269ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  // otherwise the copy/move constructor is non-trivial.
13279ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_constructor(POD))]; }
13289ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_constructor(Union))]; }
13299ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_constructor(HasCons))]; }
13309ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_constructor(HasStaticMemberMoveCtor))]; }
13319ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_constructor(AllDeleted))]; }
13329ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
13339ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_constructor(HasVirt))]; }
13349ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_constructor(DerivesVirt))]; }
13359ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_constructor(HasMoveCtor))]; }
13369ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_constructor(DerivesHasMoveCtor))]; }
13379ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_constructor(HasMemberMoveCtor))]; }
13389ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos}
13399ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
13405e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregorvoid has_trivial_copy_constructor() {
1341e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(Int))]; }
1342e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(IntAr))]; }
1343e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(Union))]; }
1344e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(UnionAr))]; }
1345e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(POD))]; }
1346e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(Derives))]; }
1347e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(ConstIntAr))]; }
1348e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(ConstIntArAr))]; }
1349e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(HasDest))]; }
1350e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(HasPriv))]; }
1351e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(HasCons))]; }
1352e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(HasRef))]; }
13534d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_trivial_copy(HasMove))]; }
1354e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(IntRef))]; }
1355e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(HasCopyAssign))]; }
13564d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_trivial_copy(HasMoveAssign))]; }
1357e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_copy(const Int))]; }
1358e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_copy(AllDefaulted))]; }
1359e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_copy(AllDeleted))]; }
1360152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__has_trivial_copy(DerivesAr))]; }
1361bc2a35d5ff492107dab5bdb7682f0da2f4a88861Richard Smith  { int arr[T(__has_trivial_copy(DerivesHasRef))]; }
136234eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth
136334eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_trivial_copy(HasCopy))]; }
136434eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_trivial_copy(HasTemplateCons))]; }
1365e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_copy(VirtAr))]; }
1366e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_copy(void))]; }
1367e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_copy(cvoid))]; }
1368d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[F(__has_trivial_copy(AllPrivate))]; }
1369e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F(__has_trivial_copy(ExtDefaulted))]; }
13705e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor}
13715e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor
13725e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregorvoid has_trivial_copy_assignment() {
1373e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(Int))]; }
1374e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(IntAr))]; }
1375e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(Union))]; }
1376e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(UnionAr))]; }
1377e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(POD))]; }
1378e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(Derives))]; }
1379e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(HasDest))]; }
1380e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(HasPriv))]; }
1381e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(HasCons))]; }
1382e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(HasRef))]; }
1383e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_assign(HasCopy))]; }
13844d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_trivial_assign(HasMove))]; }
13854d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_trivial_assign(HasMoveAssign))]; }
1386e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_assign(AllDefaulted))]; }
1387e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_assign(AllDeleted))]; }
1388152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__has_trivial_assign(DerivesAr))]; }
1389bc2a35d5ff492107dab5bdb7682f0da2f4a88861Richard Smith  { int arr[T(__has_trivial_assign(DerivesHasRef))]; }
139034eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth
1391e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_assign(IntRef))]; }
1392e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_assign(HasCopyAssign))]; }
1393e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_assign(const Int))]; }
139434eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_trivial_assign(ConstIntAr))]; }
139534eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_trivial_assign(ConstIntArAr))]; }
1396e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_assign(VirtAr))]; }
1397e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_assign(void))]; }
1398e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_assign(cvoid))]; }
1399d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[F(__has_trivial_assign(AllPrivate))]; }
1400e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F(__has_trivial_assign(ExtDefaulted))]; }
14015e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor}
14025e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor
14035e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregorvoid has_trivial_destructor() {
1404e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(Int))]; }
1405e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(IntAr))]; }
1406e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(Union))]; }
1407e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(UnionAr))]; }
1408e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(POD))]; }
1409e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(Derives))]; }
1410e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(ConstIntAr))]; }
1411e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(ConstIntArAr))]; }
1412e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(HasPriv))]; }
1413e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(HasCons))]; }
1414e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(HasRef))]; }
1415e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(HasCopy))]; }
14164d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_trivial_destructor(HasMove))]; }
1417e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(IntRef))]; }
1418e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(HasCopyAssign))]; }
14194d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_trivial_destructor(HasMoveAssign))]; }
1420e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(const Int))]; }
142134eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_trivial_destructor(DerivesAr))]; }
1422e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_trivial_destructor(VirtAr))]; }
1423e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_destructor(AllDefaulted))]; }
1424e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T(__has_trivial_destructor(AllDeleted))]; }
1425bc2a35d5ff492107dab5bdb7682f0da2f4a88861Richard Smith  { int arr[T(__has_trivial_destructor(DerivesHasRef))]; }
142634eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth
142734eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_trivial_destructor(HasDest))]; }
1428e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_destructor(void))]; }
1429e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_destructor(cvoid))]; }
1430d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[F(__has_trivial_destructor(AllPrivate))]; }
1431e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F(__has_trivial_destructor(ExtDefaulted))]; }
14325e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766Douglas Gregor}
143351f940457ab20f82c62c2093389763bb9f5187ebAnders Carlsson
143451f940457ab20f82c62c2093389763bb9f5187ebAnders Carlssonstruct A { ~A() {} };
143551f940457ab20f82c62c2093389763bb9f5187ebAnders Carlssontemplate<typename> struct B : A { };
143651f940457ab20f82c62c2093389763bb9f5187ebAnders Carlsson
143751f940457ab20f82c62c2093389763bb9f5187ebAnders Carlssonvoid f() {
1438e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_destructor(A))]; }
1439e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_trivial_destructor(B<int>))]; }
1440a5728872c7702ddd09537c95bc3cbd20e1f2fb09Daniel Dunbar}
1441c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl
1442d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregorclass PR11110 {
1443d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  template <int> int operator=( int );
1444d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  int operator=(PR11110);
1445d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor};
1446d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor
1447d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregorclass UsingAssign;
1448d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor
1449d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregorclass UsingAssignBase {
1450d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregorprotected:
1451d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  UsingAssign &operator=(const UsingAssign&) throw();
1452d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor};
1453d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor
1454d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregorclass UsingAssign : public UsingAssignBase {
1455d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregorpublic:
1456d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  using UsingAssignBase::operator=;
1457d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor};
1458d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor
1459c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlvoid has_nothrow_assign() {
1460e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(Int))]; }
1461e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(IntAr))]; }
1462e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(Union))]; }
1463e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(UnionAr))]; }
1464e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(POD))]; }
1465e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(Derives))]; }
1466e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(HasDest))]; }
1467e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(HasPriv))]; }
1468e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(HasCons))]; }
1469e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(HasRef))]; }
1470e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_assign(HasCopy))]; }
14714d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_nothrow_assign(HasMove))]; }
14724d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_nothrow_assign(HasMoveAssign))]; }
147334eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_assign(HasNoThrowCopyAssign))]; }
147434eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_assign(HasMultipleNoThrowCopyAssign))]; }
147534eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_assign(HasVirtDest))]; }
1476d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[T(__has_nothrow_assign(AllPrivate))]; }
1477d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[T(__has_nothrow_assign(UsingAssign))]; }
1478152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__has_nothrow_assign(DerivesAr))]; }
147934eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth
1480e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_assign(IntRef))]; }
1481e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_assign(HasCopyAssign))]; }
148234eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_assign(HasMultipleCopyAssign))]; }
1483e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_assign(const Int))]; }
148434eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_assign(ConstIntAr))]; }
148534eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_assign(ConstIntArAr))]; }
1486e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_assign(VirtAr))]; }
1487e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_assign(void))]; }
1488e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_assign(cvoid))]; }
1489d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[F(__has_nothrow_assign(PR11110))]; }
1490c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl}
1491c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl
14929ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosvoid has_nothrow_move_assign() {
14939ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(Int))]; }
14949ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(Enum))]; }
14959ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(Int*))]; }
14969ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(Enum POD::*))]; }
14979ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(POD))]; }
14989ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(HasPriv))]; }
14999ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(HasNoThrowMoveAssign))]; }
15009ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(HasNoExceptNoThrowMoveAssign))]; }
15019ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(HasMemberNoThrowMoveAssign))]; }
15029ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(HasMemberNoExceptNoThrowMoveAssign))]; }
15039ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_nothrow_move_assign(AllDeleted))]; }
15049ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
15059ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
15069ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(HasThrowMoveAssign))]; }
15079ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(HasNoExceptFalseMoveAssign))]; }
15089ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(HasMemberThrowMoveAssign))]; }
15099ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(HasMemberNoExceptFalseMoveAssign))]; }
15109ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToUDCopyCtor))]; }
15119ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToUDCopyAssign))]; }
15129ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToDtor))]; }
1513651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
1514651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
1515651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_nothrow_assignable(HasNoThrowMoveAssign, HasNoThrowMoveAssign))]; }
1516651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__is_nothrow_assignable(HasThrowMoveAssign, HasThrowMoveAssign))]; }
15174967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar
15184967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T(__is_assignable(HasNoThrowMoveAssign, HasNoThrowMoveAssign))]; }
15194967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T(__is_assignable(HasThrowMoveAssign, HasThrowMoveAssign))]; }
15209ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos}
15219ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
15229ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matosvoid has_trivial_move_assign() {
15239ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  // n3376 12.8 [class.copy]/25
1524d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  // A copy/move assignment operator for class X is trivial if it
1525d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  // is not user-provided, its declared parameter type is the same
15269ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  // as if it had been implicitly declared, and if:
1527d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  //  - class X has no virtual functions (10.3) and no virtual base
15289ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //    classes (10.1), and
1529d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  //  - the assignment operator selected to copy/move each direct
15309ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //    base class subobject is trivial, and
1531d1bcd4c73504c98d765531ad6bf259cc35c1437eDavid Majnemer  //  - for each non-static data member of X that is of class type
15329ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //    (or array thereof), the assignment operator
15339ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  //    selected to copy/move that member is trivial;
15349ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_assign(Int))]; }
15359ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_assign(HasStaticMemberMoveAssign))]; }
15369ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[T(__has_trivial_move_assign(AllDeleted))]; }
15379ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
15389ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_assign(HasVirt))]; }
15399ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_assign(DerivesVirt))]; }
15409ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_assign(HasMoveAssign))]; }
15419ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_assign(DerivesHasMoveAssign))]; }
15429ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_trivial_move_assign(HasMemberMoveAssign))]; }
15439ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToUDCopyCtor))]; }
15449ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos  { int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToUDCopyAssign))]; }
15459ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos}
15469ef9875bbe19dc9f73c6c95b803d9a4945168690Joao Matos
1547c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlvoid has_nothrow_copy() {
1548e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(Int))]; }
1549e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(IntAr))]; }
1550e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(Union))]; }
1551e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(UnionAr))]; }
1552e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(POD))]; }
155334eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_copy(const Int))]; }
1554e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(ConstIntAr))]; }
1555e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(ConstIntArAr))]; }
155634eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_copy(Derives))]; }
155734eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_copy(IntRef))]; }
1558e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasDest))]; }
1559e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasPriv))]; }
1560e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasCons))]; }
1561e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasRef))]; }
15624d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_nothrow_copy(HasMove))]; }
1563e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasCopyAssign))]; }
15644d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[T(__has_nothrow_copy(HasMoveAssign))]; }
1565e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasNoThrowCopy))]; }
1566e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasMultipleNoThrowCopy))]; }
1567e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasVirtDest))]; }
1568e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_copy(HasTemplateCons))]; }
1569d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[T(__has_nothrow_copy(AllPrivate))]; }
1570152f6b7be508fbc61543f3736ebd390d7ac84bd1Benjamin Kramer  { int arr[T(__has_nothrow_copy(DerivesAr))]; }
157134eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth
157234eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_copy(HasCopy))]; }
157334eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_copy(HasMultipleCopy))]; }
157434eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_copy(VirtAr))]; }
157534eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_copy(void))]; }
157634eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_copy(cvoid))]; }
1577c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl}
1578c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl
1579c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redlvoid has_nothrow_constructor() {
1580e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(Int))]; }
1581e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(IntAr))]; }
1582e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(Union))]; }
1583e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(UnionAr))]; }
1584e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(POD))]; }
1585e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(Derives))]; }
158634eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_constructor(DerivesAr))]; }
1587e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(ConstIntAr))]; }
1588e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(ConstIntArAr))]; }
1589e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(HasDest))]; }
1590e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(HasPriv))]; }
1591e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(HasCopyAssign))]; }
1592e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_nothrow_constructor(const Int))]; }
159334eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_constructor(HasNoThrowConstructor))]; }
159434eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__has_nothrow_constructor(HasVirtDest))]; }
1595e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  // { int arr[T(__has_nothrow_constructor(VirtAr))]; } // not implemented
1596d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[T(__has_nothrow_constructor(AllPrivate))]; }
1597e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
159834eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_constructor(HasCons))]; }
159934eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_constructor(HasRef))]; }
160034eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_constructor(HasCopy))]; }
16014d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[F(__has_nothrow_constructor(HasMove))]; }
1602e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_constructor(HasNoThrowConstructorWithArgs))]; }
160334eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_nothrow_constructor(IntRef))]; }
1604e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_constructor(void))]; }
1605e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_constructor(cvoid))]; }
1606e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_nothrow_constructor(HasTemplateCons))]; }
1607651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
1608651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__has_nothrow_constructor(HasMultipleDefaultConstructor1))]; }
1609651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__has_nothrow_constructor(HasMultipleDefaultConstructor2))]; }
1610c238f09a268cd87a2568f6c97181252687ae07b1Sebastian Redl}
1611d4b25cbde13fc973673234f26de48c940723e679Sebastian Redl
1612d4b25cbde13fc973673234f26de48c940723e679Sebastian Redlvoid has_virtual_destructor() {
1613e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(Int))]; }
1614e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(IntAr))]; }
1615e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(Union))]; }
1616e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(UnionAr))]; }
1617e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(POD))]; }
1618e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(Derives))]; }
161934eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_virtual_destructor(DerivesAr))]; }
162034eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_virtual_destructor(const Int))]; }
1621e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(ConstIntAr))]; }
1622e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(ConstIntArAr))]; }
1623e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(HasDest))]; }
1624e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(HasPriv))]; }
1625e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(HasCons))]; }
1626e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(HasRef))]; }
1627e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(HasCopy))]; }
16284d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[F(__has_virtual_destructor(HasMove))]; }
1629e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(HasCopyAssign))]; }
16304d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[F(__has_virtual_destructor(HasMoveAssign))]; }
163134eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[F(__has_virtual_destructor(IntRef))]; }
1632e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(VirtAr))]; }
1633e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
1634e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_virtual_destructor(HasVirtDest))]; }
1635e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__has_virtual_destructor(DerivedVirtDest))]; }
1636e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(VirtDestAr))]; }
1637e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(void))]; }
1638e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__has_virtual_destructor(cvoid))]; }
1639d41679d6881d2b424d8b3600fc774308087735a7Douglas Gregor  { int arr[F(__has_virtual_destructor(AllPrivate))]; }
1640d4b25cbde13fc973673234f26de48c940723e679Sebastian Redl}
16416ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16426ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16436ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetclass Base {};
16446ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetclass Derived : Base {};
16456ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetclass Derived2a : Derived {};
16466ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetclass Derived2b : Derived {};
16476ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetclass Derived3 : virtual Derived2a, virtual Derived2b {};
16486ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichettemplate<typename T> struct BaseA { T a;  };
16496ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichettemplate<typename T> struct DerivedB : BaseA<T> { };
16506ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichettemplate<typename T> struct CrazyDerived : T { };
16516ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16526ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
1653ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedmanclass class_forward; // expected-note 2 {{forward declaration of 'class_forward'}}
16546ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16556ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichettemplate <typename Base, typename Derived>
16566ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetvoid isBaseOfT() {
16576ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  int t[T(__is_base_of(Base, Derived))];
16586ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet};
16596ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichettemplate <typename Base, typename Derived>
16606ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetvoid isBaseOfF() {
16616ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  int t[F(__is_base_of(Base, Derived))];
16626ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet};
16636ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
1664d89d30fdd9e3061fb100fb8f976aab5c6cf2c901John McCalltemplate <class T> class DerivedTemp : Base {};
1665d89d30fdd9e3061fb100fb8f976aab5c6cf2c901John McCalltemplate <class T> class NonderivedTemp {};
1666d89d30fdd9e3061fb100fb8f976aab5c6cf2c901John McCalltemplate <class T> class UndefinedTemp; // expected-note {{declared here}}
16676ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16686ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichetvoid is_base_of() {
1669e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Base, Derived))]; }
1670e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(const Base, Derived))]; }
1671e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(Derived, Base))]; }
1672e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(Derived, int))]; }
1673e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Base, Base))]; }
1674e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Base, Derived3))]; }
1675e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Derived, Derived3))]; }
1676e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Derived2b, Derived3))]; }
1677e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Derived2a, Derived3))]; }
1678e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(BaseA<int>, DerivedB<int>))]; }
1679e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(DerivedB<int>, BaseA<int>))]; }
1680e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Base, CrazyDerived<Base>))]; }
1681e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(Union, Union))]; }
1682e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Empty, Empty))]; }
1683e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(class_forward, class_forward))]; }
1684e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(Empty, class_forward))]; } // expected-error {{incomplete type 'class_forward' used in type trait expression}}
1685e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(Base&, Derived&))]; }
1686d89d30fdd9e3061fb100fb8f976aab5c6cf2c901John McCall  int t18[F(__is_base_of(Base[10], Derived[10]))];
1687e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(int, int))]; }
1688e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(long, int))]; }
1689e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_base_of(Base, DerivedTemp<int>))]; }
1690e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(Base, NonderivedTemp<int>))]; }
1691e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_base_of(Base, UndefinedTemp<int>))]; } // expected-error {{implicit instantiation of undefined template 'UndefinedTemp<int>'}}
16926ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16936ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  isBaseOfT<Base, Derived>();
16946ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  isBaseOfF<Derived, Base>();
16956ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16966ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  isBaseOfT<Base, CrazyDerived<Base> >();
16976ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  isBaseOfF<CrazyDerived<Base>, Base>();
16986ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet
16996ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  isBaseOfT<BaseA<int>, DerivedB<int> >();
17006ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet  isBaseOfF<DerivedB<int>, BaseA<int> >();
17016ad6f2848d7652ab2991286eb48be440d3493b28Francois Pichet}
17029f3611365d0f2297a910cf246e056708726ed10aDouglas Gregor
170320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleytemplate<class T, class U>
170420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyclass TemplateClass {};
170520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
170620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleytemplate<class T>
170720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyusing TemplateAlias = TemplateClass<T, int>;
170820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
170920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleytypedef class Base BaseTypedef;
171020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
171120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_same()
171220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
171320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_same(Base, Base))];
171420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_same(Base, BaseTypedef))];
171520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_same(TemplateClass<int, int>, TemplateAlias<int>))];
171620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
171720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t10[F(__is_same(Base, const Base))];
171820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t11[F(__is_same(Base, Base&))];
171920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t12[F(__is_same(Base, Derived))];
172020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
172120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
172220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct IntWrapper
172320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
172420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int value;
172520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  IntWrapper(int _value) : value(_value) {}
172620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  operator int() const {
172720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley    return value;
172820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  }
172920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
173020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
173120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleystruct FloatWrapper
173220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
173320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  float value;
173420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  FloatWrapper(float _value) : value(_value) {}
173520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  FloatWrapper(const IntWrapper& obj)
173620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley    : value(static_cast<float>(obj.value)) {}
173720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  operator float() const {
173820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley    return value;
173920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  }
174020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  operator IntWrapper() const {
174120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley    return IntWrapper(static_cast<int>(value));
174220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  }
174320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley};
174420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
174520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegleyvoid is_convertible()
174620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley{
174720c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t01[T(__is_convertible(IntWrapper, IntWrapper))];
174820c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t02[T(__is_convertible(IntWrapper, const IntWrapper))];
174920c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t03[T(__is_convertible(IntWrapper, int))];
175020c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t04[T(__is_convertible(int, IntWrapper))];
175120c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t05[T(__is_convertible(IntWrapper, FloatWrapper))];
175220c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t06[T(__is_convertible(FloatWrapper, IntWrapper))];
175320c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t07[T(__is_convertible(FloatWrapper, float))];
175420c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley  int t08[T(__is_convertible(float, FloatWrapper))];
175520c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley}
175620c0da7787c9a7d2529e42a4a91d777778595d74John Wiegley
17579f3611365d0f2297a910cf246e056708726ed10aDouglas Gregorstruct FromInt { FromInt(int); };
17589f3611365d0f2297a910cf246e056708726ed10aDouglas Gregorstruct ToInt { operator int(); };
17599f3611365d0f2297a910cf246e056708726ed10aDouglas Gregortypedef void Function();
17609f3611365d0f2297a910cf246e056708726ed10aDouglas Gregor
17611eee5dc0465c0ab4810e21d365e881152d7f53c0Douglas Gregorvoid is_convertible_to();
17621eee5dc0465c0ab4810e21d365e881152d7f53c0Douglas Gregorclass PrivateCopy {
17631eee5dc0465c0ab4810e21d365e881152d7f53c0Douglas Gregor  PrivateCopy(const PrivateCopy&);
17641eee5dc0465c0ab4810e21d365e881152d7f53c0Douglas Gregor  friend void is_convertible_to();
17651eee5dc0465c0ab4810e21d365e881152d7f53c0Douglas Gregor};
17661eee5dc0465c0ab4810e21d365e881152d7f53c0Douglas Gregor
1767b608b987718c6d841115464f79ab2d1820a63e17Douglas Gregortemplate<typename T>
1768b608b987718c6d841115464f79ab2d1820a63e17Douglas Gregorstruct X0 {
1769b608b987718c6d841115464f79ab2d1820a63e17Douglas Gregor  template<typename U> X0(const X0<U>&);
1770b608b987718c6d841115464f79ab2d1820a63e17Douglas Gregor};
1771b608b987718c6d841115464f79ab2d1820a63e17Douglas Gregor
17722217f853e1909b80f87ce0dcec5543e894d11bc9Eli Friedmanstruct Abstract { virtual void f() = 0; };
17732217f853e1909b80f87ce0dcec5543e894d11bc9Eli Friedman
17749f3611365d0f2297a910cf246e056708726ed10aDouglas Gregorvoid is_convertible_to() {
1775e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(Int, Int))]; }
1776e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_convertible_to(Int, IntAr))]; }
1777e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_convertible_to(IntAr, IntAr))]; }
1778e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(void, void))]; }
1779e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(cvoid, void))]; }
1780e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(void, cvoid))]; }
1781e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(cvoid, cvoid))]; }
1782e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(int, FromInt))]; }
1783e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(long, FromInt))]; }
1784e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(double, FromInt))]; }
1785e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(const int, FromInt))]; }
1786e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(const int&, FromInt))]; }
1787e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(ToInt, int))]; }
1788e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(ToInt, const int&))]; }
1789e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(ToInt, long))]; }
1790e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_convertible_to(ToInt, int&))]; }
1791e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_convertible_to(ToInt, FromInt))]; }
1792e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(IntAr&, IntAr&))]; }
1793e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(IntAr&, const IntAr&))]; }
1794e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_convertible_to(const IntAr&, IntAr&))]; }
1795e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_convertible_to(Function, Function))]; }
1796e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_convertible_to(PrivateCopy, PrivateCopy))]; }
1797e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_convertible_to(X0<int>, X0<float>))]; }
17982217f853e1909b80f87ce0dcec5543e894d11bc9Eli Friedman  { int arr[F(__is_convertible_to(Abstract, Abstract))]; }
17999f3611365d0f2297a910cf246e056708726ed10aDouglas Gregor}
1800b7e9589bce9852b4db9575f55ac9137572147eb5Chandler Carruth
18013add9f0ac80b0a4d78611dcdb4fd89c37f1c13d8Eli Friedmannamespace is_convertible_to_instantiate {
18023add9f0ac80b0a4d78611dcdb4fd89c37f1c13d8Eli Friedman  // Make sure we don't try to instantiate the constructor.
18033add9f0ac80b0a4d78611dcdb4fd89c37f1c13d8Eli Friedman  template<int x> class A { A(int) { int a[x]; } };
18043add9f0ac80b0a4d78611dcdb4fd89c37f1c13d8Eli Friedman  int x = __is_convertible_to(int, A<-1>);
18053add9f0ac80b0a4d78611dcdb4fd89c37f1c13d8Eli Friedman}
18063add9f0ac80b0a4d78611dcdb4fd89c37f1c13d8Eli Friedman
1807b7e9589bce9852b4db9575f55ac9137572147eb5Chandler Carruthvoid is_trivial()
1808b7e9589bce9852b4db9575f55ac9137572147eb5Chandler Carruth{
1809e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(int))]; }
1810e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(Enum))]; }
1811e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(POD))]; }
1812e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(Int))]; }
1813e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(IntAr))]; }
1814018a088b3b30e500efa9173f7cd4b1b1f6a065a8Chandler Carruth  { int arr[T(__is_trivial(IntArNB))]; }
1815e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(Statics))]; }
1816e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(Empty))]; }
1817e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(EmptyUnion))]; }
1818e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(Union))]; }
181934eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__is_trivial(Derives))]; }
182034eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__is_trivial(DerivesAr))]; }
1821018a088b3b30e500efa9173f7cd4b1b1f6a065a8Chandler Carruth  { int arr[T(__is_trivial(DerivesArNB))]; }
182234eaaa523c3820dd32bcd9530148e76e87dcfa90Chandler Carruth  { int arr[T(__is_trivial(DerivesEmpty))]; }
1823e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(HasFunc))]; }
1824e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(HasOp))]; }
1825e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(HasConv))]; }
1826e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(HasAssign))]; }
1827e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(HasAnonymousUnion))]; }
1828e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(HasPriv))]; }
1829e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[T(__is_trivial(HasProt))]; }
1830c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[T(__is_trivial(DerivesHasPriv))]; }
1831c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[T(__is_trivial(DerivesHasProt))]; }
183225df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruth  { int arr[T(__is_trivial(Vector))]; }
183325df423cfc6689cf21d51a66af84ea1e70d489dfChandler Carruth  { int arr[T(__is_trivial(VectorExt))]; }
1834e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth
1835e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(HasCons))]; }
1836e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(HasCopyAssign))]; }
18374d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[F(__is_trivial(HasMoveAssign))]; }
1838e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(HasDest))]; }
1839e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(HasRef))]; }
1840e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(HasNonPOD))]; }
1841e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(HasVirt))]; }
1842c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_trivial(DerivesHasCons))]; }
1843c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_trivial(DerivesHasCopyAssign))]; }
18444d6e5a22d9481bb83b82d911727540096d171c0bChandler Carruth  { int arr[F(__is_trivial(DerivesHasMoveAssign))]; }
1845c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_trivial(DerivesHasDest))]; }
1846c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_trivial(DerivesHasRef))]; }
1847c69f636a32485b64d571490e3980463dd7752aaaChandler Carruth  { int arr[F(__is_trivial(DerivesHasVirt))]; }
1848e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(void))]; }
1849e567e837feee4a05d0d8e02049421e286ea7f70dChandler Carruth  { int arr[F(__is_trivial(cvoid))]; }
1850b7e9589bce9852b4db9575f55ac9137572147eb5Chandler Carruth}
185121ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley
1852ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedmantemplate<typename T> struct TriviallyConstructibleTemplate {};
1853ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedman
18544ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregorvoid trivial_checks()
1855feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt{
1856feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(int))]; }
1857feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(Enum))]; }
1858feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(POD))]; }
1859feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(Int))]; }
1860feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(IntAr))]; }
1861feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(IntArNB))]; }
1862feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(Statics))]; }
1863feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(Empty))]; }
1864feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(EmptyUnion))]; }
1865feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(Union))]; }
1866feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(Derives))]; }
1867feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(DerivesAr))]; }
1868feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(DerivesArNB))]; }
1869feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(DerivesEmpty))]; }
1870feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasFunc))]; }
1871feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasOp))]; }
1872feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasConv))]; }
1873feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasAssign))]; }
1874feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasAnonymousUnion))]; }
1875feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasPriv))]; }
1876feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasProt))]; }
1877feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(DerivesHasPriv))]; }
1878feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(DerivesHasProt))]; }
1879feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(Vector))]; }
1880feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(VectorExt))]; }
1881feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasCons))]; }
1882feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasRef))]; }
1883feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(HasNonPOD))]; }
1884feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(DerivesHasCons))]; }
1885feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[T(__is_trivially_copyable(DerivesHasRef))]; }
18860e2c34f92f00628d48968dfea096d36381f494cbStephen Hines  { int arr[T(__is_trivially_copyable(NonTrivialDefault))]; }
18870e2c34f92f00628d48968dfea096d36381f494cbStephen Hines  { int arr[T(__is_trivially_copyable(NonTrivialDefault[]))]; }
18880e2c34f92f00628d48968dfea096d36381f494cbStephen Hines  { int arr[T(__is_trivially_copyable(NonTrivialDefault[3]))]; }
1889feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt
1890feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(HasCopyAssign))]; }
1891feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(HasMoveAssign))]; }
1892feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(HasDest))]; }
1893feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(HasVirt))]; }
1894feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(DerivesHasCopyAssign))]; }
1895feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(DerivesHasMoveAssign))]; }
1896feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(DerivesHasDest))]; }
1897feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(DerivesHasVirt))]; }
1898feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(void))]; }
1899feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt  { int arr[F(__is_trivially_copyable(cvoid))]; }
190025d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor
19014ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(int)))]; }
19024ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(int, int)))]; }
19034ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(int, float)))]; }
19044ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(int, int&)))]; }
19054ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(int, const int&)))]; }
19064ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(int, int)))]; }
19074ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(HasCopyAssign, HasCopyAssign)))]; }
19084ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(HasCopyAssign, const HasCopyAssign&)))]; }
19094ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(HasCopyAssign, HasCopyAssign&&)))]; }
19104ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(HasCopyAssign)))]; }
19114ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(NonTrivialDefault,
19124ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor                                            const NonTrivialDefault&)))]; }
19134ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((__is_trivially_constructible(NonTrivialDefault,
19144ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor                                            NonTrivialDefault&&)))]; }
1915e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_constructible(AllDefaulted)))]; }
1916e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_constructible(AllDefaulted,
1917e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                            const AllDefaulted &)))]; }
1918e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_constructible(AllDefaulted,
1919e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                            AllDefaulted &&)))]; }
19204ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor
19214ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[F((__is_trivially_constructible(int, int*)))]; }
19224ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[F((__is_trivially_constructible(NonTrivialDefault)))]; }
19234ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[F((__is_trivially_constructible(ThreeArgCtor, int*, char*, int&)))]; }
1924e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_constructible(AllDeleted)))]; }
1925e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_constructible(AllDeleted,
1926e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                            const AllDeleted &)))]; }
1927e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_constructible(AllDeleted,
1928e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                            AllDeleted &&)))]; }
1929e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_constructible(ExtDefaulted)))]; }
1930e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_constructible(ExtDefaulted,
1931e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                            const ExtDefaulted &)))]; }
1932e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_constructible(ExtDefaulted,
1933e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                            ExtDefaulted &&)))]; }
19344ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor
1935ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedman  { int arr[T((__is_trivially_constructible(TriviallyConstructibleTemplate<int>)))]; }
1936ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedman  { int arr[F((__is_trivially_constructible(class_forward)))]; } // expected-error {{incomplete type 'class_forward' used in type trait expression}}
1937ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedman  { int arr[F((__is_trivially_constructible(class_forward[])))]; }
1938ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedman  { int arr[F((__is_trivially_constructible(void)))]; }
1939ba081617a9f116ca2d511d0bf96e45c53ecc2523Eli Friedman
194025d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(int&, int)))]; }
194125d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(int&, int&)))]; }
194225d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(int&, int&&)))]; }
194325d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(int&, const int&)))]; }
194425d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(POD&, POD)))]; }
194525d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(POD&, POD&)))]; }
194625d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(POD&, POD&&)))]; }
194725d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(POD&, const POD&)))]; }
194825d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[T((__is_trivially_assignable(int*&, int*)))]; }
1949e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_assignable(AllDefaulted,
1950e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                         const AllDefaulted &)))]; }
1951e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_assignable(AllDefaulted,
1952e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                         AllDefaulted &&)))]; }
195325d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor
195425d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[F((__is_trivially_assignable(int*&, float*)))]; }
195525d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[F((__is_trivially_assignable(HasCopyAssign&, HasCopyAssign)))]; }
195625d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[F((__is_trivially_assignable(HasCopyAssign&, HasCopyAssign&)))]; }
195725d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[F((__is_trivially_assignable(HasCopyAssign&, const HasCopyAssign&)))]; }
195825d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[F((__is_trivially_assignable(HasCopyAssign&, HasCopyAssign&&)))]; }
195925d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[F((__is_trivially_assignable(TrivialMoveButNotCopy&,
196025d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor                                        TrivialMoveButNotCopy&)))]; }
196125d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor  { int arr[F((__is_trivially_assignable(TrivialMoveButNotCopy&,
196225d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor                                        const TrivialMoveButNotCopy&)))]; }
1963e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_assignable(AllDeleted,
1964e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                         const AllDeleted &)))]; }
1965e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_assignable(AllDeleted,
1966e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                         AllDeleted &&)))]; }
1967e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_assignable(ExtDefaulted,
1968e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                         const ExtDefaulted &)))]; }
1969e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[F((__is_trivially_assignable(ExtDefaulted,
1970e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith                                         ExtDefaulted &&)))]; }
1971e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith
1972e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_assignable(HasDefaultTrivialCopyAssign&,
197325d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor                                         HasDefaultTrivialCopyAssign&)))]; }
1974e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_assignable(HasDefaultTrivialCopyAssign&,
197525d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor                                       const HasDefaultTrivialCopyAssign&)))]; }
1976e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_assignable(TrivialMoveButNotCopy&,
197725d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor                                         TrivialMoveButNotCopy)))]; }
1978e653ba2f3b6d993b5d410554c12416c03ec7775bRichard Smith  { int arr[T((__is_trivially_assignable(TrivialMoveButNotCopy&,
197925d0a0f67d9e949ffbfc57bf487012f5cbfd886eDouglas Gregor                                         TrivialMoveButNotCopy&&)))]; }
19804967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(int&, int)))]; }
19814967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(int&, int&)))]; }
19824967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(int&, int&&)))]; }
19834967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(int&, const int&)))]; }
19844967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(POD&, POD)))]; }
19854967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(POD&, POD&)))]; }
19864967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(POD&, POD&&)))]; }
19874967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(POD&, const POD&)))]; }
19884967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(int*&, int*)))]; }
19894967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(AllDefaulted,
19904967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                                         const AllDefaulted &)))]; }
19914967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_trivially_assignable(AllDefaulted,
19924967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                                         AllDefaulted &&)))]; }
19934967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar
19944967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[F((__is_assignable(int *&, float *)))]; }
19954967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(HasCopyAssign &, HasCopyAssign)))]; }
19964967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(HasCopyAssign &, HasCopyAssign &)))]; }
19974967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(HasCopyAssign &, const HasCopyAssign &)))]; }
19984967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(HasCopyAssign &, HasCopyAssign &&)))]; }
19994967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(TrivialMoveButNotCopy &,
20004967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               TrivialMoveButNotCopy &)))]; }
20014967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(TrivialMoveButNotCopy &,
20024967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               const TrivialMoveButNotCopy &)))]; }
20034967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[F((__is_assignable(AllDeleted,
20044967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               const AllDeleted &)))]; }
20054967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[F((__is_assignable(AllDeleted,
20064967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               AllDeleted &&)))]; }
20074967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(ExtDefaulted,
20084967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               const ExtDefaulted &)))]; }
20094967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(ExtDefaulted,
20104967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               ExtDefaulted &&)))]; }
20114967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar
20124967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(HasDefaultTrivialCopyAssign &,
20134967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               HasDefaultTrivialCopyAssign &)))]; }
20144967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(HasDefaultTrivialCopyAssign &,
20154967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               const HasDefaultTrivialCopyAssign &)))]; }
20164967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(TrivialMoveButNotCopy &,
20174967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               TrivialMoveButNotCopy)))]; }
20184967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar  { int arr[T((__is_assignable(TrivialMoveButNotCopy &,
20194967a710c84587c654b56c828382219c3937dacbPirama Arumuga Nainar                               TrivialMoveButNotCopy &&)))]; }
2020feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt}
2021feb375d31b7e9108b04a9f55b721d5e0c793a558Sean Hunt
2022651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesvoid constructible_checks() {
2023651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_constructible(HasNoThrowConstructorWithArgs))]; }
2024651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__is_nothrow_constructible(HasNoThrowConstructorWithArgs))]; } // MSVC doesn't look into default args and gets this wrong.
2025651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
2026651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_constructible(HasNoThrowConstructorWithArgs, HasCons))]; }
2027651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_nothrow_constructible(HasNoThrowConstructorWithArgs, HasCons))]; }
2028651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
2029651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_constructible(NonTrivialDefault))]; }
2030651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__is_nothrow_constructible(NonTrivialDefault))]; }
2031651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
2032651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_constructible(int))]; }
2033651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_nothrow_constructible(int))]; }
2034651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
2035651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__is_constructible(NonPOD))]; }
2036651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__is_nothrow_constructible(NonPOD))]; }
2037651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
2038651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[T(__is_constructible(NonPOD, int))]; }
2039651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines  { int arr[F(__is_nothrow_constructible(NonPOD, int))]; }
20406bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines
20416bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  // PR19178
20426bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  { int arr[F(__is_constructible(Abstract))]; }
20436bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  { int arr[F(__is_nothrow_constructible(Abstract))]; }
2044176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines
2045176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines  // PR20228
2046176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines  { int arr[T(__is_constructible(VariadicCtor,
2047176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines                                 int, int, int, int, int, int, int, int, int))]; }
204887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
204987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  // PR25513
205087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_constructible(int(int)))]; }
2051651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines}
2052651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines
20534ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor// Instantiation of __is_trivially_constructible
20544ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregortemplate<typename T, typename ...Args>
20554ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregorstruct is_trivially_constructible {
20564ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  static const bool value = __is_trivially_constructible(T, Args...);
20574ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor};
20584ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor
20594ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregorvoid is_trivially_constructible_test() {
20604ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<int>::value))]; }
20614ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<int, int>::value))]; }
20624ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<int, float>::value))]; }
20634ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<int, int&>::value))]; }
20644ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<int, const int&>::value))]; }
20654ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<int, int>::value))]; }
20664ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<HasCopyAssign, HasCopyAssign>::value))]; }
20674ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<HasCopyAssign, const HasCopyAssign&>::value))]; }
20684ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<HasCopyAssign, HasCopyAssign&&>::value))]; }
20694ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<HasCopyAssign>::value))]; }
20704ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<NonTrivialDefault,
20714ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor                                            const NonTrivialDefault&>::value))]; }
20724ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[T((is_trivially_constructible<NonTrivialDefault,
20734ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor                                            NonTrivialDefault&&>::value))]; }
20744ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor
20754ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[F((is_trivially_constructible<int, int*>::value))]; }
20764ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[F((is_trivially_constructible<NonTrivialDefault>::value))]; }
20774ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor  { int arr[F((is_trivially_constructible<ThreeArgCtor, int*, char*, int&>::value))]; }
20786bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  { int arr[F((is_trivially_constructible<Abstract>::value))]; } // PR19178
20794ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor}
20804ca8ac2e61c37ddadf37024af86f3e1019af8532Douglas Gregor
208121ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegleyvoid array_rank() {
208221ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley  int t01[T(__array_rank(IntAr) == 1)];
208321ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley  int t02[T(__array_rank(ConstIntArAr) == 2)];
208421ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley}
208521ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley
208621ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegleyvoid array_extent() {
208721ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley  int t01[T(__array_extent(IntAr, 0) == 10)];
208821ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley  int t02[T(__array_extent(ConstIntArAr, 0) == 4)];
208921ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley  int t03[T(__array_extent(ConstIntArAr, 1) == 10)];
209021ff2e516b0e0bc8c1dbf965cb3d44bac3c64330John Wiegley}
209187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
209287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarvoid is_destructible_test() {
209387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(int))]; }
209487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(int[2]))]; }
209587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_destructible(int[]))]; }
209687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_destructible(void))]; }
209787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(int &))]; }
209887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(HasDest))]; }
209987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_destructible(AllPrivate))]; }
210087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(SuperNonTrivialStruct))]; }
210187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(AllDefaulted))]; }
210287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_destructible(AllDeleted))]; }
210387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(ThrowingDtor))]; }
210487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_destructible(NoThrowDtor))]; }
210587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar}
210687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar
210787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainarvoid is_nothrow_destructible_test() {
210887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(int))]; }
210987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(int[2]))]; }
211087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_nothrow_destructible(int[]))]; }
211187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_nothrow_destructible(void))]; }
211287d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(int &))]; }
211387d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(HasDest))]; }
211487d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_nothrow_destructible(AllPrivate))]; }
211587d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(SuperNonTrivialStruct))]; }
211687d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(AllDefaulted))]; }
211787d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_nothrow_destructible(AllDeleted))]; }
211887d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[F(__is_nothrow_destructible(ThrowingDtor))]; }
211987d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(NoExceptDtor))]; }
212087d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar  { int arr[T(__is_nothrow_destructible(NoThrowDtor))]; }
212187d948ecccffea9e9e37d0d053b246e2d6d6c47bPirama Arumuga Nainar}
2122