Commit 6a7ec6ab authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

bindings: Use std::enable_if_t<T> instead of std::enable_if<T>::type.

The former was introduced in C++14 and is slightly more concise than the
latter. This has no user-visible changes.

Change-Id: Iaabfb3cd52f7d577ab2d26ec6b162dc25292536b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940184
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719951}
parent 2b1e898b
...@@ -36,7 +36,7 @@ struct NativeValueTraitsBase { ...@@ -36,7 +36,7 @@ struct NativeValueTraitsBase {
template <typename T> template <typename T>
struct NativeValueTraitsBase< struct NativeValueTraitsBase<
T, T,
typename std::enable_if<std::is_base_of<IDLBase, T>::value>::type> { std::enable_if_t<std::is_base_of<IDLBase, T>::value>> {
using ImplType = typename T::ImplType; using ImplType = typename T::ImplType;
STATIC_ONLY(NativeValueTraitsBase); STATIC_ONLY(NativeValueTraitsBase);
}; };
......
...@@ -662,8 +662,7 @@ struct NativeValueTraits<IDLRecord<K, V>> ...@@ -662,8 +662,7 @@ struct NativeValueTraits<IDLRecord<K, V>>
template <typename T> template <typename T>
struct NativeValueTraits< struct NativeValueTraits<
T, T,
typename std::enable_if< std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
std::is_base_of<CallbackFunctionBase, T>::value>::type>
: public NativeValueTraitsBase<T> { : public NativeValueTraitsBase<T> {
static T* NativeValue(v8::Isolate* isolate, static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value, v8::Local<v8::Value> value,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment