Can you elaborate on the problem with const and reference members?
struct C {
const int i;
...
};
void f(C& x)
{
int i1 = x.i;
g(x);
int i2 = x.i;
...
}
It seems that the current behavior (of suppressing the default assignment operator if there are const or reference data member) would have to be kept.
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/49d9bc4b-24fa-4bc1-afe1-98100fa81e8f%40isocpp.org.
On Friday, March 23, 2018 at 10:45:48 PM UTC-5, Nicol Bolas wrote:On Friday, March 23, 2018 at 9:39:26 PM UTC-4, Walt Karas wrote:It seems that the current behavior (of suppressing the default assignment operator if there are const or reference data member) would have to be kept.
So... what exactly is the purpose of this proposal? That's the thing I don't really understand; what does this allow us to do now that we could not before?It's a convenience.
It think it would be very rare that it would not result in the desired behavior for the assignment operators.