1

Looking at Boost::Optional optional class template header I come across this:

T const& operator*() const&
T&       operator*() &;
T&&      operator*() &&;

For the life of me I can't find this syntax anywhere else (a reference as the last symbol) I would assume it has something to do with overloading on the type(const l-val, l-val, r-val) of the object the operator belongs to, but I haven't seen this described anywhere.

Could someone tell me what this syntax means?

1
  • 1
    consider it applied to the type of *this for overload resolution on the hidden this parameter Commented Sep 7, 2016 at 1:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.