Mark test types for <atomic> nothrow default constructible. Patch from Steve MacKenzie.
The way the standard currently specifies the default constructor for atomic<T> requires T to be nothrow default constructible. This patch makes our test types meet this requirement. Note: The nothrow default constructible requirment is subject to the outcome of LWG issue 1265. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@216561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9dc353cf11
commit
b26c966174
@ -55,7 +55,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -62,7 +62,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -55,7 +55,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -62,7 +62,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -40,7 +40,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -42,7 +42,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -75,7 +75,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
A(const A& a) : i(a.i) {}
|
||||
A(const volatile A& a) : i(a.i) {}
|
||||
|
||||
|
@ -79,7 +79,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
A(const A& a) : i(a.i) {}
|
||||
A(const volatile A& a) : i(a.i) {}
|
||||
|
||||
|
@ -75,7 +75,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
A(const A& a) : i(a.i) {}
|
||||
A(const volatile A& a) : i(a.i) {}
|
||||
|
||||
|
@ -80,7 +80,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
A(const A& a) : i(a.i) {}
|
||||
A(const volatile A& a) : i(a.i) {}
|
||||
|
||||
|
@ -38,7 +38,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -38,7 +38,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -38,7 +38,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -38,7 +38,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
@ -38,7 +38,7 @@ struct A
|
||||
{
|
||||
int i;
|
||||
|
||||
explicit A(int d = 0) : i(d) {}
|
||||
explicit A(int d = 0) noexcept {i=d;}
|
||||
|
||||
friend bool operator==(const A& x, const A& y)
|
||||
{return x.i == y.i;}
|
||||
|
Loading…
x
Reference in New Issue
Block a user