mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-15 03:45:30 +07:00
fix more warnings
This commit is contained in:
@@ -30,9 +30,7 @@ target_compile_options(${PROJECT_NAME}
|
|||||||
-Wno-c++98-compat
|
-Wno-c++98-compat
|
||||||
-Wno-c++98-compat-pedantic
|
-Wno-c++98-compat-pedantic
|
||||||
-Wno-covered-switch-default
|
-Wno-covered-switch-default
|
||||||
-Wno-ctad-maybe-unsupported
|
|
||||||
-Wno-exit-time-destructors
|
-Wno-exit-time-destructors
|
||||||
-Wno-float-equal
|
|
||||||
-Wno-global-constructors
|
-Wno-global-constructors
|
||||||
-Wno-padded
|
-Wno-padded
|
||||||
-Wno-shadow-field-in-constructor
|
-Wno-shadow-field-in-constructor
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ namespace enum_hpp::bitflags
|
|||||||
}\
|
}\
|
||||||
template < typename Enum >\
|
template < typename Enum >\
|
||||||
constexpr bitflags<Enum> operator op (bitflags<Enum> l, Enum r) noexcept {\
|
constexpr bitflags<Enum> operator op (bitflags<Enum> l, Enum r) noexcept {\
|
||||||
return l op bitflags{r};\
|
return l op bitflags<Enum>{r};\
|
||||||
}\
|
}\
|
||||||
template < typename Enum >\
|
template < typename Enum >\
|
||||||
constexpr bitflags<Enum> operator op (bitflags<Enum> l, bitflags<Enum> r) noexcept {\
|
constexpr bitflags<Enum> operator op (bitflags<Enum> l, bitflags<Enum> r) noexcept {\
|
||||||
@@ -141,7 +141,7 @@ namespace enum_hpp::bitflags
|
|||||||
}\
|
}\
|
||||||
template < typename Enum >\
|
template < typename Enum >\
|
||||||
constexpr bitflags<Enum>& operator op##= (bitflags<Enum>& l, Enum r) noexcept {\
|
constexpr bitflags<Enum>& operator op##= (bitflags<Enum>& l, Enum r) noexcept {\
|
||||||
return l = l op bitflags{r};\
|
return l = l op bitflags<Enum>{r};\
|
||||||
}\
|
}\
|
||||||
template < typename Enum >\
|
template < typename Enum >\
|
||||||
constexpr bitflags<Enum>& operator op##= (bitflags<Enum>& l, bitflags<Enum> r) noexcept {\
|
constexpr bitflags<Enum>& operator op##= (bitflags<Enum>& l, bitflags<Enum> r) noexcept {\
|
||||||
@@ -319,14 +319,14 @@ namespace enum_hpp::bitflags
|
|||||||
|
|
||||||
#define ENUM_HPP_OPERATORS_DECL(Enum)\
|
#define ENUM_HPP_OPERATORS_DECL(Enum)\
|
||||||
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator~ [[maybe_unused]] (Enum l) noexcept {\
|
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator~ [[maybe_unused]] (Enum l) noexcept {\
|
||||||
return ~::enum_hpp::bitflags::bitflags(l);\
|
return ~::enum_hpp::bitflags::bitflags<Enum>(l);\
|
||||||
}\
|
}\
|
||||||
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator| [[maybe_unused]] (Enum l, Enum r) noexcept {\
|
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator| [[maybe_unused]] (Enum l, Enum r) noexcept {\
|
||||||
return ::enum_hpp::bitflags::bitflags(l) | ::enum_hpp::bitflags::bitflags(r);\
|
return ::enum_hpp::bitflags::bitflags<Enum>(l) | ::enum_hpp::bitflags::bitflags<Enum>(r);\
|
||||||
}\
|
}\
|
||||||
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator& [[maybe_unused]] (Enum l, Enum r) noexcept {\
|
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator& [[maybe_unused]] (Enum l, Enum r) noexcept {\
|
||||||
return ::enum_hpp::bitflags::bitflags(l) & ::enum_hpp::bitflags::bitflags(r);\
|
return ::enum_hpp::bitflags::bitflags<Enum>(l) & ::enum_hpp::bitflags::bitflags<Enum>(r);\
|
||||||
}\
|
}\
|
||||||
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator^ [[maybe_unused]] (Enum l, Enum r) noexcept {\
|
constexpr ::enum_hpp::bitflags::bitflags<Enum> operator^ [[maybe_unused]] (Enum l, Enum r) noexcept {\
|
||||||
return ::enum_hpp::bitflags::bitflags(l) ^ ::enum_hpp::bitflags::bitflags(r);\
|
return ::enum_hpp::bitflags::bitflags<Enum>(l) ^ ::enum_hpp::bitflags::bitflags<Enum>(r);\
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ namespace meta_hpp::detail
|
|||||||
{
|
{
|
||||||
template < typename T >
|
template < typename T >
|
||||||
requires requires(const T& l, const T& r) {
|
requires requires(const T& l, const T& r) {
|
||||||
{ l == r } -> stdex::convertible_to<bool>;
|
{ std::equal_to<>{}(l, r) } -> stdex::convertible_to<bool>;
|
||||||
}
|
}
|
||||||
struct equals_traits<T> {
|
struct equals_traits<T> {
|
||||||
bool operator()(const T& l, const T& r) const {
|
bool operator()(const T& l, const T& r) const {
|
||||||
return l == r;
|
return std::equal_to<>{}(l, r);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ namespace meta_hpp::detail
|
|||||||
{
|
{
|
||||||
template < typename T >
|
template < typename T >
|
||||||
requires requires(const T& l, const T& r) {
|
requires requires(const T& l, const T& r) {
|
||||||
{ l < r } -> stdex::convertible_to<bool>;
|
{ std::less<>{}(l, r) } -> stdex::convertible_to<bool>;
|
||||||
}
|
}
|
||||||
struct less_traits<T> {
|
struct less_traits<T> {
|
||||||
bool operator()(const T& l, const T& r) const {
|
bool operator()(const T& l, const T& r) const {
|
||||||
return l < r;
|
return std::less<>{}(l, r);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator<(const evalue_index& l, const evalue_index& r) noexcept {
|
inline bool operator<(const evalue_index& l, const evalue_index& r) noexcept {
|
||||||
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
|
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const evalue_index& l, const evalue_index& r) noexcept {
|
inline bool operator==(const evalue_index& l, const evalue_index& r) noexcept {
|
||||||
return l.type_ == r.type_ && l.name_ == r.name_;
|
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator<(const function_index& l, const function_index& r) noexcept {
|
inline bool operator<(const function_index& l, const function_index& r) noexcept {
|
||||||
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
|
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const function_index& l, const function_index& r) noexcept {
|
inline bool operator==(const function_index& l, const function_index& r) noexcept {
|
||||||
return l.type_ == r.type_ && l.name_ == r.name_;
|
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator<(const member_index& l, const member_index& r) noexcept {
|
inline bool operator<(const member_index& l, const member_index& r) noexcept {
|
||||||
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
|
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const member_index& l, const member_index& r) noexcept {
|
inline bool operator==(const member_index& l, const member_index& r) noexcept {
|
||||||
return l.type_ == r.type_ && l.name_ == r.name_;
|
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator<(const method_index& l, const method_index& r) noexcept {
|
inline bool operator<(const method_index& l, const method_index& r) noexcept {
|
||||||
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
|
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const method_index& l, const method_index& r) noexcept {
|
inline bool operator==(const method_index& l, const method_index& r) noexcept {
|
||||||
return l.type_ == r.type_ && l.name_ == r.name_;
|
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator<(const scope_index& l, const scope_index& r) noexcept {
|
inline bool operator<(const scope_index& l, const scope_index& r) noexcept {
|
||||||
return l.name_ < r.name_;
|
return std::less<>{}(l.name_, r.name_);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const scope_index& l, const scope_index& r) noexcept {
|
inline bool operator==(const scope_index& l, const scope_index& r) noexcept {
|
||||||
return l.name_ == r.name_;
|
return std::equal_to<>{}(l.name_, r.name_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ namespace meta_hpp
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator<(const variable_index& l, const variable_index& r) noexcept {
|
inline bool operator<(const variable_index& l, const variable_index& r) noexcept {
|
||||||
return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_);
|
return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const variable_index& l, const variable_index& r) noexcept {
|
inline bool operator==(const variable_index& l, const variable_index& r) noexcept {
|
||||||
return l.type_ == r.type_ && l.name_ == r.name_;
|
return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user