From 73fac05aa07a0dd16f7061baddd4b934c7855fed Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 10 Jun 2023 23:45:17 +0200 Subject: c++: Setting up testing progress --- src/core/error.cpp | 4 ++-- src/core/error.h | 4 ++-- src/core/templates.h | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/error.cpp b/src/core/error.cpp index 7258740..ef8dc57 100644 --- a/src/core/error.cpp +++ b/src/core/error.cpp @@ -32,7 +32,7 @@ const std::string_view error::get_message() const { } bool error::failed() const { - return this->is_error(); + return this->is_type(); } bool error::is_critical() const { @@ -104,7 +104,7 @@ error_or error_registry::search_or_register_id(const std::string_vi auto& err = err_or_id.get_error(); - if(err.is_error()){ + if(err.is_type()){ size_t new_index = infos.size(); if(new_index == std::numeric_limits::max()){ return make_error("Error registry ids are exhausted"); diff --git a/src/core/error.h b/src/core/error.h index 2ed7cd4..32eab1e 100644 --- a/src/core/error.h +++ b/src/core/error.h @@ -48,7 +48,7 @@ public: code get_id() const; template - bool is_error() const; + bool is_type() const; }; template @@ -225,7 +225,7 @@ private: }; template -bool error::is_error() const { +bool error::is_type() const { return error_code_ == impl::get_template_id(); } diff --git a/src/core/templates.h b/src/core/templates.h index 9b4bcac..6c0a74e 100644 --- a/src/core/templates.h +++ b/src/core/templates.h @@ -1,5 +1,7 @@ #pragma once +#include "string_literal.h" + namespace saw { template struct parameter_pack_index; -- cgit v1.2.3