test: refine throwing_type (prepare to get rid of static variables)
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator int() const {
|
||||
int get() const {
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,10 @@ private:
|
||||
int data{};
|
||||
};
|
||||
|
||||
inline bool operator==(const throwing_type &lhs, const throwing_type &rhs) {
|
||||
return lhs.get() == rhs.get();
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user