File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ int json::get() const
414414 switch (type_)
415415 {
416416 case (value_t ::number):
417- return value_.number ;
417+ return static_cast < int >( value_.number ) ;
418418 case (value_t ::number_float):
419419 return static_cast <int >(value_.number_float );
420420 default :
@@ -2371,7 +2371,7 @@ std::string json::parser::codePointToUTF8(unsigned int codePoint) const
23712371 {
23722372 // Can't be tested without direct access to this private method.
23732373 std::string errorMessage = " Invalid codePoint: " ;
2374- errorMessage += codePoint;
2374+ errorMessage += static_cast < char >( codePoint) ;
23752375 error (errorMessage);
23762376 }
23772377}
@@ -2584,6 +2584,8 @@ void json::parser::expect(const char c)
25842584
25852585}
25862586
2587+
2588+ #if !_MSC_VER
25872589/* !
25882590This operator implements a user-defined string literal for JSON objects. It can
25892591be used by adding \p "_json" to a string literal and returns a JSON object if
@@ -2596,3 +2598,4 @@ nlohmann::json operator "" _json(const char* s, std::size_t)
25962598{
25972599 return nlohmann::json::parse (s);
25982600}
2601+ #endif
You can’t perform that action at this time.
0 commit comments