@@ -3206,7 +3206,7 @@ trivially_copyable_p (const_tree t)
&& !TYPE_HAS_COMPLEX_MOVE_ASSIGN (t)
&& TYPE_HAS_TRIVIAL_DESTRUCTOR (t));
else
- return scalarish_type_p (t);
+ return !CP_TYPE_VOLATILE_P (t) && scalarish_type_p (t);
}
/* Returns 1 iff type T is a trivial type, as defined in [basic.types] and
@@ -33,3 +33,6 @@ SA(__is_trivially_constructible(int,double));
SA(!__is_trivially_constructible(int,B));
SA(!__is_trivially_constructible(D));
+
+SA(__is_trivially_copyable(int));
+SA(!__is_trivially_copyable(volatile int));
@@ -47,6 +47,8 @@ void test01()
static_assert(test_property<is_trivially_copyable,
int>(true), "");
+ static_assert(test_property<is_trivially_copyable,
+ volatile int>(false), "");
static_assert(test_property<is_trivially_copyable,
TType>(true), "");
static_assert(test_property<is_trivially_copyable,