mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-14 19:41:29 +07:00
fix msvc warnings
This commit is contained in:
@@ -19,8 +19,8 @@ namespace meta_hpp
|
||||
public:
|
||||
static_assert(std::is_member_object_pointer_v<FieldType>);
|
||||
|
||||
explicit field_(std::string id, FieldType field)
|
||||
: info_{std::move(id), field} {}
|
||||
explicit field_(std::string id, FieldType field_ptr)
|
||||
: info_{std::move(id), field_ptr} {}
|
||||
|
||||
operator const field_info&() const noexcept {
|
||||
return info_;
|
||||
|
||||
@@ -128,10 +128,10 @@ namespace meta_hpp
|
||||
friend class field_;
|
||||
|
||||
template < typename FieldType >
|
||||
field_info(std::string id, FieldType field)
|
||||
field_info(std::string id, FieldType field_ptr)
|
||||
: id_{std::move(id)}
|
||||
, getter_{field_detail::make_getter(field)}
|
||||
, setter_{field_detail::make_setter(field)} {}
|
||||
, getter_{field_detail::make_getter(field_ptr)}
|
||||
, setter_{field_detail::make_setter(field_ptr)} {}
|
||||
private:
|
||||
std::string id_;
|
||||
field_detail::field_getter getter_;
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace meta_hpp
|
||||
public:
|
||||
static_assert(std::is_function_v<std::remove_pointer_t<FunctionType>>);
|
||||
|
||||
explicit function_(std::string id, FunctionType function)
|
||||
: info_{std::move(id), function} {}
|
||||
explicit function_(std::string id, FunctionType function_ptr)
|
||||
: info_{std::move(id), function_ptr} {}
|
||||
|
||||
operator const function_info&() const noexcept {
|
||||
return info_;
|
||||
|
||||
@@ -117,9 +117,9 @@ namespace meta_hpp
|
||||
friend class function_;
|
||||
|
||||
template < typename FunctionType >
|
||||
function_info(std::string id, FunctionType function)
|
||||
function_info(std::string id, FunctionType function_ptr)
|
||||
: id_{std::move(id)}
|
||||
, invoke_{function_detail::make_invoke(function)} {}
|
||||
, invoke_{function_detail::make_invoke(function_ptr)} {}
|
||||
private:
|
||||
std::string id_;
|
||||
function_detail::function_invoke invoke_;
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace meta_hpp
|
||||
public:
|
||||
static_assert(std::is_member_function_pointer_v<MethodType>);
|
||||
|
||||
explicit method_(std::string id, MethodType method)
|
||||
: info_{std::move(id), method} {}
|
||||
explicit method_(std::string id, MethodType method_ptr)
|
||||
: info_{std::move(id), method_ptr} {}
|
||||
|
||||
operator const method_info&() const {
|
||||
return info_;
|
||||
|
||||
@@ -196,10 +196,10 @@ namespace meta_hpp
|
||||
friend class method_;
|
||||
|
||||
template < typename MethodType >
|
||||
method_info(std::string id, MethodType method)
|
||||
method_info(std::string id, MethodType method_ptr)
|
||||
: id_{std::move(id)}
|
||||
, invoke_{method_detail::make_invoke(method)}
|
||||
, cinvoke_{method_detail::make_cinvoke(method)} {}
|
||||
, invoke_{method_detail::make_invoke(method_ptr)}
|
||||
, cinvoke_{method_detail::make_cinvoke(method_ptr)} {}
|
||||
private:
|
||||
std::string id_;
|
||||
method_detail::method_invoke invoke_;
|
||||
|
||||
@@ -17,8 +17,10 @@ namespace meta_hpp
|
||||
template < typename VariableType >
|
||||
class variable_ {
|
||||
public:
|
||||
explicit variable_(std::string id, VariableType variable)
|
||||
: info_{std::move(id), variable} {}
|
||||
static_assert(std::is_pointer_v<VariableType>);
|
||||
|
||||
explicit variable_(std::string id, VariableType variable_ptr)
|
||||
: info_{std::move(id), variable_ptr} {}
|
||||
|
||||
operator const variable_info&() const noexcept {
|
||||
return info_;
|
||||
|
||||
@@ -113,10 +113,10 @@ namespace meta_hpp
|
||||
friend class variable_;
|
||||
|
||||
template < typename VariableType >
|
||||
variable_info(std::string id, VariableType variable)
|
||||
variable_info(std::string id, VariableType variable_ptr)
|
||||
: id_{std::move(id)}
|
||||
, getter_{variable_detail::make_getter(variable)}
|
||||
, setter_{variable_detail::make_setter(variable)} {}
|
||||
, getter_{variable_detail::make_getter(variable_ptr)}
|
||||
, setter_{variable_detail::make_setter(variable_ptr)} {}
|
||||
private:
|
||||
std::string id_;
|
||||
variable_detail::variable_getter getter_;
|
||||
|
||||
Reference in New Issue
Block a user