Skip to content

Commit

Permalink
Remove non-const overloads of front()
Browse files Browse the repository at this point in the history
Signed-off-by: Omar Mohamed <[email protected]>
  • Loading branch information
omar-mohamed-khallaf committed Sep 29, 2024
1 parent feaca3c commit 70f0250
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion include/jwt-cpp/jwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -2464,7 +2464,7 @@ namespace jwt {
is_iterable<array_type>::value &&
is_detected<value_type_t, array_type>::value &&
std::is_same<typename array_type::value_type, value_type>::value &&
!std::is_same<decltype(std::declval<array_type>().front()), void>::value;
std::is_member_function_pointer<decltype(&array_type::front)>::value;
};

template<typename string_type, typename integer_type>
Expand Down
2 changes: 0 additions & 2 deletions include/jwt-cpp/traits/danielaparker-jsoncons/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ namespace jwt {
};
class array_type : public json::array {
public:
value_type& front() { return this->operator[](0U); }

value_type const& front() const { return this->operator[](0U); }
};
using string_type = std::string; // current limitation of traits implementation
Expand Down
2 changes: 0 additions & 2 deletions include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ namespace jwt {
array_type& operator=(const array_type& o) = default;
array_type& operator=(array_type&& o) noexcept = default;

value_type& front() { return this->operator[](0U); }

value_type const& front() const { return this->operator[](0U); }
};
using number_type = double;
Expand Down

0 comments on commit 70f0250

Please sign in to comment.