]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/20_util/headers/functional/synopsis.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / headers / functional / synopsis.cc
CommitLineData
a024740d 1// { dg-do compile }
8468bfe8 2// { dg-require-normal-namespace "" }
a024740d 3
8d9254fc 4// Copyright (C) 2007-2020 Free Software Foundation, Inc.
a024740d
BK
5//
6// This file is part of the GNU ISO C++ Library. This library is free
7// software; you can redistribute it and/or modify it under the
8// terms of the GNU General Public License as published by the
748086b7 9// Free Software Foundation; either version 3, or (at your option)
a024740d
BK
10// any later version.
11
12// This library is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16
17// You should have received a copy of the GNU General Public License along
748086b7
JJ
18// with this library; see the file COPYING3. If not see
19// <http://www.gnu.org/licenses/>.
a024740d 20
f8356d52
JM
21// { dg-options "-Wno-deprecated" }
22
a024740d
BK
23#include <functional>
24
25namespace std {
26 // lib.base, base:
27 template <class Arg, class Result> struct unary_function;
28 template <class Arg1, class Arg2, class Result> struct binary_function;
29
30 // lib.arithmetic.operations, arithmetic operations:
31 template <class T> struct plus;
32 template <class T> struct minus;
33 template <class T> struct multiplies;
34 template <class T> struct divides;
35 template <class T> struct modulus;
36 template <class T> struct negate;
37
38 // lib.comparisons, comparisons:
39 template <class T> struct equal_to;
40 template <class T> struct not_equal_to;
41 template <class T> struct greater;
42 template <class T> struct less;
43 template <class T> struct greater_equal;
44 template <class T> struct less_equal;
45
46 // lib.logical.operations, logical operations:
47 template <class T> struct logical_and;
48 template <class T> struct logical_or;
49 template <class T> struct logical_not;
50
51 // lib.negators, negators:
52 template <class Predicate> struct unary_negate;
53 template <class Predicate>
839473d0 54 _GLIBCXX14_CONSTEXPR
a024740d
BK
55 unary_negate<Predicate> not1(const Predicate&);
56 template <class Predicate> struct binary_negate;
57 template <class Predicate>
839473d0 58 _GLIBCXX14_CONSTEXPR
a024740d
BK
59 binary_negate<Predicate> not2(const Predicate&);
60
61 // lib.binders, binders:
62 template <class Operation> class binder1st;
63 template <class Operation, class T>
64 binder1st<Operation> bind1st(const Operation&, const T&);
65 template <class Operation> class binder2nd;
66 template <class Operation, class T>
67 binder2nd<Operation> bind2nd(const Operation&, const T&);
68
69 // lib.function.pointer.adaptors, adaptors:
70 template <class Arg, class Result> class pointer_to_unary_function;
71 template <class Arg, class Result>
72 pointer_to_unary_function<Arg,Result> ptr_fun(Result (*)(Arg));
73 template <class Arg1, class Arg2, class Result>
74 class pointer_to_binary_function;
75 template <class Arg1, class Arg2, class Result>
76 pointer_to_binary_function<Arg1,Arg2,Result>
77 ptr_fun(Result (*)(Arg1,Arg2));
78
79 // lib.member.pointer.adaptors, adaptors:
80 template<class S, class T> class mem_fun_t;
81 template<class S, class T, class A> class mem_fun1_t;
82 template<class S, class T>
83 mem_fun_t<S,T> mem_fun(S (T::*f)());
84 template<class S, class T, class A>
85 mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A));
86 template<class S, class T> class mem_fun_ref_t;
87 template<class S, class T, class A> class mem_fun1_ref_t;
88 template<class S, class T>
89 mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)());
90 template<class S, class T, class A>
91 mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A));
92
93 template <class S, class T> class const_mem_fun_t;
94 template <class S, class T, class A> class const_mem_fun1_t;
95 template <class S, class T>
96 const_mem_fun_t<S,T> mem_fun(S (T::*f)() const);
97 template <class S, class T, class A>
98 const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const);
99 template <class S, class T> class const_mem_fun_ref_t;
100 template <class S, class T, class A> class const_mem_fun1_ref_t;
101 template <class S, class T>
102 const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const);
103 template <class S, class T, class A>
104 const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const);
105}