Reputation: 42215
#include <string>
#include <string_view>
using namespace std::literals;
int main()
{
"hello"s + "world"; // ok
"hello"s + "world"sv; // error
}
See online demo
Why not make "hello"s + "world"sv
valid in C++20?
Upvotes: 0
Views: 119