On Thu, 26 Mar 2015, Jonathan Wakely wrote:

--- /dev/null
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/62259.cc
+static_assert(alignof(obj1) == alignof(int64_t),
+               "std::atomic not suitably aligned" );
+
+struct container_struct {
+   char c[1];
+   std::atomic<power_of_two_obj> ao;
+};
+
+container_struct obj2;
+
+static_assert( alignof(obj2.ao) == alignof(int64_t),
+               "std::atomic not suitably aligned" );

I'd suggest replacing == with >= or compare with
alignof(atomic_int64_t) (figuratively).

brgds, H-P

Reply via email to