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