[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/2112] [3.3/3.4/3.5 Regression] misleading message for binding r-value to non-const reference



------- Additional Comments From bangerth at dealii dot org  2004-03-19 19:56 -------
I don't consider this as a bug. I'd just close it. 
 
Note that there is not much we can do about it: we can't say that there is an attempt 
to bind an rvalue to a non-const reference, because this would imply that we have 
already settled on one of the available overloads. However, how can we settle on 
one overload if we don't find a suitable one? The only thing we could do in addition to 
simply print the available overloads would be to say 
  candidate 'xyz' is not available because it requires binding a temporary 
  to a non-const reference 
but how should we ever be able to do that? This would amount to second guessing 
what the programmer wanted to do, and would likely yield quite a number of cases 
where the programmer did not intend this and is more confused by the message 
than not. 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2112

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



Reply to: