geode/loader/include/Geode/modify/Comparer.hpp

35 lines
1.1 KiB
C++
Raw Normal View History

2022-07-30 12:24:03 -04:00
#pragma once
#include "Traits.hpp"
namespace geode::modifier {
2022-10-30 14:59:20 -04:00
struct compare {
template <class, class, class, class = void>
struct constructor {
constexpr static inline bool value = false;
};
2022-07-30 12:24:03 -04:00
2022-10-30 14:59:20 -04:00
template <class Derived, class Base, class Ret, class... Parameters>
struct constructor<
Derived, Base, Ret(Parameters...),
std::void_t<decltype(substitute<Ret, Base, Derived, Parameters...>(&Derived::constructor
))>> {
constexpr static inline bool value = true;
};
2022-07-30 12:24:03 -04:00
2022-10-30 14:59:20 -04:00
template <class, class, class, class = void>
struct destructor {
constexpr static inline bool value = false;
};
2022-07-30 12:24:03 -04:00
2022-10-30 14:59:20 -04:00
template <class Derived, class Base, class Ret, class... Parameters>
struct destructor<
Derived, Base, Ret(Parameters...),
std::void_t<decltype(substitute<Ret, Base, Derived, Parameters...>(&Derived::destructor)
)>> {
constexpr static inline bool value = true;
};
#include <Geode/GeneratedCompare.hpp>
};
2022-07-30 12:24:03 -04:00
}