re PR c++/50025 ([DR 1288] C++0x initialization syntax doesn't work for class members of reference type)
2014-03-01 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/50025 * g++.dg/cpp0x/pr50025.C: New. From-SVN: r208251
This commit is contained in:
parent
234b1504b1
commit
2c5c8866a1
@ -1,3 +1,8 @@
|
||||
2014-03-01 Edward Smith-Rowland <3dw4rd@verizon.net>
|
||||
|
||||
PR c++/50025
|
||||
* g++.dg/cpp0x/pr50025.C: New.
|
||||
|
||||
2014-03-01 Adam Butcher <adam@jessamine.co.uk>
|
||||
|
||||
PR c++/60377
|
||||
|
40
gcc/testsuite/g++.dg/cpp0x/pr50025.C
Normal file
40
gcc/testsuite/g++.dg/cpp0x/pr50025.C
Normal file
@ -0,0 +1,40 @@
|
||||
// { dg-options "-std=gnu++11" }
|
||||
|
||||
#include <utility>
|
||||
|
||||
class A
|
||||
{
|
||||
public:
|
||||
|
||||
A(int a, int& b, int&& c)
|
||||
: m_a{a},
|
||||
m_b{b},
|
||||
m_c{std::move(c)}
|
||||
{}
|
||||
|
||||
private:
|
||||
|
||||
int m_a;
|
||||
int& m_b;
|
||||
int&& m_c;
|
||||
};
|
||||
|
||||
|
||||
struct X {};
|
||||
|
||||
class B
|
||||
{
|
||||
public:
|
||||
|
||||
B(X& q, X&& r, const X& s)
|
||||
: m_q{q},
|
||||
m_r{std::move(r)},
|
||||
m_s{s}
|
||||
{}
|
||||
|
||||
private:
|
||||
|
||||
X& m_q;
|
||||
X&& m_r;
|
||||
const X& m_s;
|
||||
};
|
Loading…
Reference in New Issue
Block a user