forked from OSchip/llvm-project
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:
parent
aadb635e04
commit
dd11c8fb0d
|
@ -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)) {}
|
||||
|
|
Loading…
Reference in New Issue