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:
Eric Fiselier 2014-08-27 17:00:11 +00:00
parent 180d76b408
commit 7d1c2d8878
15 changed files with 15 additions and 15 deletions

View File

@ -55,7 +55,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -62,7 +62,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -55,7 +55,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -62,7 +62,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -40,7 +40,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -42,7 +42,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -75,7 +75,7 @@ struct A
{ {
int i; 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 A& a) : i(a.i) {}
A(const volatile A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {}

View File

@ -79,7 +79,7 @@ struct A
{ {
int i; 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 A& a) : i(a.i) {}
A(const volatile A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {}

View File

@ -75,7 +75,7 @@ struct A
{ {
int i; 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 A& a) : i(a.i) {}
A(const volatile A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {}

View File

@ -80,7 +80,7 @@ struct A
{ {
int i; 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 A& a) : i(a.i) {}
A(const volatile A& a) : i(a.i) {} A(const volatile A& a) : i(a.i) {}

View File

@ -38,7 +38,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -38,7 +38,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -38,7 +38,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -38,7 +38,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}

View File

@ -38,7 +38,7 @@ struct A
{ {
int i; 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) friend bool operator==(const A& x, const A& y)
{return x.i == y.i;} {return x.i == y.i;}