1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-25 13:41:56 +03:00

🔨 clean up

This commit is contained in:
Niels Lohmann
2017-09-10 01:12:03 +02:00
parent b21d7810fa
commit fcba9ec537
3 changed files with 115 additions and 27 deletions

View File

@ -3501,23 +3501,18 @@ class primitive_iterator_t
/// return whether the iterator can be dereferenced
constexpr bool is_begin() const noexcept
{
return (m_it == begin_value);
return m_it == begin_value;
}
/// return whether the iterator is at end
constexpr bool is_end() const noexcept
{
return (m_it == end_value);
return m_it == end_value;
}
friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
{
return (lhs.m_it == rhs.m_it);
}
friend constexpr bool operator!=(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
{
return not(lhs == rhs);
return lhs.m_it == rhs.m_it;
}
friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
@ -3525,21 +3520,6 @@ class primitive_iterator_t
return lhs.m_it < rhs.m_it;
}
friend constexpr bool operator<=(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
{
return lhs.m_it <= rhs.m_it;
}
friend constexpr bool operator>(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
{
return lhs.m_it > rhs.m_it;
}
friend constexpr bool operator>=(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
{
return lhs.m_it >= rhs.m_it;
}
primitive_iterator_t operator+(difference_type i)
{
auto result = *this;
@ -3600,7 +3580,7 @@ class primitive_iterator_t
static constexpr difference_type end_value = begin_value + 1;
/// iterator as signed integer type
difference_type m_it = std::numeric_limits<std::ptrdiff_t>::denorm_min();
difference_type m_it = std::numeric_limits<std::ptrdiff_t>::min();
};
/*!
@ -9049,7 +9029,7 @@ class basic_json
@liveexample{The following code exemplifies `type()` for all JSON
types.,type}
@sa @ref operator value_t() -- return the type of the JSON value (implicit)
@sa @ref operator value_t() -- return the type of the JSON value (implicit)
@sa @ref type_name() -- return the type as string
@since version 1.0.0
@ -13090,7 +13070,7 @@ class basic_json
types.,type_name}
@sa @ref type() -- return the type of the JSON value
@sa @ref operator value_t() -- return the type of the JSON value (implicit)
@sa @ref operator value_t() -- return the type of the JSON value (implicit)
@since version 1.0.0, public since 2.1.0, `const char*` and `noexcept`
since 3.0.0