Spicy
optional.h
1 // Copyright (c) 2020-2021 by the Zeek Project. See LICENSE for details.
2 
3 #pragma once
4 
5 #include <hilti/ast/operators/common.h>
6 #include <hilti/ast/types/result.h>
7 
8 namespace hilti {
9 namespace operator_ {
10 
11 STANDARD_OPERATOR_1(optional, Deref, operator_::dereferencedType(0), type::constant(type::Optional(type::Wildcard())),
12  "Returns the element stored, or throws an exception if none.");
13 
14 } // namespace operator_
15 } // namespace hilti