diff options
author | Gennadiy Civil <misterg@google.com> | 2018-03-13 11:13:37 -0400 |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-03-13 11:13:37 -0400 |
commit | af463c43ac22279239c1b8065ded7026b9224de1 (patch) | |
tree | c28fdbabdd33d3153ac0ab86ec4e9e9ff57dc46a /googlemock | |
parent | cf9d6344d28020b70c634c898fe798c862148668 (diff) | |
download | googletest-af463c43ac22279239c1b8065ded7026b9224de1.tar.gz googletest-af463c43ac22279239c1b8065ded7026b9224de1.zip |
More merges, removing old dead code
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 11 | ||||
-rw-r--r-- | googlemock/test/gmock-actions_test.cc | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 845c8232..90fd2ea6 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -46,9 +46,10 @@ #include "gmock/internal/gmock-internal-utils.h" #include "gmock/internal/gmock-port.h" -#if GTEST_HAS_STD_TYPE_TRAITS_ // Defined by gtest-port.h via gmock-port.h. +#if GTEST_LANG_CXX11 // Defined by gtest-port.h via gmock-port.h. +#include <functional> #include <type_traits> -#endif +#endif // GTEST_LANG_CXX11 namespace testing { @@ -96,7 +97,7 @@ struct BuiltInDefaultValueGetter<T, false> { template <typename T> class BuiltInDefaultValue { public: -#if GTEST_HAS_STD_TYPE_TRAITS_ +#if GTEST_LANG_CXX11 // This function returns true iff type T has a built-in default value. static bool Exists() { return ::std::is_default_constructible<T>::value; @@ -107,7 +108,7 @@ class BuiltInDefaultValue { T, ::std::is_default_constructible<T>::value>::Get(); } -#else // GTEST_HAS_STD_TYPE_TRAITS_ +#else // GTEST_LANG_CXX11 // This function returns true iff type T has a built-in default value. static bool Exists() { return false; @@ -117,7 +118,7 @@ class BuiltInDefaultValue { return BuiltInDefaultValueGetter<T, false>::Get(); } -#endif // GTEST_HAS_STD_TYPE_TRAITS_ +#endif // GTEST_LANG_CXX11 }; // This partial specialization says that we use the same built-in diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc index 9447c22b..01286634 100644 --- a/googlemock/test/gmock-actions_test.cc +++ b/googlemock/test/gmock-actions_test.cc @@ -218,7 +218,7 @@ class MyNonDefaultConstructible { int value_; }; -#if GTEST_HAS_STD_TYPE_TRAITS_ +#if GTEST_LANG_CXX11 TEST(BuiltInDefaultValueTest, ExistsForDefaultConstructibleType) { EXPECT_TRUE(BuiltInDefaultValue<MyDefaultConstructible>::Exists()); @@ -228,7 +228,7 @@ TEST(BuiltInDefaultValueTest, IsDefaultConstructedForDefaultConstructibleType) { EXPECT_EQ(42, BuiltInDefaultValue<MyDefaultConstructible>::Get().value()); } -#endif // GTEST_HAS_STD_TYPE_TRAITS_ +#endif // GTEST_LANG_CXX11 TEST(BuiltInDefaultValueTest, DoesNotExistForNonDefaultConstructibleType) { EXPECT_FALSE(BuiltInDefaultValue<MyNonDefaultConstructible>::Exists()); |