This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58089] New: expanding empty parameter pack as constructor arguments requires accessible copy constructor
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Aug 2013 14:44:11 +0000
- Subject: [Bug c++/58089] New: expanding empty parameter pack as constructor arguments requires accessible copy constructor
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58089
Bug ID: 58089
Summary: expanding empty parameter pack as constructor
arguments requires accessible copy constructor
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
struct X
{
X() { }
private:
X(const X& r);
};
template <typename... Args>
void f(Args&&... args)
{
X t(args...);
}
int main()
{
f();
}
$ g++ -std=gnu++11 t.cc
t.cc: In instantiation of 'void f(Args&& ...) [with Args = {}]':
t.cc:18:7: required from here
t.cc:5:5: error: 'X::X(const X&)' is private
X(const X& r);
^
t.cc:12:16: error: within this context
X t(args...);
^