+2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ PR c++/63959
+ * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
+
2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
* cp-objcp-common.c: Use hash_table instead of htab.
&& !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
SA(!__is_trivially_constructible(int,B));
SA(!__is_trivially_constructible(D));
+
+SA(__is_trivially_copyable(int));
+SA(!__is_trivially_copyable(volatile int));
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,