32 ms·
I remember reading something here recently about auto causing some painful and difficult to diagnose bug - I think string was what they thought the type should
by jamesfinlayson 2y ago
I remember reading something here recently about auto causing some painful and difficult to diagnose bug - I think string was what they thought the type should be (and some implicit cast would have made it a string if the type was specified)... but instead it created a string_view which went on to be used somewhere that accepted both string and string_view and then something tried to use it later but whatever the string_view was pointing to was gone (or something in that vein - I don't recall exactly).
- xonre 2y agoIt's probably auto when you wanted auto&. A copy was made instead of a reference. I've been bitten by that.