Use case for value method overload returning const rvalue in optional

Viewed 45

I've read tons of pages explaining how const rvalues are used for forbidding use of certain functions, but there was nothing about use case of method like this:

class optional
{
    ...
    constexpr const T&& value() const &&;
    ...
};

Can you name some examples? I am not iterested in examples from other classes. I want to know why commitee decided to include such method in this particular class. What can one do with const rvalue reference coming from optional?

0 Answers
Related