#Security weirdness of the day: I followed a link to #Instagram, and it told me they'd noticed an unusual login. Now I hardly ever log in to Instagram, so I imagine any login would be tagged as unusual. But this login - which blocked me from viewing a public post until I answered whether it was me or not - was from two months ago. I have no idea if I logged in then. I might have, for whatever reason, but who remembers where they log in for several months? Not I. The follow-up page had me change my password, without any other kind of challenge. I got a mail afterwards, but seriously, that's some weird shit.
Why do you think so? And are you talking about the C++11 case?
ReplyDeleteYes. Apparently having a constant-time size function (and the structure changes that implied) broke so much binary compatibility that at least GCC has decided to revert to the linear-time size function. Some of my colleagues just got bit by that. I leave it as an exercise for the reader to implement both size() and splice() in constant time.
ReplyDeleteC++03 required ABI breakage for some implementors. So does C++11. If compatibility is more important, vendors must not claim that their implementation (fully) conforms to the standard.
ReplyDeleteSo what you are saying is not that the complexity claim in the standard is a lie. But that a specific implementation is still at pre-C++11 for this.
Full-list and single-element splice are easily done in constant time, even when tracking size. Range splice is specified to be up to linear in the size of the range. Apparently the C++11 committee decided to favor constant size over constant splice.