From dc6222611ad14a33f642396558ba84ecba9d6605 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Mar 2022 18:02:18 +0100 Subject: perf: add noexcept almost everywhere --- src/DI/container.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/DI/container.hpp') diff --git a/src/DI/container.hpp b/src/DI/container.hpp index 93722b6..974780a 100644 --- a/src/DI/container.hpp +++ b/src/DI/container.hpp @@ -14,13 +14,13 @@ template class BindingBuilder { public: - explicit BindingBuilder(Container *container); + explicit BindingBuilder(Container *container) noexcept; template >> - void to(); + void to() noexcept; - void to_factory(Interface func); + void to_factory(Interface func) noexcept; private: Container *_container; @@ -29,16 +29,16 @@ private: class Container { public: - Container() = default; + Container() noexcept = default; template - BindingBuilder bind(); + BindingBuilder bind() noexcept; template >> - std::shared_ptr get() const; + std::shared_ptr get() const noexcept; template >> - Interface get() const; + Interface get() const noexcept; std::unordered_map, ObjectTypeHasher> bindings; -- cgit v1.2.3-18-g5258