Files
entt/test/common/aggregate.h
2024-02-09 09:29:09 +01:00

26 lines
494 B
C++

#ifndef ENTT_COMMON_AGGREGATE_H
#define ENTT_COMMON_AGGREGATE_H
#include <type_traits>
namespace test {
struct aggregate {
int value{};
};
inline bool operator==(const aggregate &lhs, const aggregate &rhs) {
return lhs.value == rhs.value;
}
inline bool operator<(const aggregate &lhs, const aggregate &rhs) {
return lhs.value < rhs.value;
}
// ensure aggregate-ness :)
static_assert(std::is_aggregate_v<test::aggregate>, "Not an aggregate type");
} // namespace test
#endif