Skip to content

Commit

Permalink
‘constexpr’ error
Browse files Browse the repository at this point in the history
httplib.h: In member function ‘constexpr size_t httplib::detail::case_ignore_hash::operator()(const string&) const’:
httplib.h:359:30: error: call to non-‘constexpr’ function ‘const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::data() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  359 |     return hash_core(key.data(), key.size(), 0);
  • Loading branch information
laowai9189 authored Sep 6, 2024
1 parent cb74e41 commit ae20fb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ struct case_ignore_equal {
};

struct case_ignore_hash {
constexpr size_t operator()(const std::string &key) const {
size_t operator()(const std::string &key) const {
return hash_core(key.data(), key.size(), 0);
}

Expand Down

0 comments on commit ae20fb0

Please sign in to comment.