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