aboutsummaryrefslogtreecommitdiffstats
path: root/include/gmock/gmock-actions.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-08-07 07:15:56 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-08-07 07:15:56 +0000
commit9571b28675a5a602ed3c8a7acf270d03aca69c96 (patch)
tree787fabc0e1b32018bff805f4acd84f23d045fbe7 /include/gmock/gmock-actions.h
parenta18423e0ee0c5cfe69948e4f4d0826dc8fe15f8c (diff)
downloadgoogletest-9571b28675a5a602ed3c8a7acf270d03aca69c96.tar.gz
googletest-9571b28675a5a602ed3c8a7acf270d03aca69c96.tar.bz2
googletest-9571b28675a5a602ed3c8a7acf270d03aca69c96.zip
Removes duplicated definition of SetArgumentPointee (by Vlad Losev); Makes gmock compilable on platforms that don't have ::abort() (by Acadeli Checa); Fixes compatibility with Symbian's STLport (by Acadeli Checa).
Diffstat (limited to 'include/gmock/gmock-actions.h')
-rw-r--r--include/gmock/gmock-actions.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/include/gmock/gmock-actions.h b/include/gmock/gmock-actions.h
index 49d5532d..c8edc8ab 100644
--- a/include/gmock/gmock-actions.h
+++ b/include/gmock/gmock-actions.h
@@ -669,39 +669,6 @@ class SetArgumentPointeeAction<N, Proto, true> {
const internal::linked_ptr<Proto> proto_;
};
-// Implements the SetArrayArgument<N>(first, last) action for any function
-// whose N-th argument (0-based) is a pointer or iterator to a type that can be
-// implicitly converted from *first.
-template <size_t N, typename InputIterator>
-class SetArrayArgumentAction {
- public:
- // Constructs an action that sets the variable pointed to by the
- // N-th function argument to 'value'.
- explicit SetArrayArgumentAction(InputIterator first, InputIterator last)
- : first_(first), last_(last) {
- }
-
- template <typename Result, typename ArgumentTuple>
- void Perform(const ArgumentTuple& args) const {
- CompileAssertTypesEqual<void, Result>();
-
- // Microsoft compiler deprecates ::std::copy, so we want to suppress warning
- // 4996 (Function call with parameters that may be unsafe) there.
-#if GTEST_OS_WINDOWS
-#pragma warning(push) // Saves the current warning state.
-#pragma warning(disable:4996) // Temporarily disables warning 4996.
-#endif // GTEST_OS_WINDOWS
- ::std::copy(first_, last_, ::std::tr1::get<N>(args));
-#if GTEST_OS_WINDOWS
-#pragma warning(pop) // Restores the warning state.
-#endif // GTEST_OS_WINDOWS
- }
-
- private:
- const InputIterator first_;
- const InputIterator last_;
-};
-
// Implements the InvokeWithoutArgs(f) action. The template argument
// FunctionImpl is the implementation type of f, which can be either a
// function pointer or a functor. InvokeWithoutArgs(f) can be used as an
@@ -939,16 +906,6 @@ SetArgumentPointee(const T& x) {
N, T, internal::IsAProtocolMessage<T>::value>(x));
}
-// Creates an action that sets the elements of the array pointed to by the N-th
-// (0-based) function argument, which can be either a pointer or an iterator,
-// to the values of the elements in the source range [first, last).
-template <size_t N, typename InputIterator>
-PolymorphicAction<internal::SetArrayArgumentAction<N, InputIterator> >
-SetArrayArgument(InputIterator first, InputIterator last) {
- return MakePolymorphicAction(internal::SetArrayArgumentAction<
- N, InputIterator>(first, last));
-}
-
// Creates an action that sets a pointer referent to a given value.
template <typename T1, typename T2>
PolymorphicAction<internal::AssignAction<T1, T2> > Assign(T1* ptr, T2 val) {