python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to properly implement operator<=> for a non-POD class?
I'm looking for a way to implement the three-way comparison operator and the operator== for the following class:
class Foo
{
public:
auto operator<=>( const Foo& rhs ) const noexcept = d...
digito_evo
Votes: 0
Answers: 1
How to use three-way comparison (spaceship op) to implement operator== between different types?
Simple Task: I have these two types
struct type_a{
int member;
};
struct type_b{
int member;
};
I want to use this new C++20 spaceship op that everyone says is so cool to be able to write type...
Basti
Votes: 0
Answers: 2