Re:The C++14 Standard: What You Need to Know
by millstone on Thursday September 18, 2014 @01:37AM
(#8333881)
I disagree very strongly with the argument presented there - in fact, I think it provides enough rope to hang itself.
It says:
1. With deduction you always get right type
2. Deduction guarantees no implicit conversion will happen
From this we can conclude that "the right type" never involves an implicit conversion. This is false: see vector<bool>::operator[], or consider the fact that auto allows you to make a variable of a type you cannot name explicitly (i.e. is private), which is surely not "the right type!"
It says:
1. With deduction you always get right type
2. Deduction guarantees no implicit conversion will happen
From this we can conclude that "the right type" never involves an implicit conversion. This is false: see vector<bool>::operator[], or consider the fact that auto allows you to make a variable of a type you cannot name explicitly (i.e. is private), which is surely not "the right type!"