mirror of
https://github.com/nlohmann/json.git
synced 2025-07-19 17:03:16 +03:00
Capture exceptions by const& in docs. (#4099)
This commit is contained in:
@ -15,7 +15,7 @@ int main()
|
||||
{
|
||||
int housenumber = j["address"]["housenumber"];
|
||||
}
|
||||
catch (json::exception& e)
|
||||
catch (const json::exception& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
Reference in New Issue
Block a user