Use the derived_from concept in the template of the IS(X) macro
This commit is contained in:
parent
ec2af24be3
commit
d9b399881d
|
@ -13,7 +13,8 @@ using namespace std;
|
|||
|
||||
#include "../lex.hpp"
|
||||
|
||||
#define IS(X) template<typename T = X, typename std::enable_if<std::is_base_of<X, T>::value>::type* = nullptr>
|
||||
#include <concepts>
|
||||
#define IS(X) template<derived_from<X> T = X>
|
||||
struct ParseComponent {
|
||||
[[nodiscard]] constexpr const type_info& getId() const { return typeid(*this); }
|
||||
virtual ~ParseComponent() = default;
|
||||
|
|
Loading…
Reference in New Issue