I think people have an important misconception that C++ revisions are generally backwards-compatible. While it is a goal of the committee, which is doing an excellent job, little things do generally break on C++ update in codebases of any substantial size and this talk explains the technical reasons why they do. Also, I actually forgot how bad the ADL was in C++, thanks for the reminder.
@echodeal77255 жыл бұрын
Which talk was "Ben's Talk" mentioned a bit before the 3 minute mark?
@ashutosh1084 жыл бұрын
It's “Easy to Use, Hard to Misuse: Declarative Style in C++” by Ben Deane. kzbin.info/www/bejne/f2aVpoOAiNR0ipY It was in the same timeslot on the same day.
@UCH6H9FiXnPsuMhyIKDOlsZA6 жыл бұрын
I think that example with `std::vector v; Foo(&v.size())` is wrong. I mean, yes, it's probably UB (dangling pointer to a temporary and all that), but the actual, defined-to-be-UB code is `Foo(&v.size)` -- you can't take the address of a member function.
@TomalakGeretkal6 жыл бұрын
`Foo(&v.size())` won't even compile outside of VS; it's ill-formed.