From 09848ad31af6a1c70d64fccee711e231afb5a77f Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 9 Mar 2022 22:52:21 +0100 Subject: refactor: add error handling for the container get method --- src/DI/object_type.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/DI/object_type.hpp') diff --git a/src/DI/object_type.hpp b/src/DI/object_type.hpp index f690a64..3910c03 100644 --- a/src/DI/object_type.hpp +++ b/src/DI/object_type.hpp @@ -1,15 +1,18 @@ #pragma once +#include #include class BaseObjectType { public: - explicit BaseObjectType(const std::type_info &type_info); + explicit BaseObjectType(const std::type_info &type_info) noexcept; - bool operator==(const BaseObjectType &object_type) const; + bool operator==(const BaseObjectType &object_type) const noexcept; - [[nodiscard]] std::size_t hash() const; + [[nodiscard]] std::size_t hash() const noexcept; + + [[nodiscard]] std::string_view name() const noexcept; private: const std::type_info &_type_info; -- cgit v1.2.3-18-g5258