default-comparisons Questions

3

Solved

c++20 default comparison operator is a very convenient feature. But I find it less useful if the class has an empty base class. The default operator<=> performs lexicographical comparison by...
Violoncellist asked 25/8, 2022 at 10:29

13

Solved

I am a big fan of letting the compiler do as much work for you as possible. When writing a simple class the compiler can give you the following for 'free': A default (empty) constructor A copy and...
1

© 2022 - 2024 — McMap. All rights reserved.