1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #include "rttr/detail/comparison/compare_less.h"
- #include "rttr/detail/type/type_register_p.h"
- #include "rttr/type.h"
- #include "rttr/variant.h"
- #include <type_traits>
- namespace rttr
- {
- namespace detail
- {
- bool compare_types_less_than(const void* lhs, const void* rhs, const type& t, int& result)
- {
- if (auto cmp_f = t.get_less_than_comparator())
- {
- result = cmp_f->cmp(lhs, rhs) ? -1 : cmp_f->cmp(rhs, lhs) ? 1 : 0;
- return true;
- }
- else
- {
- return false;
- }
- }
- }
- }
|