]>
Commit | Line | Data |
---|---|---|
a024740d BK |
1 | // { dg-do compile } |
2 | ||
3 | // Copyright (C) 2007 Free Software Foundation, Inc. | |
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 | |
8 | // Free Software Foundation; either version 2, or (at your option) | |
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 | |
17 | // with this library; see the file COPYING. If not, write to the Free | |
18 | // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
19 | // USA. | |
20 | ||
21 | #include <functional> | |
22 | ||
23 | namespace std { | |
24 | // lib.base, base: | |
25 | template <class Arg, class Result> struct unary_function; | |
26 | template <class Arg1, class Arg2, class Result> struct binary_function; | |
27 | ||
28 | // lib.arithmetic.operations, arithmetic operations: | |
29 | template <class T> struct plus; | |
30 | template <class T> struct minus; | |
31 | template <class T> struct multiplies; | |
32 | template <class T> struct divides; | |
33 | template <class T> struct modulus; | |
34 | template <class T> struct negate; | |
35 | ||
36 | // lib.comparisons, comparisons: | |
37 | template <class T> struct equal_to; | |
38 | template <class T> struct not_equal_to; | |
39 | template <class T> struct greater; | |
40 | template <class T> struct less; | |
41 | template <class T> struct greater_equal; | |
42 | template <class T> struct less_equal; | |
43 | ||
44 | // lib.logical.operations, logical operations: | |
45 | template <class T> struct logical_and; | |
46 | template <class T> struct logical_or; | |
47 | template <class T> struct logical_not; | |
48 | ||
49 | // lib.negators, negators: | |
50 | template <class Predicate> struct unary_negate; | |
51 | template <class Predicate> | |
52 | unary_negate<Predicate> not1(const Predicate&); | |
53 | template <class Predicate> struct binary_negate; | |
54 | template <class Predicate> | |
55 | binary_negate<Predicate> not2(const Predicate&); | |
56 | ||
57 | // lib.binders, binders: | |
58 | template <class Operation> class binder1st; | |
59 | template <class Operation, class T> | |
60 | binder1st<Operation> bind1st(const Operation&, const T&); | |
61 | template <class Operation> class binder2nd; | |
62 | template <class Operation, class T> | |
63 | binder2nd<Operation> bind2nd(const Operation&, const T&); | |
64 | ||
65 | // lib.function.pointer.adaptors, adaptors: | |
66 | template <class Arg, class Result> class pointer_to_unary_function; | |
67 | template <class Arg, class Result> | |
68 | pointer_to_unary_function<Arg,Result> ptr_fun(Result (*)(Arg)); | |
69 | template <class Arg1, class Arg2, class Result> | |
70 | class pointer_to_binary_function; | |
71 | template <class Arg1, class Arg2, class Result> | |
72 | pointer_to_binary_function<Arg1,Arg2,Result> | |
73 | ptr_fun(Result (*)(Arg1,Arg2)); | |
74 | ||
75 | // lib.member.pointer.adaptors, adaptors: | |
76 | template<class S, class T> class mem_fun_t; | |
77 | template<class S, class T, class A> class mem_fun1_t; | |
78 | template<class S, class T> | |
79 | mem_fun_t<S,T> mem_fun(S (T::*f)()); | |
80 | template<class S, class T, class A> | |
81 | mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A)); | |
82 | template<class S, class T> class mem_fun_ref_t; | |
83 | template<class S, class T, class A> class mem_fun1_ref_t; | |
84 | template<class S, class T> | |
85 | mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)()); | |
86 | template<class S, class T, class A> | |
87 | mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A)); | |
88 | ||
89 | template <class S, class T> class const_mem_fun_t; | |
90 | template <class S, class T, class A> class const_mem_fun1_t; | |
91 | template <class S, class T> | |
92 | const_mem_fun_t<S,T> mem_fun(S (T::*f)() const); | |
93 | template <class S, class T, class A> | |
94 | const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const); | |
95 | template <class S, class T> class const_mem_fun_ref_t; | |
96 | template <class S, class T, class A> class const_mem_fun1_ref_t; | |
97 | template <class S, class T> | |
98 | const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const); | |
99 | template <class S, class T, class A> | |
100 | const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const); | |
101 | } |