On 03/02/2014 04:55 PM, Fabien Chêne wrote:
Hmm, sorry to iterate on this rather trivial issue, but it seems difficult to mimic the c++98 diagnostic. Actually, the c++98 diagnosic raises an error at the point of use, mention the class implied, and add a note at the ref/const member uninitialized. Doing that in c++11 is not currently possible because input_location is sabotaged early in maybe_explain_implicit_delete (unless there is some magic incantation in the diagnostic machinery I am not aware of), and the point of use is lost.
Yes, in C++11 the point of use is the source location of the constructor, which is going to be different from where the constructor is called. I just meant use the same wording.
I am inclined to think that if we reached one the two functions mentioned, an error had already been raised and we are trying to explain why. Thus, it seems to me that only notes should be emitted. Here we are actually explaining why the default constructor is deleted, which is a kind of subnote.
I can see that argument, but it's deleted because if it were defined, that definition would be ill-formed, and we're giving the errors that we would see in that case.
Jason