36 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
37 #define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
51 template <
typename FunctionImpl>
59 template <
typename Result,
typename ArgumentTuple>
71 template <
class Class,
typename MethodPtr>
77 template <
typename Result,
typename ArgumentTuple>
97 template<
typename InputIterator,
typename OutputIterator>
101 for (; first != last; ++first, ++
output) {
113 template <
typename FunctionImpl>
115 FunctionImpl function_impl) {
122 template <
class Class,
typename MethodPtr>
124 Class* obj_ptr, MethodPtr method_ptr) {
133 template <
typename InnerAction>
134 inline internal::WithArgsAction<InnerAction>
144 template <
int k,
typename InnerAction>
145 inline internal::WithArgsAction<InnerAction, k>
156 # pragma warning(push)
157 # pragma warning(disable:4100)
162 HAS_1_TEMPLATE_PARAMS(
int,
k),
163 AND_0_VALUE_PARAMS()) {
164 return ::testing::get<k>(
args);
170 HAS_1_TEMPLATE_PARAMS(
int,
k),
171 AND_1_VALUE_PARAMS(pointer)) {
172 *pointer = ::testing::get<k>(
args);
178 HAS_1_TEMPLATE_PARAMS(
int,
k),
179 AND_1_VALUE_PARAMS(pointer)) {
180 *pointer = *::testing::get<k>(
args);
186 HAS_1_TEMPLATE_PARAMS(
int,
k),
187 AND_1_VALUE_PARAMS(
value)) {
193 SetArgReferee_must_be_used_with_a_reference_argument);
203 HAS_1_TEMPLATE_PARAMS(
int,
k),
204 AND_2_VALUE_PARAMS(first, last)) {
209 ::std::copy(first, last, ::testing::get<k>(
args));
216 HAS_1_TEMPLATE_PARAMS(
int,
k),
217 AND_0_VALUE_PARAMS()) {
218 delete ::testing::get<k>(
args);
222 ACTION_P(ReturnPointee, pointer) {
return *pointer; }
226 #if GTEST_HAS_EXCEPTIONS
230 # pragma warning(push) // Saves the current warning state.
231 # pragma warning(disable:4702) // Temporarily disables warning 4702.
233 ACTION_P(Throw, exception) {
throw exception; }
235 # pragma warning(pop) // Restores the warning state.
238 #endif // GTEST_HAS_EXCEPTIONS
241 # pragma warning(pop)
246 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_