diff options
author | kuzkry <krystian.kuzniarek@gmail.com> | 2019-08-23 15:57:56 (GMT) |
---|---|---|
committer | Xiaoyi Zhang <zhangxy@google.com> | 2019-08-23 20:39:13 (GMT) |
commit | db1b739943e9ea996105239573e3c38a50bf38cc (patch) | |
tree | 3fd11dcc8ef32305a28117f165d83d4e5873ae5b /googletest | |
parent | 46525e1e5dfcb0a3c195bc2f94859b196e7cba76 (diff) | |
download | googletest-db1b739943e9ea996105239573e3c38a50bf38cc.zip googletest-db1b739943e9ea996105239573e3c38a50bf38cc.tar.gz googletest-db1b739943e9ea996105239573e3c38a50bf38cc.tar.bz2 |
Googletest export
Merge b8ca465e73ac0954a0c9eec2a84bdd8913d5763b into 90a443f9c2437ca8a682a1ac625eba64e1d74a8a
Closes #2396
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/googletest/pull/2396 from kuzkry:custom-type-traits-true/false_type-and-bool_constant b8ca465e73ac0954a0c9eec2a84bdd8913d5763b
PiperOrigin-RevId: 265064856
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/include/gtest/internal/gtest-internal.h | 2 | ||||
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 3313445..37daf21 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -946,7 +946,7 @@ template <typename C, struct IsRecursiveContainerImpl; template <typename C> -struct IsRecursiveContainerImpl<C, false> : public false_type {}; +struct IsRecursiveContainerImpl<C, false> : public std::false_type {}; // Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to // obey the same inconsistencies as the IsContainerTest, namely check if diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index eaa1970..a637602 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -1898,15 +1898,8 @@ class GTEST_API_ ThreadLocal { // we cannot detect it. GTEST_API_ size_t GetThreadCount(); -template <bool bool_value> -struct bool_constant { - typedef bool_constant<bool_value> type; - static const bool value = bool_value; -}; -template <bool bool_value> const bool bool_constant<bool_value>::value; - -typedef bool_constant<false> false_type; -typedef bool_constant<true> true_type; +template <bool B> +using bool_constant = std::integral_constant<bool, B>; template <typename Iterator> struct IteratorTraits { |