remove custom implementations of std::is_same
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include "gmock/gmock-actions.h"
|
||||
@@ -1653,9 +1654,8 @@ class FunctionMocker<R(Args...)> final : public UntypedFunctionMockerBase {
|
||||
const OnCallSpec<F>* const spec = FindOnCallSpec(args);
|
||||
|
||||
if (spec == nullptr) {
|
||||
*os << (internal::type_equals<Result, void>::value ?
|
||||
"returning directly.\n" :
|
||||
"returning default value.\n");
|
||||
*os << (std::is_void<Result>::value ? "returning directly.\n"
|
||||
: "returning default value.\n");
|
||||
} else {
|
||||
*os << "taking default action specified at:\n"
|
||||
<< FormatFileLocation(spec->file(), spec->line()) << "\n";
|
||||
|
||||
@@ -359,10 +359,6 @@ GTEST_API_ WithoutMatchers GetWithoutMatchers();
|
||||
template <typename T> struct is_reference : public false_type {};
|
||||
template <typename T> struct is_reference<T&> : public true_type {};
|
||||
|
||||
// type_equals<T1, T2>::value is non-zero if T1 and T2 are the same type.
|
||||
template <typename T1, typename T2> struct type_equals : public false_type {};
|
||||
template <typename T> struct type_equals<T, T> : public true_type {};
|
||||
|
||||
// remove_reference<T>::type removes the reference from type T, if any.
|
||||
template <typename T> struct remove_reference { typedef T type; }; // NOLINT
|
||||
template <typename T> struct remove_reference<T&> { typedef T type; }; // NOLINT
|
||||
|
||||
Reference in New Issue
Block a user