On 12/12/2017 03:20 PM, Paolo Carlini wrote:
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
These two don't match:
+ When initializing a temporary to be bound to the first
+ parameter of a constructor where the parameter is of type
+/* Return true if current_function_decl is a constructor
+ and its first argument is a reference type and it is
The language is talking about the function being called, and
ref_first_parm_of_constructor is looking at the function we're currently in.
Jason