1#include <compare>
2#include <iostream>
3
4int main() {
5 double foo = -0.0;
6 double bar = 0.0;
7
8 auto res = foo <=> bar;
9
10 if (res < 0)
11 std::cout << "-0 is less than 0";
12 else if (res == 0)
13 std::cout << "-0 and 0 are equal";
14 else if (res > 0)
15 std::cout << "-0 is greater than 0";
16}