This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ Patch PING] [C++ Patch] PR 82235 (Copy ctor is not found for copying array of an object when it's marked explicit)
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Cc: nathan at acm dot org, Jason Merrill <jason at redhat dot com>
- Date: Tue, 12 Dec 2017 21:20:10 +0100
- Subject: [C++ Patch PING] [C++ Patch] PR 82235 (Copy ctor is not found for copying array of an object when it's marked explicit)
- Authentication-results: sourceware.org; auth=none
- References: <71bbf73e-f7c5-3d0d-cc33-ef2921ea8e55@oracle.com>
Hi,
On 15/11/2017 00:54, Mukesh Kapoor wrote:
Hi,
This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82235
For the following test case
struct Foo {
Foo() {}
explicit Foo(const Foo& aOther) {}
};
struct Bar {
Foo m[1];
};
void test() {
Bar a;
Bar b = a;
}
the compiler issues an error when the compiler generated copy
constructor of class Bar calls the explicit copy constructor of class
Foo. The fix is to implement ISO C++/17 16.3.1.4 (over.match.copy)
correctly.
I'm pinging this patch sent a while by Mukesh (I'm taking over from him
about it). Any comments?
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01133.html
Thanks!
Paolo.