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. llvm-svn: 216561
This commit is contained in:
parent
180d76b408
commit
7d1c2d8878
|
@ -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…
Reference in New Issue