Vcsn  2.3
Be Rational
empty.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <functional> // std::hash
4 
5 namespace vcsn
6 {
8  struct empty_t
9  {};
10 
11  // So that we can make a map with empty_t as key, for
12  // mutable_automaton's entries.
13  inline
15  {
16  return false;
17  }
18 
19  // For unordered containers.
20  inline
22  {
23  return true;
24  }
25 }
26 
27 namespace std
28 {
29  // For unordered containers.
30  template <>
31  struct hash<vcsn::empty_t>
32  {
33  size_t operator()(vcsn::empty_t) const
34  {
35  return 0;
36  }
37  };
38 }
Empty labels, for LAO.
Definition: empty.hh:8
STL namespace.
Definition: a-star.hh:8
bool operator<(empty_t, empty_t)
Definition: empty.hh:14
size_t operator()(vcsn::empty_t) const
Definition: empty.hh:33
bool operator==(empty_t, empty_t)
Definition: empty.hh:21