mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-15 03:45:30 +07:00
fix new clang-tidy warnings
This commit is contained in:
@@ -1839,6 +1839,7 @@ namespace meta_hpp
|
|||||||
external,
|
external,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-union-access)
|
||||||
struct storage_u final {
|
struct storage_u final {
|
||||||
union {
|
union {
|
||||||
internal_storage_t internal;
|
internal_storage_t internal;
|
||||||
@@ -4166,6 +4167,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
template < typename F >
|
template < typename F >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
void for_each_type(F&& f) const {
|
void for_each_type(F&& f) const {
|
||||||
const locker lock;
|
const locker lock;
|
||||||
|
|
||||||
@@ -4355,6 +4357,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
template < typename F >
|
template < typename F >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
void for_each_scope(F&& f) const {
|
void for_each_scope(F&& f) const {
|
||||||
const locker lock;
|
const locker lock;
|
||||||
|
|
||||||
@@ -4400,6 +4403,7 @@ namespace meta_hpp::detail
|
|||||||
namespace meta_hpp
|
namespace meta_hpp
|
||||||
{
|
{
|
||||||
template < type_family Type = any_type, typename F >
|
template < type_family Type = any_type, typename F >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
void for_each_type(F&& f) {
|
void for_each_type(F&& f) {
|
||||||
using namespace detail;
|
using namespace detail;
|
||||||
type_registry& registry = type_registry::instance();
|
type_registry& registry = type_registry::instance();
|
||||||
@@ -4418,6 +4422,7 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
template < typename T >
|
template < typename T >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
[[nodiscard]] auto resolve_type(T&&) {
|
[[nodiscard]] auto resolve_type(T&&) {
|
||||||
using namespace detail;
|
using namespace detail;
|
||||||
type_registry& registry = type_registry::instance();
|
type_registry& registry = type_registry::instance();
|
||||||
@@ -4442,6 +4447,7 @@ namespace meta_hpp
|
|||||||
namespace meta_hpp
|
namespace meta_hpp
|
||||||
{
|
{
|
||||||
template < typename T >
|
template < typename T >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
[[nodiscard]] auto resolve_poly_type(T&& from) {
|
[[nodiscard]] auto resolve_poly_type(T&& from) {
|
||||||
using namespace detail;
|
using namespace detail;
|
||||||
|
|
||||||
@@ -5984,6 +5990,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
template < typename T, typename Tp = std::decay_t<T> >
|
template < typename T, typename Tp = std::decay_t<T> >
|
||||||
requires(!uvalue_family<Tp>)
|
requires(!uvalue_family<Tp>)
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
explicit uarg_base(type_registry& registry, T&&)
|
explicit uarg_base(type_registry& registry, T&&)
|
||||||
: uarg_base{registry, type_list<T&&>{}} {}
|
: uarg_base{registry, type_list<T&&>{}} {}
|
||||||
|
|
||||||
@@ -6005,6 +6012,7 @@ namespace meta_hpp::detail
|
|||||||
: ref_type_{ref_types::const_lvalue}
|
: ref_type_{ref_types::const_lvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-param-not-moved)
|
||||||
explicit uarg_base(type_registry&, uvalue&& v)
|
explicit uarg_base(type_registry&, uvalue&& v)
|
||||||
: ref_type_{ref_types::rvalue}
|
: ref_type_{ref_types::rvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
@@ -6326,9 +6334,9 @@ namespace meta_hpp::detail
|
|||||||
template < typename ArgTypeList, typename F >
|
template < typename ArgTypeList, typename F >
|
||||||
auto unchecked_call_with_uargs(type_registry& registry, std::span<const uarg> args, F&& f) {
|
auto unchecked_call_with_uargs(type_registry& registry, std::span<const uarg> args, F&& f) {
|
||||||
META_HPP_DEV_ASSERT(args.size() == type_list_arity_v<ArgTypeList>);
|
META_HPP_DEV_ASSERT(args.size() == type_list_arity_v<ArgTypeList>);
|
||||||
return [args, ®istry, &f]<std::size_t... Is>(std::index_sequence<Is...>) {
|
return [args, ®istry]<std::size_t... Is>(auto&& captured_f, std::index_sequence<Is...>) {
|
||||||
return f(args[Is].cast<type_list_at_t<Is, ArgTypeList>>(registry)...);
|
return std::invoke(META_HPP_FWD(captured_f), args[Is].cast<type_list_at_t<Is, ArgTypeList>>(registry)...);
|
||||||
}(std::make_index_sequence<type_list_arity_v<ArgTypeList>>());
|
}(META_HPP_FWD(f), std::make_index_sequence<type_list_arity_v<ArgTypeList>>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6584,6 +6592,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
template < typename T, typename Tp = std::decay_t<T> >
|
template < typename T, typename Tp = std::decay_t<T> >
|
||||||
requires(!uvalue_family<Tp>)
|
requires(!uvalue_family<Tp>)
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
explicit uinst_base(type_registry& registry, T&&)
|
explicit uinst_base(type_registry& registry, T&&)
|
||||||
: uinst_base{registry, type_list<T&&>{}} {}
|
: uinst_base{registry, type_list<T&&>{}} {}
|
||||||
|
|
||||||
@@ -6605,6 +6614,7 @@ namespace meta_hpp::detail
|
|||||||
: ref_type_{ref_types::const_lvalue}
|
: ref_type_{ref_types::const_lvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-param-not-moved)
|
||||||
explicit uinst_base(type_registry&, uvalue&& v)
|
explicit uinst_base(type_registry&, uvalue&& v)
|
||||||
: ref_type_{ref_types::rvalue}
|
: ref_type_{ref_types::rvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
@@ -9392,6 +9402,7 @@ namespace meta_hpp
|
|||||||
|
|
||||||
template < typename To, typename From >
|
template < typename To, typename From >
|
||||||
requires detail::lvalue_reference_ucast_kind<To, From>
|
requires detail::lvalue_reference_ucast_kind<To, From>
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
To ucast(From&& from) {
|
To ucast(From&& from) {
|
||||||
using from_data_type = std::remove_reference_t<From>;
|
using from_data_type = std::remove_reference_t<From>;
|
||||||
using to_data_type = std::remove_reference_t<To>;
|
using to_data_type = std::remove_reference_t<To>;
|
||||||
@@ -9715,6 +9726,7 @@ namespace meta_hpp
|
|||||||
static vtable_t table{
|
static vtable_t table{
|
||||||
.type = resolve_type<Tp>(),
|
.type = resolve_type<Tp>(),
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-param-not-moved)
|
||||||
.move{[](uvalue&& self, uvalue& to) noexcept {
|
.move{[](uvalue&& self, uvalue& to) noexcept {
|
||||||
META_HPP_DEV_ASSERT(!to);
|
META_HPP_DEV_ASSERT(!to);
|
||||||
META_HPP_DEV_ASSERT(self);
|
META_HPP_DEV_ASSERT(self);
|
||||||
|
|||||||
2
develop/vendors/vmath.hpp
vendored
2
develop/vendors/vmath.hpp
vendored
Submodule develop/vendors/vmath.hpp updated: fd8dfef29b...ed47c535f7
@@ -21,7 +21,6 @@ ConstructorInitializerIndentWidth: 0
|
|||||||
FixNamespaceComments: false
|
FixNamespaceComments: false
|
||||||
IndentPPDirectives: AfterHash
|
IndentPPDirectives: AfterHash
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
LambdaBodyIndentation: OuterScope
|
|
||||||
NamespaceIndentation: All
|
NamespaceIndentation: All
|
||||||
PackConstructorInitializers: Never
|
PackConstructorInitializers: Never
|
||||||
PenaltyBreakAssignment: 100
|
PenaltyBreakAssignment: 100
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Diagnostics:
|
Diagnostics:
|
||||||
|
UnusedIncludes: None
|
||||||
|
MissingIncludes: None
|
||||||
ClangTidy:
|
ClangTidy:
|
||||||
Add:
|
Add:
|
||||||
- bugprone-*
|
- bugprone-*
|
||||||
@@ -20,7 +22,7 @@ Diagnostics:
|
|||||||
- misc-unused-using-decls
|
- misc-unused-using-decls
|
||||||
- modernize-use-trailing-return-type
|
- modernize-use-trailing-return-type
|
||||||
- readability-identifier-length
|
- readability-identifier-length
|
||||||
- readability-named-parameter``
|
- readability-named-parameter
|
||||||
- readability-redundant-access-specifiers
|
- readability-redundant-access-specifiers
|
||||||
- readability-simplify-boolean-expr
|
- readability-simplify-boolean-expr
|
||||||
- readability-use-anyofallof
|
- readability-use-anyofallof
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
template < typename F >
|
template < typename F >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
void for_each_scope(F&& f) const {
|
void for_each_scope(F&& f) const {
|
||||||
const locker lock;
|
const locker lock;
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
template < typename F >
|
template < typename F >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
void for_each_type(F&& f) const {
|
void for_each_type(F&& f) const {
|
||||||
const locker lock;
|
const locker lock;
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
template < typename T, typename Tp = std::decay_t<T> >
|
template < typename T, typename Tp = std::decay_t<T> >
|
||||||
requires(!uvalue_family<Tp>)
|
requires(!uvalue_family<Tp>)
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
explicit uarg_base(type_registry& registry, T&&)
|
explicit uarg_base(type_registry& registry, T&&)
|
||||||
: uarg_base{registry, type_list<T&&>{}} {}
|
: uarg_base{registry, type_list<T&&>{}} {}
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ namespace meta_hpp::detail
|
|||||||
: ref_type_{ref_types::const_lvalue}
|
: ref_type_{ref_types::const_lvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-param-not-moved)
|
||||||
explicit uarg_base(type_registry&, uvalue&& v)
|
explicit uarg_base(type_registry&, uvalue&& v)
|
||||||
: ref_type_{ref_types::rvalue}
|
: ref_type_{ref_types::rvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
@@ -378,8 +380,8 @@ namespace meta_hpp::detail
|
|||||||
template < typename ArgTypeList, typename F >
|
template < typename ArgTypeList, typename F >
|
||||||
auto unchecked_call_with_uargs(type_registry& registry, std::span<const uarg> args, F&& f) {
|
auto unchecked_call_with_uargs(type_registry& registry, std::span<const uarg> args, F&& f) {
|
||||||
META_HPP_DEV_ASSERT(args.size() == type_list_arity_v<ArgTypeList>);
|
META_HPP_DEV_ASSERT(args.size() == type_list_arity_v<ArgTypeList>);
|
||||||
return [args, ®istry, &f]<std::size_t... Is>(std::index_sequence<Is...>) {
|
return [args, ®istry]<std::size_t... Is>(auto&& captured_f, std::index_sequence<Is...>) {
|
||||||
return f(args[Is].cast<type_list_at_t<Is, ArgTypeList>>(registry)...);
|
return std::invoke(META_HPP_FWD(captured_f), args[Is].cast<type_list_at_t<Is, ArgTypeList>>(registry)...);
|
||||||
}(std::make_index_sequence<type_list_arity_v<ArgTypeList>>());
|
}(META_HPP_FWD(f), std::make_index_sequence<type_list_arity_v<ArgTypeList>>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace meta_hpp::detail
|
|||||||
|
|
||||||
template < typename T, typename Tp = std::decay_t<T> >
|
template < typename T, typename Tp = std::decay_t<T> >
|
||||||
requires(!uvalue_family<Tp>)
|
requires(!uvalue_family<Tp>)
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
explicit uinst_base(type_registry& registry, T&&)
|
explicit uinst_base(type_registry& registry, T&&)
|
||||||
: uinst_base{registry, type_list<T&&>{}} {}
|
: uinst_base{registry, type_list<T&&>{}} {}
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ namespace meta_hpp::detail
|
|||||||
: ref_type_{ref_types::const_lvalue}
|
: ref_type_{ref_types::const_lvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-param-not-moved)
|
||||||
explicit uinst_base(type_registry&, uvalue&& v)
|
explicit uinst_base(type_registry&, uvalue&& v)
|
||||||
: ref_type_{ref_types::rvalue}
|
: ref_type_{ref_types::rvalue}
|
||||||
, raw_type_{v.get_type()} {}
|
, raw_type_{v.get_type()} {}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
namespace meta_hpp
|
namespace meta_hpp
|
||||||
{
|
{
|
||||||
template < type_family Type = any_type, typename F >
|
template < type_family Type = any_type, typename F >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
void for_each_type(F&& f) {
|
void for_each_type(F&& f) {
|
||||||
using namespace detail;
|
using namespace detail;
|
||||||
type_registry& registry = type_registry::instance();
|
type_registry& registry = type_registry::instance();
|
||||||
@@ -35,6 +36,7 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
template < typename T >
|
template < typename T >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
[[nodiscard]] auto resolve_type(T&&) {
|
[[nodiscard]] auto resolve_type(T&&) {
|
||||||
using namespace detail;
|
using namespace detail;
|
||||||
type_registry& registry = type_registry::instance();
|
type_registry& registry = type_registry::instance();
|
||||||
@@ -59,6 +61,7 @@ namespace meta_hpp
|
|||||||
namespace meta_hpp
|
namespace meta_hpp
|
||||||
{
|
{
|
||||||
template < typename T >
|
template < typename T >
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
[[nodiscard]] auto resolve_poly_type(T&& from) {
|
[[nodiscard]] auto resolve_poly_type(T&& from) {
|
||||||
using namespace detail;
|
using namespace detail;
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ namespace meta_hpp
|
|||||||
|
|
||||||
template < typename To, typename From >
|
template < typename To, typename From >
|
||||||
requires detail::lvalue_reference_ucast_kind<To, From>
|
requires detail::lvalue_reference_ucast_kind<To, From>
|
||||||
|
// NOLINTNEXTLINE(*-missing-std-forward)
|
||||||
To ucast(From&& from) {
|
To ucast(From&& from) {
|
||||||
using from_data_type = std::remove_reference_t<From>;
|
using from_data_type = std::remove_reference_t<From>;
|
||||||
using to_data_type = std::remove_reference_t<To>;
|
using to_data_type = std::remove_reference_t<To>;
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ namespace meta_hpp
|
|||||||
external,
|
external,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-union-access)
|
||||||
struct storage_u final {
|
struct storage_u final {
|
||||||
union {
|
union {
|
||||||
internal_storage_t internal;
|
internal_storage_t internal;
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ namespace meta_hpp
|
|||||||
static vtable_t table{
|
static vtable_t table{
|
||||||
.type = resolve_type<Tp>(),
|
.type = resolve_type<Tp>(),
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(*-param-not-moved)
|
||||||
.move{[](uvalue&& self, uvalue& to) noexcept {
|
.move{[](uvalue&& self, uvalue& to) noexcept {
|
||||||
META_HPP_DEV_ASSERT(!to);
|
META_HPP_DEV_ASSERT(!to);
|
||||||
META_HPP_DEV_ASSERT(self);
|
META_HPP_DEV_ASSERT(self);
|
||||||
|
|||||||
Reference in New Issue
Block a user