Fix SFINAE in JSON.h constructor.

Summary:
This used std::enable_if without referencing ::type.  Changed to use
std::enable_if_t.

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74381
This commit is contained in:
Justin Lebar 2020-02-10 19:38:44 -08:00
parent aadb635e04
commit dd11c8fb0d
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ public:
}
// Serializable types: with a toJSON(const T&)->Value function, found by ADL.
template <typename T,
typename = typename std::enable_if<std::is_same<
typename = std::enable_if_t<std::is_same<
Value, decltype(toJSON(*(const T *)nullptr))>::value>,
Value * = nullptr>
Value(const T &V) : Value(toJSON(V)) {}