Comparisons, Friends, ADL Comparisons, Friends, ADL Comparisons, Friends, ADL
Follow @hackingcpp on twitter so you don't miss any updates.
New/Revamped Articles
Comparing Custom Types
- how to make your own types comparable
- principles: equivalence, equality, incomparability, …
- C++20
operator == (T const&) = default;
- C++20
operator <=>
for 3-way comparisons - C++20 comparison categories
Friends
- split an abstraction into several friend types with (mutual) private access
- keep members hidden from any other type/function except for its friends
- write free-standing friend functions that can act like member functions
- prevent implicit argument conversions
Updated Articles
Argument Dependent Lookup
- added an explanation of
ADL-disabling function objects
(also called
Niebloids
) - improved the explanation of customizaton point objects (CPOs)
- improved the explanation of hidden friends and how they can be used to prevent implicit conversions
- fixed some typos
Aggregate Types
- added panel:
Value Semantics vs. Reference Semantics
Memory (Basics)
- introduced the distinction between C++'s abstract memory model and its practical realizations (like stack/heap paritionining)
- added an explanation of different object storage duration types