diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2018-05-31 11:11:57 +0200 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-06-01 09:58:27 +0200 |
commit | 352a525eb984b8fa2d6f0f6fd68395e6a080bba4 (patch) | |
tree | a105ae93f8fd8f533cce19a429f1b6e95d6e11ca /deps/v8/src/base/logging.h | |
parent | faf449ca0490f5371dc6cbbc94a87eb697b00fcc (diff) | |
download | android-node-v8-352a525eb984b8fa2d6f0f6fd68395e6a080bba4.tar.gz android-node-v8-352a525eb984b8fa2d6f0f6fd68395e6a080bba4.tar.bz2 android-node-v8-352a525eb984b8fa2d6f0f6fd68395e6a080bba4.zip |
deps: update V8 to 6.7.288.43
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/base/logging.h')
-rw-r--r-- | deps/v8/src/base/logging.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/deps/v8/src/base/logging.h b/deps/v8/src/base/logging.h index a21bc5e423..baf6b12ccb 100644 --- a/deps/v8/src/base/logging.h +++ b/deps/v8/src/base/logging.h @@ -106,11 +106,25 @@ V8_BASE_EXPORT void SetDcheckFunction(void (*dcheck_Function)(const char*, int, // Define PrintCheckOperand<T> for each T which defines operator<< for ostream. template <typename T> -typename std::enable_if<has_output_operator<T>::value>::type PrintCheckOperand( - std::ostream& os, T val) { +typename std::enable_if< + !std::is_function<typename std::remove_pointer<T>::type>::value && + has_output_operator<T>::value>::type +PrintCheckOperand(std::ostream& os, T val) { os << std::forward<T>(val); } +// Provide an overload for functions and function pointers. Function pointers +// don't implicitly convert to void* but do implicitly convert to bool, so +// without this function pointers are always printed as 1 or 0. (MSVC isn't +// standards-conforming here and converts function pointers to regular +// pointers, so this is a no-op for MSVC.) +template <typename T> +typename std::enable_if< + std::is_function<typename std::remove_pointer<T>::type>::value>::type +PrintCheckOperand(std::ostream& os, T val) { + os << reinterpret_cast<const void*>(val); +} + // Define PrintCheckOperand<T> for enums which have no operator<<. template <typename T> typename std::enable_if<std::is_enum<T>::value && |