UnionType>(true), "");
static_assert(test_category<is_aggregate,
SLType>(true), "");
- static_assert(test_category<is_aggregate,
- NoexceptMoveAssignClass>(true), "");
static_assert(test_category<is_aggregate,
unsigned[3]>(true), "");
static_assert(test_category<is_aggregate,
EnumType[]>(true), "");
static_assert(test_category<is_aggregate,
EnumType[][2]>(true), "");
- pos<ClassType, UnionType, SLType, NoexceptMoveAssignClass,
+ pos<ClassType, UnionType, SLType,
unsigned[3], unsigned[3][2], unsigned[], unsigned[][3]>();
+#if __cplusplus == 201703L
+ static_assert(test_category<is_aggregate,
+ NoexceptMoveAssignClass>(true), "");
+ pos<NoexceptMoveAssignClass>();
+#endif
// Negative tests.
static_assert(test_category<is_aggregate,
void>(false), "");
neg<AbstractClass, PolymorphicClass, ExplicitClass, char, unsigned,
bool, float, double, void>();
+#if __cplusplus > 201703L
+ // In C++20 aggregates cannot have user-declared constructors.
+ static_assert(test_category<is_aggregate,
+ NoexceptMoveAssignClass>(false), "");
+ neg<NoexceptMoveAssignClass>();
+#endif
}
bool operator==(const JustEq&, const JustEq&);
static_assert(is_eq_comparable<optional<JustEq>>::value, "");
+#if __cplusplus == 201703L
+// In C++20 operator!= can be synthesized from operator==
static_assert(!is_neq_comparable<optional<JustEq>>::value, "");
+#endif
static_assert(!is_lt_comparable<optional<JustEq>>::value, "");
static_assert(!is_gt_comparable<optional<JustEq>>::value, "");
static_assert(!is_le_comparable<optional<JustEq>>::value, "");