🎨 replace alternative operators (and, not, or)
This commit is contained in:
parent
4f04ea1bef
commit
0498202a03
22 changed files with 1300 additions and 1300 deletions
|
@ -423,7 +423,7 @@ class iter_impl
|
|||
*/
|
||||
bool operator!=(const iter_impl& other) const
|
||||
{
|
||||
return not operator==(other);
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -459,7 +459,7 @@ class iter_impl
|
|||
*/
|
||||
bool operator<=(const iter_impl& other) const
|
||||
{
|
||||
return not other.operator < (*this);
|
||||
return !other.operator < (*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -468,7 +468,7 @@ class iter_impl
|
|||
*/
|
||||
bool operator>(const iter_impl& other) const
|
||||
{
|
||||
return not operator<=(other);
|
||||
return !operator<=(other);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -477,7 +477,7 @@ class iter_impl
|
|||
*/
|
||||
bool operator>=(const iter_impl& other) const
|
||||
{
|
||||
return not operator<(other);
|
||||
return !operator<(other);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
@ -17,7 +17,7 @@ void int_to_string( string_type& target, std::size_t value )
|
|||
{
|
||||
target = std::to_string(value);
|
||||
}
|
||||
template <typename IteratorType> class iteration_proxy_value
|
||||
template<typename IteratorType> class iteration_proxy_value
|
||||
{
|
||||
public:
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
@ -131,7 +131,7 @@ template<typename IteratorType> class iteration_proxy
|
|||
// Structured Bindings Support
|
||||
// For further reference see https://blog.tartanllama.xyz/structured-bindings/
|
||||
// And see https://github.com/nlohmann/json/pull/1391
|
||||
template <std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0>
|
||||
template<std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0>
|
||||
auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key())
|
||||
{
|
||||
return i.key();
|
||||
|
@ -139,7 +139,7 @@ auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decl
|
|||
// Structured Bindings Support
|
||||
// For further reference see https://blog.tartanllama.xyz/structured-bindings/
|
||||
// And see https://github.com/nlohmann/json/pull/1391
|
||||
template <std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0>
|
||||
template<std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0>
|
||||
auto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value())
|
||||
{
|
||||
return i.value();
|
||||
|
@ -158,11 +158,11 @@ namespace std
|
|||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
template <typename IteratorType>
|
||||
template<typename IteratorType>
|
||||
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
|
||||
: public std::integral_constant<std::size_t, 2> {};
|
||||
|
||||
template <std::size_t N, typename IteratorType>
|
||||
template<std::size_t N, typename IteratorType>
|
||||
class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -9,10 +9,10 @@ namespace nlohmann
|
|||
{
|
||||
namespace detail
|
||||
{
|
||||
template <typename It, typename = void>
|
||||
template<typename It, typename = void>
|
||||
struct iterator_types {};
|
||||
|
||||
template <typename It>
|
||||
template<typename It>
|
||||
struct iterator_types <
|
||||
It,
|
||||
void_t<typename It::difference_type, typename It::value_type, typename It::pointer,
|
||||
|
@ -27,18 +27,18 @@ struct iterator_types <
|
|||
|
||||
// This is required as some compilers implement std::iterator_traits in a way that
|
||||
// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341.
|
||||
template <typename T, typename = void>
|
||||
template<typename T, typename = void>
|
||||
struct iterator_traits
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
template<typename T>
|
||||
struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >>
|
||||
: iterator_types<T>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
template<typename T>
|
||||
struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>
|
||||
{
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue