From cb169dfac720de614821480a2633bb93b6be5245 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 9 Jun 2022 17:19:22 +0200 Subject: feat!: rename tagged.hpp to tagging.hpp --- include/yacppdic/auto_wirable.hpp | 2 +- include/yacppdic/tagged.hpp | 44 --------------------------------------- include/yacppdic/tagging.hpp | 44 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 include/yacppdic/tagged.hpp create mode 100644 include/yacppdic/tagging.hpp (limited to 'include') diff --git a/include/yacppdic/auto_wirable.hpp b/include/yacppdic/auto_wirable.hpp index c10ba18..ecd240b 100644 --- a/include/yacppdic/auto_wirable.hpp +++ b/include/yacppdic/auto_wirable.hpp @@ -1,7 +1,7 @@ #pragma once #include "yacppdic/container.hpp" -#include "yacppdic/tagged.hpp" +#include "yacppdic/tagging.hpp" #include diff --git a/include/yacppdic/tagged.hpp b/include/yacppdic/tagged.hpp deleted file mode 100644 index 012a46a..0000000 --- a/include/yacppdic/tagged.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include - -namespace yacppdic -{ - -template -// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) -class Tagged -{ -public: - using Target = TargetType; - - Tagged() noexcept = delete; - Tagged(const Tagged &tagged) noexcept = delete; - Tagged(Tagged &&tagged) noexcept = delete; - - static constexpr auto get_tag() noexcept -> char const * - { - return tag; - } - - auto operator=(const Tagged &tagged) noexcept -> Tagged & = delete; - auto operator=(Tagged &&tagged) noexcept -> Tagged & = delete; -}; - -template -struct is_tagged : public std::false_type // NOLINT(readability-identifier-naming) -{ -}; - -template -struct is_tagged> : public std::true_type -{ -}; - -template -inline constexpr bool is_tagged_v = is_tagged::value; - -template -concept IsTagged = is_tagged_v; - -} // namespace yacppdic diff --git a/include/yacppdic/tagging.hpp b/include/yacppdic/tagging.hpp new file mode 100644 index 0000000..012a46a --- /dev/null +++ b/include/yacppdic/tagging.hpp @@ -0,0 +1,44 @@ +#pragma once + +#include + +namespace yacppdic +{ + +template +// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) +class Tagged +{ +public: + using Target = TargetType; + + Tagged() noexcept = delete; + Tagged(const Tagged &tagged) noexcept = delete; + Tagged(Tagged &&tagged) noexcept = delete; + + static constexpr auto get_tag() noexcept -> char const * + { + return tag; + } + + auto operator=(const Tagged &tagged) noexcept -> Tagged & = delete; + auto operator=(Tagged &&tagged) noexcept -> Tagged & = delete; +}; + +template +struct is_tagged : public std::false_type // NOLINT(readability-identifier-naming) +{ +}; + +template +struct is_tagged> : public std::true_type +{ +}; + +template +inline constexpr bool is_tagged_v = is_tagged::value; + +template +concept IsTagged = is_tagged_v; + +} // namespace yacppdic -- cgit v1.2.3-18-g5258