Vaucanson  1.4.1
functors.hh
1 // functors.hh: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2005, 2006 The Vaucanson Group.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // The complete GNU General Public Licence Notice can be found as the
13 // `COPYING' file in the root directory.
14 //
15 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
16 //
17 #ifndef VCSN_MISC_FUNCTORS_HH
18 # define VCSN_MISC_FUNCTORS_HH
19 
20 # include <functional>
21 # include <utility>
22 
23 namespace vcsn
24 {
25  namespace misc
26  {
27 
28  template <typename T>
29  struct pair : public std::binary_function<T, T, std::pair<T, T > >
30  {
31  std::pair<T, T> operator () (T x, T y) const;
32  };
33 
34 
35  template <typename T>
36  struct discrepancy : public std::binary_function<T, T, std::pair<T, T> >
37  {
38  std::pair<T, T> operator () (T x, T y) const;
39  };
40 
41  } // End of namespace misc.
42 } // End of namespace vcsn.
43 
44 
45 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
46 # include <vaucanson/misc/functors.hxx>
47 # endif // VCSN_USE_INTERFACE_ONLY
48 
49 #endif // ! VCSN_MISC_FUNCTORS_HH