Skip to content

Commit 30ad1bb

Browse files
committed
Remove operators for null, empty_array and empty_object
1 parent 5b1b80e commit 30ad1bb

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

include/tao/json/type.hh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,9 @@ namespace tao
6262
return "unknown";
6363
}
6464

65-
struct null_t : operators::totally_ordered< null_t > {} constexpr null {};
66-
struct empty_array_t : operators::totally_ordered< empty_array_t > {} constexpr empty_array {};
67-
struct empty_object_t : operators::totally_ordered< empty_object_t > {} constexpr empty_object {};
68-
69-
constexpr bool operator== ( const null_t &, const null_t & ) noexcept { return true; }
70-
constexpr bool operator< ( const null_t &, const null_t & ) noexcept { return false; }
71-
72-
constexpr bool operator== ( const empty_array_t &, const empty_array_t & ) noexcept { return true; }
73-
constexpr bool operator< ( const empty_array_t &, const empty_array_t & ) noexcept { return false; }
74-
75-
constexpr bool operator== ( const empty_object_t &, const empty_object_t & ) noexcept { return true; }
76-
constexpr bool operator< ( const empty_object_t &, const empty_object_t & ) noexcept { return false; }
65+
struct null_t {} constexpr null {};
66+
struct empty_array_t {} constexpr empty_array {};
67+
struct empty_object_t {} constexpr empty_object {};
7768

7869
} // json
7970

src/test/json/compare.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ namespace tao
1717
TEST_ASSERT( a <= a );
1818
TEST_ASSERT( a >= a );
1919

20-
TEST_ASSERT( b == b );
21-
TEST_ASSERT( ! ( b != b ) );
22-
TEST_ASSERT( ! ( b < b ) );
23-
TEST_ASSERT( ! ( b > b ) );
24-
TEST_ASSERT( b <= b );
25-
TEST_ASSERT( b >= b );
26-
2720
TEST_ASSERT( ! ( a == b ) );
2821
TEST_ASSERT( ! ( b == a ) );
2922
TEST_ASSERT( a != b );

0 commit comments

Comments
 (0)