#include <set>
#include <string>
#include <cassert>
using namespace std::literals;
int main()
{
auto coll = std::set{ "hello"s };
auto s = "hello"s;
coll.insert(std::move(s));
assert("hello"s == s); // Always OK?
}
Гарантирует ли стандарт C++, что неудачная вставка в ассоциативный контейнер не изменит аргумент rvalue-reference?