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
{{ message }}
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.
The value in m_value may be parsed at runtime, but that doesn't matter here. This is dealing with JsonValue, which is a private template used as an internal implementation detail of Json, which supports only a known, fixed number of value types, identified by the type tag. Note that by the time we reach a call to this function (in operator== below) we've already checked the type tag and know the two values are of the same type. We always consider values of different types to be non-equal. This function only handles values of the same type, and thus simply uses static_cast to cast the argument to the correct sublcass and access m_value as the correct type.
in json11.cpp line 161 , why use static_cast, what if a json object is a runtime parsed object
The text was updated successfully, but these errors were encountered: