COMP6771 Week 9.2



Hidden friends

  • Because of ADL, the compiler looks inside the class of the arguments
  • Hidden friends prevent implicit conversions
    • A function that would be viable via conversion cannot be found, because ADL doesn't look inside the class
  • Declaring a friend inside the class doesn't solve this issue, because the definition is external (and hence available to ADL)

Function callbacks with std::function


Lvalues and rvalues


COMP6771 19T2 - 9.2 - Revision

By cs6771

COMP6771 19T2 - 9.2 - Revision

  • 146
Loading comments...

More from cs6771