diff --git a/CMakeLists.txt b/CMakeLists.txt index f69d397..3756690 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ target_compile_options(${PROJECT_NAME} -Wno-extra-semi-stmt -Wno-float-equal -Wno-global-constructors + -Wno-ordered-compare-function-pointers -Wno-padded -Wno-reserved-identifier -Wno-shadow-field diff --git a/headers/meta.hpp/meta_states.hpp b/headers/meta.hpp/meta_states.hpp index 9115cd4..43287bf 100644 --- a/headers/meta.hpp/meta_states.hpp +++ b/headers/meta.hpp/meta_states.hpp @@ -79,21 +79,21 @@ namespace meta_hpp struct as_copy final {}; struct as_pointer final {}; struct as_reference_wrapper final {}; - }; + } namespace method_policy { struct as_copy final {}; struct discard_return final {}; struct return_reference_as_pointer final {}; - }; + } namespace variable_policy { struct as_copy final {}; struct as_pointer final {}; struct as_reference_wrapper final {}; - }; + } template < typename Policy > concept ctor_policy_kind = @@ -384,7 +384,7 @@ namespace meta_hpp::detail const value underlying_value; template < enum_kind Enum > - [[nodiscard]] static evalue_state_ptr make(std::string name, Enum value); + [[nodiscard]] static evalue_state_ptr make(std::string name, Enum evalue); }; struct function_state final { @@ -431,10 +431,10 @@ namespace meta_hpp::detail struct scope_state final { const scope_index index; - class_map classes; - enum_map enums; - function_map functions; - variable_map variables; + class_map classes{}; + enum_map enums{}; + function_map functions{}; + variable_map variables{}; [[nodiscard]] static scope_state_ptr make(std::string name); [[nodiscard]] static scope_state_ptr get_static(std::string_view name); diff --git a/headers/meta.hpp/meta_states/evalue.hpp b/headers/meta.hpp/meta_states/evalue.hpp index 73c4a41..26e6f6e 100644 --- a/headers/meta.hpp/meta_states/evalue.hpp +++ b/headers/meta.hpp/meta_states/evalue.hpp @@ -14,12 +14,12 @@ namespace meta_hpp::detail { template < enum_kind Enum > - evalue_state_ptr evalue_state::make(std::string name, Enum value) { + evalue_state_ptr evalue_state::make(std::string name, Enum evalue) { evalue_index index{enum_type_data::get_static(), std::move(name)}; return std::make_shared(evalue_state{ .index{std::move(index)}, - .enum_value{value}, - .underlying_value{stdex::to_underlying(value)}, + .enum_value{value{evalue}}, + .underlying_value{value{stdex::to_underlying(evalue)}}, }); } } diff --git a/headers/meta.hpp/meta_utilities/value.hpp b/headers/meta.hpp/meta_utilities/value.hpp index 571a61f..8be8b74 100644 --- a/headers/meta.hpp/meta_utilities/value.hpp +++ b/headers/meta.hpp/meta_utilities/value.hpp @@ -243,14 +243,14 @@ namespace meta_hpp namespace meta_hpp { - template < detail::has_value_less_traits T > + template < typename T > [[nodiscard]] bool operator<(const value& l, const T& r) { const any_type& r_type = resolve_type(); return (l.get_type() < r_type) || (l.get_type() == r_type && std::less<>{}(l.cast(), r)); } - template < detail::has_value_less_traits T > + template < typename T > [[nodiscard]] bool operator<(const T& l, const value& r) { const any_type& l_type = resolve_type(); return (l_type < r.get_type()) @@ -265,13 +265,13 @@ namespace meta_hpp namespace meta_hpp { - template < detail::has_value_equals_traits T > + template < typename T > [[nodiscard]] bool operator==(const value& l, const T& r) { return l.get_type() == resolve_type() && std::equal_to<>{}(l.cast(), r); } - template < detail::has_value_equals_traits T > + template < typename T > [[nodiscard]] bool operator==(const T& l, const value& r) { return resolve_type() == r.get_type() && std::equal_to<>{}(l, r.cast());