From d9b399881d1e5f54d996a79d23cc08015105956b Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Wed, 20 Oct 2021 13:16:54 +0200 Subject: [PATCH] Use the derived_from concept in the template of the IS(X) macro --- src/headers/parsing/ParseComponents.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index 7a57e78..6dba57e 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -13,7 +13,8 @@ using namespace std; #include "../lex.hpp" -#define IS(X) template::value>::type* = nullptr> +#include +#define IS(X) template T = X> struct ParseComponent { [[nodiscard]] constexpr const type_info& getId() const { return typeid(*this); } virtual ~ParseComponent() = default;