The Case of string_view and the Magic String -- Giovanni Dicanio

Someone learned about std::string_view, and started replacing instances of std::string const& with string_views in their C++ code base. As a result of that, a subtle bug shows up!

The Case of string_view and the Magic String

by Giovanni Dicanio

From the article:

(...) The code is recompiled and executed. But, unfortunately, now the output has changed! What’s going on here? Where does that “magic string” come from?

Add a Comment

You must sign in or register to add a comment.

Comments (0)

There are currently no comments on this entry.