]>
Commit | Line | Data |
---|---|---|
a024740d BK |
1 | // { dg-do compile } |
2 | ||
85ec4feb | 3 | // Copyright (C) 2007-2018 Free Software Foundation, Inc. |
a024740d BK |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
748086b7 | 8 | // Free Software Foundation; either version 3, or (at your option) |
a024740d BK |
9 | // any later version. |
10 | ||
11 | // This library is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | ||
16 | // You should have received a copy of the GNU General Public License along | |
748086b7 JJ |
17 | // with this library; see the file COPYING3. If not see |
18 | // <http://www.gnu.org/licenses/>. | |
a024740d BK |
19 | |
20 | #include <numeric> | |
21 | ||
22 | namespace std { | |
23 | template <class InputIterator, class T> | |
24 | T accumulate(InputIterator first, InputIterator last, T init); | |
25 | ||
26 | template <class InputIterator, class T, class BinaryOperation> | |
27 | T accumulate(InputIterator first, InputIterator last, T init, | |
28 | BinaryOperation binary_op); | |
29 | ||
30 | template <class InputIterator1, class InputIterator2, class T> | |
31 | T inner_product(InputIterator1 first1, InputIterator1 last1, | |
32 | InputIterator2 first2, T init); | |
33 | ||
34 | template <class InputIterator1, class InputIterator2, class T, | |
35 | class BinaryOperation1, class BinaryOperation2> | |
36 | T inner_product(InputIterator1 first1, InputIterator1 last1, | |
37 | InputIterator2 first2, T init, | |
38 | BinaryOperation1 binary_op1, | |
39 | BinaryOperation2 binary_op2); | |
40 | ||
41 | template <class InputIterator, class OutputIterator> | |
42 | OutputIterator partial_sum(InputIterator first, | |
43 | InputIterator last, | |
44 | OutputIterator result); | |
45 | ||
46 | template <class InputIterator, class OutputIterator, | |
47 | class BinaryOperation> | |
48 | OutputIterator partial_sum(InputIterator first, | |
49 | InputIterator last, | |
50 | OutputIterator result, | |
51 | BinaryOperation binary_op); | |
52 | ||
53 | template <class InputIterator, class OutputIterator> | |
54 | OutputIterator adjacent_difference(InputIterator first, | |
55 | InputIterator last, | |
56 | OutputIterator result); | |
57 | ||
58 | template <class InputIterator, class OutputIterator, | |
59 | class BinaryOperation> | |
60 | OutputIterator adjacent_difference(InputIterator first, | |
61 | InputIterator last, | |
62 | OutputIterator result, | |
63 | BinaryOperation binary_op); | |
64 | } |