From db1b739943e9ea996105239573e3c38a50bf38cc Mon Sep 17 00:00:00 2001 From: kuzkry Date: Fri, 23 Aug 2019 11:57:56 -0400 Subject: 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 --- .../include/gmock/internal/gmock-internal-utils.h | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'googlemock/include/gmock/internal/gmock-internal-utils.h') diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 5386f48f..cea8ef6e 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -170,27 +170,27 @@ GMOCK_DECLARE_KIND_(long double, kFloatingPoint); // From, and kToKind is the kind of To; the value is // implementation-defined when the above pre-condition is violated. template -struct LosslessArithmeticConvertibleImpl : public false_type {}; +struct LosslessArithmeticConvertibleImpl : public std::false_type {}; // Converting bool to bool is lossless. template <> struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT + : public std::true_type {}; // Converting bool to any integer type is lossless. template struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT + : public std::true_type {}; // Converting bool to any floating-point type is lossless. template struct LosslessArithmeticConvertibleImpl - : public true_type {}; // NOLINT + : public std::true_type {}; // Converting an integer to bool is lossy. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public std::false_type {}; // Converting an integer to another non-bool integer is lossless if // the target type's range encloses the source type's range. @@ -211,17 +211,17 @@ struct LosslessArithmeticConvertibleImpl // the format of a floating-point number is implementation-defined. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public std::false_type {}; // Converting a floating-point to bool is lossy. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public std::false_type {}; // Converting a floating-point to an integer is lossy. template struct LosslessArithmeticConvertibleImpl - : public false_type {}; // NOLINT + : public std::false_type {}; // Converting a floating-point to another floating-point is lossless // if the target type is at least as big as the source type. @@ -470,11 +470,6 @@ struct RemoveConstFromKey > { typedef std::pair type; }; -// Mapping from booleans to types. Similar to boost::bool_ and -// std::integral_constant. -template -struct BooleanConstant {}; - // Emit an assertion failure due to incorrect DoDefault() usage. Out-of-lined to // reduce code size. GTEST_API_ void IllegalDoDefault(const char* file, int line); -- cgit v1.2.3