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
Hi! I have been using json["enabled"].get<bool*>() alot and it works perfectly fine. But I cannot get pointers for int and float. For fun I tried other types and I was suprised to see that int64_t did work.
I would expect this to work
int *value = config["range"].get<int*>();
float *health = config["health"].get<float*>();
// this one does work, why?int64_t *range = config["range"].get<int64_t*>();
Actual results
Severity Code Description Project File Line Suppression State
Error C2338 incompatible pointer type Chosseling c:\users\ik\documents\visual studio 2015\projects\dc\rust\commonsdk\src\json.hpp 3385
Error C2664 'const double *nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer>::get_impl_ptr(const double *) noexcept const': cannot convert argument 1 from 'int *' to 'std::map<StringType,nlohmann::basic_json<std::map,std::vector,StringType,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer>,std::less<StringType>,std::allocator<std::pair<const StringType,nlohmann::basic_json<std::map,std::vector,StringType,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer>>>> *' Chosseling c:\users\ik\documents\visual studio 2015\projects\dc\rust\commonsdk\src\json.hpp 3388
I am not sure if this is a bug or not, if someone could clear this up that would be awesome! 👍
The text was updated successfully, but these errors were encountered:
Hi! I have been using
json["enabled"].get<bool*>()
alot and it works perfectly fine. But I cannot get pointers forint
andfloat
. For fun I tried other types and I was suprised to see thatint64_t
did work.I would expect this to work
Actual results
I am not sure if this is a bug or not, if someone could clear this up that would be awesome! 👍
The text was updated successfully, but these errors were encountered: