Skip to content

Commit

Permalink
fix: remove static_assert of find
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Jan 24, 2024
1 parent 2db2aae commit ab2cea1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions include/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1613,8 +1613,6 @@ template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_array<string_t>::find(size_t pos) const
{
static_assert(std::is_constructible_v<value_t, basic_value<string_t>>,
"Type can NOT be constructed by basic_value");
if (!contains(pos)) {
return std::nullopt;
}
Expand Down Expand Up @@ -1942,8 +1940,6 @@ template <typename string_t>
template <typename value_t>
inline std::optional<value_t> basic_object<string_t>::find(const string_t& key) const
{
static_assert(std::is_constructible_v<value_t, basic_value<string_t>>,
"value_t can NOT be constructed by basic_value");
auto iter = _object_data.find(key);
if (iter == _object_data.end()) {
return std::nullopt;
Expand Down

0 comments on commit ab2cea1

Please sign in to comment.