diff --git a/headers/meta.hpp/meta_field.hpp b/headers/meta.hpp/meta_field.hpp index e42cce6..1cba987 100644 --- a/headers/meta.hpp/meta_field.hpp +++ b/headers/meta.hpp/meta_field.hpp @@ -23,10 +23,9 @@ namespace meta_hpp::field_detail }; template < typename T, typename Base > - struct field_traits { + struct field_traits + : field_traits { static constexpr bool is_const = true; - using value_type = T; - using instance_type = Base; }; template < auto Field > @@ -42,7 +41,7 @@ namespace meta_hpp::field_detail } template < auto Field > - void setter(void* instance, value value) { + void setter([[maybe_unused]] void* instance, value value) { using ft = field_traits; using value_type = typename ft::value_type; using instance_type = typename ft::instance_type; diff --git a/headers/meta.hpp/meta_function.hpp b/headers/meta.hpp/meta_function.hpp index 81680f9..e11b333 100644 --- a/headers/meta.hpp/meta_function.hpp +++ b/headers/meta.hpp/meta_function.hpp @@ -32,7 +32,7 @@ namespace meta_hpp::function_detail using return_type = typename ft::return_type; using argument_types = typename ft::argument_types; - auto typed_arguments = std::make_tuple( + [[maybe_unused]] auto typed_arguments = std::make_tuple( (args + Is)->try_cast>()...); if ( !(std::get(typed_arguments) && ...) ) { diff --git a/headers/meta.hpp/meta_method.hpp b/headers/meta.hpp/meta_method.hpp index 2d908ca..8ce683a 100644 --- a/headers/meta.hpp/meta_method.hpp +++ b/headers/meta.hpp/meta_method.hpp @@ -39,13 +39,13 @@ namespace meta_hpp::method_detail : method_traits {}; template < auto Method, std::size_t... Is > - value invoke(void* instance, value* args, std::index_sequence) { + value invoke([[maybe_unused]] void* instance, value* args, std::index_sequence) { using mt = method_traits; using return_type = typename mt::return_type; using instance_type = typename mt::instance_type; using argument_types = typename mt::argument_types; - auto typed_arguments = std::make_tuple( + [[maybe_unused]] auto typed_arguments = std::make_tuple( (args + Is)->try_cast>()...); if ( !(std::get(typed_arguments) && ...) ) { @@ -77,13 +77,13 @@ namespace meta_hpp::method_detail } template < auto Method, std::size_t... Is > - value cinvoke(const void* instance, value* args, std::index_sequence) { + value cinvoke([[maybe_unused]] const void* instance, value* args, std::index_sequence) { using mt = method_traits; using return_type = typename mt::return_type; using instance_type = typename mt::instance_type; using argument_types = typename mt::argument_types; - auto typed_arguments = std::make_tuple( + [[maybe_unused]] auto typed_arguments = std::make_tuple( (args + Is)->try_cast>()...); if ( !(std::get(typed_arguments) && ...) ) { diff --git a/headers/meta.hpp/meta_variable.hpp b/headers/meta.hpp/meta_variable.hpp index 6698570..0b840a6 100644 --- a/headers/meta.hpp/meta_variable.hpp +++ b/headers/meta.hpp/meta_variable.hpp @@ -99,8 +99,6 @@ namespace meta_hpp template < auto Variable > class variable_ { public: - static_assert(std::is_pointer_v); - explicit variable_(std::string id) : info_(std::move(id)) { info_.getter_ = &variable_detail::getter;