-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
I get the following error when trying to use the header:
C:\...\httplib.h:2039:26: error: no matching function for call to 'all_of'
2039 | return !str.empty() && std::all_of(str.begin(), str.end(), ::isdigit);
| ^~~~~~~~~~~
C:\...\MSVC\...\include\algorithm:1256:30: note: candidate template ignored: couldn't infer template argument '_Pr'
1256 | _NODISCARD _CONSTEXPR20 bool all_of(_InIt _First, _InIt _Last, _Pr _Pred) { // test if all elements satisfy _Pred
| ^
C:\...\MSVC\...\include\algorithm:1271:17: note: candidate function template not viable: requires 4 arguments, but 3 were provided
1271 | _NODISCARD bool all_of(_ExPo&&, _FwdIt _First, _FwdIt _Last, _Pr _Pred) noexcept; // terminates
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
I see that you already use a lambda workaround here
return std::all_of(str.cbegin(), str.cend(),
[](unsigned char c) { return std::isdigit(c); });
Would it be possible to use the same thing for this ?
Metadata
Metadata
Assignees
Labels
No labels