Spicy
hilti
runtime
include
types
null.h
1
// Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details.
2
3
#pragma once
4
5
#include <arpa/inet.h>
6
7
#include <optional>
8
#include <ostream>
9
#include <string>
10
#include <variant>
11
12
#include <hilti/rt/extension-points.h>
13
14
namespace
hilti::rt
{
15
19
struct
Null
{
20
template
<
typename
T>
21
operator
std::optional<T>() {
22
return
std::nullopt;
23
}
24
};
25
26
namespace
detail::adl {
27
inline
std::string
to_string
(
const
Null
& x, adl::tag
/*unused*/
) {
return
"Null"
; }
28
}
// namespace detail::adl
29
30
inline
std::ostream& operator<<(std::ostream& out,
const
Null
& x) {
return
out <<
"Null"
; }
31
32
}
// namespace hilti::rt
hilti::rt::to_string
std::string to_string(T &&x)
Definition:
extension-points.h:26
hilti::rt::Null
Definition:
null.h:19
hilti::rt
Definition:
any.h:7
Generated by
1.8.13