You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under msvc the following error messages( excerpted)
Translator.cpp(19): note: Reason: cannot convert from 'overloaded-function' to 'nlohmann::detail::input_adapter'
Translator.cpp(19): note: No constructor could take the source type, or constructor overload resolution was ambiguous
Translator.cpp(23): error C2664: 'nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer> nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer>::parse(nlohmann::detail::input_adapter &&,const std::function<bool (int,nlohmann::detail::parser<nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer>>::parse_event_t,BasicJsonType &)>,const bool)': cannot convert argument 1 from 'std::ifstream (__cdecl *)(std::string)' to 'nlohmann::detail::input_adapter &&'
1
gcc under compiler explorer has a similar error message
<source>: In function 'void doesnt_compile(std::string_view)':
<source>:17:39: error: no matching function for call to 'nlohmann::basic_json<>::parse(std::ifstream (&)(std::string))'
17 | auto j = nlohmann::json::parse(in);
|
Which compiler and operating system are you using?
What is the issue you have?
The following fails to compile
even though this does compile
Please describe the steps to reproduce the issue.
See https://www.godbolt.org/z/GKr9hE
Can you provide a small but working code example?
What is the expected behavior?
Should compile
And what is the actual behavior instead?
Under msvc the following error messages( excerpted)
gcc under compiler explorer has a similar error message
Which compiler and operating system are you using?
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you compile and run the unit tests?
The text was updated successfully, but these errors were encountered: