1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-13 20:21:48 +03:00

add noexcept checks, and some missing noexcepts

This commit is contained in:
Théo DELRIEU
2017-01-14 02:20:53 +01:00
parent 1554baa01d
commit b8012876a5
3 changed files with 31 additions and 2 deletions

View File

@ -843,9 +843,10 @@ struct adl_serializer
}
template <typename Json, typename T>
static void to_json(Json& j, T&& val)
static void to_json(Json &j, T &&val) noexcept(
noexcept(::nlohmann::to_json(j, std::forward<T>(val))))
{
::nlohmann::to_json(j, std::forward<T>(val));
::nlohmann::to_json(j, std::forward<T>(val));
}
};