Avoid overloading std::swap around OpenVR's Json::Value
std::swap overloads without exception specification are warned by cl.exe
and clang-cl on C++17 mode, that belongs to -Wmicrosoft-exception-spec:
../../third_party/openvr/src/src/json/json.h(1227,13): error: 'swap<Json::Value, void>' is missing exception specification 'noexcept' [-Werror,-Wmicrosoft-exception-spec]
inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); }
As ADL based dispatch is preferred for this case, and upstream
jsoncpp[1] already does it, this CL adopts it too.
[1]: Upstream jsoncpp commit: https://github.com/open-source-parsers/jsoncpp/commit/1d95628ba84189cd81fbabf70add5c1baf2912c5
OpenVR SDK has not rolled to this.
Change-Id: I82494ef5aca5ff0df431f94f65ae8439c41977b5
Reviewed-on: https://chromium-review.googlesource.com/1179422Reviewed-by:
Bill Orr <billorr@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584428}
Showing
Please register or sign in to comment