Spicy
hilti
toolchain
include
ast
id.h
1
// Copyright (c) 2020-now by the Zeek Project. See LICENSE for details.
2
3
#pragma once
4
5
#include <iostream>
6
#include <string>
7
8
#include <hilti/ast/meta.h>
9
#include <hilti/base/id-base.h>
10
#include <hilti/base/util.h>
11
12
namespace
hilti {
13
15
class
ID
:
public
detail::IDBase
<ID> {
16
public
:
17
using
IDBase::IDBase;
18
};
19
20
inline
std::ostream& operator<<(std::ostream& out,
const
ID
&
id
) {
21
out << std::string(
id
);
22
return
out;
23
}
24
25
}
// namespace hilti
26
27
namespace
std {
28
template
<>
29
struct
hash<hilti::ID> {
30
std::size_t operator()(
const
hilti::ID
&
id
)
const
{
return
hash<std::string>()(id); }
31
};
32
}
// namespace std
hilti::ID
Definition:
id.h:15
hilti::detail::IDBase
Definition:
id-base.h:29
Generated by
1.9.1