0

Why do we need to use reference-qualified functions?

class Y {
  void h() &;
  void h() &&;
};

What is their feature and advantage over functions without reference-qualifiers (& or &&)?

Alex
  • 11,968
  • 13
  • 94
  • 185
  • Can you provide more context or a reference wher you got that from please? Is that the same like `void h(); void h() const;`? – πάντα ῥεῖ Jun 11 '17 at 19:55
  • 1
    Related: https://stackoverflow.com/questions/33941020/const-reference-qualified-member-function And here is a nice blog-post explaining Ref-qualifiers: https://akrzemi1.wordpress.com/2014/06/02/ref-qualifiers/ (I'm too lazy to post an answer out of this ...) – chtz Jun 11 '17 at 20:00

0 Answers0