Files
optional/tl
Bj?rn Fahller 5143f9577a 'optional<T&>::and_then(F&& f) &&' calls f with lvalue reference
This makes sense. The 'optional' is an rvalue, but its contained type
remains an lvalue reference. I.e.

int i = 3;
optional<int&>{i}.and_then([](int& r){return optional<int&>{++r});

The optional r-value still refers to 'i', which is not an r-value.
2018-06-03 12:09:17 +02:00
..