Jan 25, 2023 at 1:47pm
Are you compiling as C++20 ?
Jan 25, 2023 at 1:53pm
yes I am compiling with C++20
the problem is with
it says:
|
call to object of class type 'std::compare_three_way': no matching call operator found
|
Last edited on Jan 25, 2023 at 1:56pm
Jan 25, 2023 at 2:07pm
JUANDENT wrote:
it says: call to object of class type 'std::compare_three_way': no matching call operator found |
Operator expects arguments, not comparison, therefore:
return std::compare_three_way{}(val, rhs.val);
Last edited on Jan 25, 2023 at 2:10pm