File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,21 @@ struct PaddedUserAtomicType
51
51
52
52
struct LargeUserAtomicType
53
53
{
54
- int i, j[ 127 ]; /* decidedly not lock-free */
54
+ int a[ 128 ]; /* decidedly not lock-free */
55
55
56
- LargeUserAtomicType (int d = 0 ) TEST_NOEXCEPT : i(d)
57
- {}
56
+ LargeUserAtomicType (int d = 0 ) TEST_NOEXCEPT
57
+ {
58
+ for (auto && e : a)
59
+ e = d++;
60
+ }
58
61
59
- friend bool operator ==(const LargeUserAtomicType& x, const LargeUserAtomicType& y)
60
- { return x.i == y.i ; }
62
+ friend bool operator ==(LargeUserAtomicType const & x, LargeUserAtomicType const & y) TEST_NOEXCEPT
63
+ {
64
+ for (int i = 0 ; i < 128 ; ++i)
65
+ if (x.a [i] != y.a [i])
66
+ return false ;
67
+ return true ;
68
+ }
61
69
};
62
70
63
71
template < template <class TestArg > class TestFunctor >
You can’t perform that action at this time.
0 commit comments