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