From 7cfce057d76bc1a30828aea13ec44a5ffe2cbd3a Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Wed, 12 Jan 2022 21:26:07 +0700 Subject: [PATCH] traits enums fixes --- TODO.md | 2 ++ headers/meta.hpp/meta_traits.hpp | 22 +++++++++++----------- manuals/.clang-tidy | 2 ++ untests/.clang-tidy | 2 ++ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/TODO.md b/TODO.md index 80cc916..8e27475 100644 --- a/TODO.md +++ b/TODO.md @@ -10,3 +10,5 @@ - add return value policy - add is_invocable_with by dynamic types - add metadata to every type and state +- add integral implicit conversions +- add meta::invoke function diff --git a/headers/meta.hpp/meta_traits.hpp b/headers/meta.hpp/meta_traits.hpp index d2cd0db..41db8dc 100644 --- a/headers/meta.hpp/meta_traits.hpp +++ b/headers/meta.hpp/meta_traits.hpp @@ -53,11 +53,11 @@ namespace meta_hpp }; enum class class_flags : std::uint32_t { - is_empty = 1 << 1, - is_final = 1 << 2, - is_abstract = 1 << 3, - is_polymorphic = 1 << 4, - is_template_instantiation = 1 << 5, + is_empty = 1 << 0, + is_final = 1 << 1, + is_abstract = 1 << 2, + is_polymorphic = 1 << 3, + is_template_instantiation = 1 << 4, }; enum class ctor_flags : std::uint32_t { @@ -79,15 +79,15 @@ namespace meta_hpp enum class method_flags : std::uint32_t { is_const = 1 << 0, is_noexcept = 1 << 1, - is_lvalue_qualified = 1 << 3, - is_rvalue_qualified = 1 << 4, + is_lvalue_qualified = 1 << 2, + is_rvalue_qualified = 1 << 3, }; enum class number_flags : std::uint32_t { - is_signed = 1 << 1, - is_unsigned = 1 << 2, - is_integral = 1 << 3, - is_floating_point = 1 << 4, + is_signed = 1 << 0, + is_unsigned = 1 << 1, + is_integral = 1 << 2, + is_floating_point = 1 << 3, }; enum class pointer_flags : std::uint32_t { diff --git a/manuals/.clang-tidy b/manuals/.clang-tidy index 13fda4f..7f0ca8e 100644 --- a/manuals/.clang-tidy +++ b/manuals/.clang-tidy @@ -9,6 +9,8 @@ Checks: '-*, -cppcoreguidelines-avoid-c-arrays, -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-avoid-non-const-global-variables, + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, + -cppcoreguidelines-pro-bounds-pointer-arithmetic, -cppcoreguidelines-special-member-functions, modernize-*, diff --git a/untests/.clang-tidy b/untests/.clang-tidy index 13fda4f..7f0ca8e 100644 --- a/untests/.clang-tidy +++ b/untests/.clang-tidy @@ -9,6 +9,8 @@ Checks: '-*, -cppcoreguidelines-avoid-c-arrays, -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-avoid-non-const-global-variables, + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, + -cppcoreguidelines-pro-bounds-pointer-arithmetic, -cppcoreguidelines-special-member-functions, modernize-*,