Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
empty.hh
Go to the documentation of this file.
1 #ifndef VCSN_EMPTY_HH
2 # define VCSN_EMPTY_HH
3 
4 # include <functional> // std::hash
5 
6 namespace vcsn
7 {
9  struct empty_t
10  {};
11 
12  // So that we can make a map with empty_t as key, for
13  // mutable_automaton's entries.
14  inline
16  {
17  return false;
18  }
19 
20  // For unordered containers.
21  inline
23  {
24  return true;
25  }
26 }
27 
28 namespace std
29 {
30  // For unordered containers.
31  template <>
32  struct hash<vcsn::empty_t>
33  {
34  size_t operator()(vcsn::empty_t) const
35  {
36  return 0;
37  }
38  };
39 }
40 
41 #endif // !VCSN_EMPTY_HH
size_t operator()(vcsn::empty_t) const
Definition: empty.hh:34
bool operator==(empty_t, empty_t)
Definition: empty.hh:22
Empty labels, for LAO.
Definition: empty.hh:9
bool operator<(empty_t, empty_t)
Definition: empty.hh:15