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?

M.M
  • 138,810
  • 21
  • 208
  • 365
A-n-t-h-o-n-y
  • 410
  • 6
  • 14
  • 1
    consider it applied to the type of `*this` for overload resolution on the hidden `this` parameter – M.M Sep 07 '16 at 01:51

0 Answers0