+ // Generator to test base class
+ struct has_required_base_class
+ {
+ template<typename _TBase, typename _TDerived>
+ void
+ operator()()
+ {
+ struct _Concept
+ {
+ void __constraint()
+ {
+ const _TDerived& obj = __a;
+ const _TBase* base __attribute__((unused)) = &obj;
+ }
+
+ _TDerived __a;
+ };
+
+ void (_Concept::*__x)() __attribute__((unused))
+ = &_Concept::__constraint;
+ }
+ };
+
+ // Generator to test assignment operator.
+ struct assignable
+ {
+ template<typename _Tp>
+ void
+ operator()()
+ {
+ struct _Concept
+ {
+ void __constraint()
+ { __v1 = __v2; }
+
+ _Tp __v1;
+ _Tp __v2;
+ };
+
+ void (_Concept::*__x)() __attribute__((unused))
+ = &_Concept::__constraint;
+ }
+ };
+
+ // Generator to test default constructor.
+ struct default_constructible
+ {
+ template<typename _Tp>
+ void
+ operator()()
+ {
+ struct _Concept
+ {
+ void __constraint()
+ { _Tp __v __attribute__((unused)); }
+ };
+
+ void (_Concept::*__x)() __attribute__((unused))
+ = &_Concept::__constraint;
+ }
+ };
+
+ // Generator to test copy constructor.
+ struct copy_constructible
+ {
+ template<typename _Tp>
+ void
+ operator()()
+ {
+ struct _Concept
+ {
+ void __constraint()
+ { _Tp __v2(__v1); }
+
+ _Tp __v1;
+ };
+
+ void (_Concept::*__x)() __attribute__((unused))
+ = &_Concept::__constraint;
+ }
+ };
+
+ // Generator to test direct initialization, single value constructor.
+ struct single_value_constructible
+ {
+ template<typename _Ttype, typename _Tvalue>
+ void
+ operator()()
+ {
+ struct _Concept
+ {
+ void __constraint()
+ { _Ttype __v(__a); }
+
+ _Tvalue __a;
+ };
+
+ void (_Concept::*__x)() __attribute__((unused))
+ = &_Concept::__constraint;
+ }
+ };
+
+ // Generator to test constexpr constructor
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // Generator to test default constructor.
+ struct constexpr_default_constructible