Coverage Report

Created: 2026-11-12 06:42

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/proc/self/cwd/common/optional_ref.h
Line
Count
Source
1
// Copyright 2024 Google LLC
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//     https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef THIRD_PARTY_CEL_CPP_OPTIONAL_REF_H_
16
#define THIRD_PARTY_CEL_CPP_OPTIONAL_REF_H_
17
18
#include <memory>
19
#include <type_traits>
20
21
#include "absl/base/attributes.h"
22
#include "absl/base/macros.h"
23
#include "absl/base/nullability.h"
24
#include "absl/base/optimization.h"
25
#include "absl/types/optional.h"
26
#include "absl/utility/utility.h"
27
28
namespace cel {
29
30
// `optional_ref<T>` looks and feels like `absl::optional<T>`, but instead of
31
// owning the underlying value, it retains a reference to the value it accepts
32
// in its constructor.
33
template <typename T>
34
class optional_ref final {
35
 public:
36
  static_assert(!std::is_reference_v<T>, "T must not be a reference.");
37
  static_assert(!std::is_same_v<absl::nullopt_t, std::remove_cv_t<T>>,
38
                "optional_ref<absl::nullopt_t> is not allowed.");
39
  static_assert(!std::is_same_v<absl::in_place_t, std::remove_cv_t<T>>,
40
                "optional_ref<absl::in_place_t> is not allowed.");
41
42
  using value_type = T;
43
44
19.8M
  optional_ref() = default;
cel::optional_ref<cel::UnknownValue const>::optional_ref()
Line
Count
Source
44
9.92M
  optional_ref() = default;
cel::optional_ref<cel::ErrorValue const>::optional_ref()
Line
Count
Source
44
9.92M
  optional_ref() = default;
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::optional_ref()
cel::optional_ref<cel::ParsedMessageValue const>::optional_ref()
Line
Count
Source
44
2.63k
  optional_ref() = default;
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue>::optional_ref()
cel::optional_ref<cel::StringValue const>::optional_ref()
Line
Count
Source
44
10.7k
  optional_ref() = default;
cel::optional_ref<cel::BytesValue const>::optional_ref()
Line
Count
Source
44
216
  optional_ref() = default;
cel::optional_ref<cel::CustomListValue const>::optional_ref()
Line
Count
Source
44
79
  optional_ref() = default;
cel::optional_ref<cel::CustomMapValue const>::optional_ref()
Line
Count
Source
44
1
  optional_ref() = default;
Unexecuted instantiation: cel::optional_ref<cel::OpaqueValue const>::optional_ref()
cel::optional_ref<cel::ParsedJsonListValue const>::optional_ref()
Line
Count
Source
44
723
  optional_ref() = default;
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::optional_ref()
Line
Count
Source
44
802
  optional_ref() = default;
cel::optional_ref<cel::ParsedJsonMapValue const>::optional_ref()
Line
Count
Source
44
235
  optional_ref() = default;
cel::optional_ref<cel::ParsedMapFieldValue const>::optional_ref()
Line
Count
Source
44
236
  optional_ref() = default;
cel::optional_ref<cel::TypeValue const>::optional_ref()
Line
Count
Source
44
645
  optional_ref() = default;
45
46
  // NOLINTNEXTLINE(google-explicit-constructor)
47
19.8M
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::UnknownValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
9.92M
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ErrorValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
9.92M
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::optional_ref(std::__1::nullopt_t)
cel::optional_ref<cel::ParsedMessageValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
2.63k
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue>::optional_ref(std::__1::nullopt_t)
cel::optional_ref<cel::StringValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
10.7k
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::BytesValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
216
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::CustomListValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
79
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::CustomMapValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
1
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
Unexecuted instantiation: cel::optional_ref<cel::OpaqueValue const>::optional_ref(std::__1::nullopt_t)
cel::optional_ref<cel::ParsedJsonListValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
723
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
802
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ParsedJsonMapValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
235
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ParsedMapFieldValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
236
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::TypeValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
645
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
48
49
  // NOLINTNEXTLINE(google-explicit-constructor)
50
  constexpr optional_ref(T& value ABSL_ATTRIBUTE_LIFETIME_BOUND)
51
626k
      : value_(std::addressof(value)) {}
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue const>::optional_ref(cel::UnknownValue const&)
Unexecuted instantiation: cel::optional_ref<cel::ErrorValue const>::optional_ref(cel::ErrorValue const&)
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::optional_ref(cel::OptionalValue const&)
cel::optional_ref<cel::ParsedMessageValue const>::optional_ref(cel::ParsedMessageValue const&)
Line
Count
Source
51
612k
      : value_(std::addressof(value)) {}
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue>::optional_ref(cel::UnknownValue&)
cel::optional_ref<cel::StringValue const>::optional_ref(cel::StringValue const&)
Line
Count
Source
51
12.6k
      : value_(std::addressof(value)) {}
cel::optional_ref<cel::BytesValue const>::optional_ref(cel::BytesValue const&)
Line
Count
Source
51
679
      : value_(std::addressof(value)) {}
cel::optional_ref<cel::CustomListValue const>::optional_ref(cel::CustomListValue const&)
Line
Count
Source
51
1.04k
      : value_(std::addressof(value)) {}
cel::optional_ref<cel::CustomMapValue const>::optional_ref(cel::CustomMapValue const&)
Line
Count
Source
51
22
      : value_(std::addressof(value)) {}
Unexecuted instantiation: cel::optional_ref<cel::OpaqueValue const>::optional_ref(cel::OpaqueValue const&)
cel::optional_ref<cel::ParsedJsonListValue const>::optional_ref(cel::ParsedJsonListValue const&)
Line
Count
Source
51
145
      : value_(std::addressof(value)) {}
Unexecuted instantiation: cel::optional_ref<cel::ParsedRepeatedFieldValue const>::optional_ref(cel::ParsedRepeatedFieldValue const&)
cel::optional_ref<cel::ParsedJsonMapValue const>::optional_ref(cel::ParsedJsonMapValue const&)
Line
Count
Source
51
268
      : value_(std::addressof(value)) {}
Unexecuted instantiation: cel::optional_ref<cel::ParsedMapFieldValue const>::optional_ref(cel::ParsedMapFieldValue const&)
Unexecuted instantiation: cel::optional_ref<cel::TypeValue const>::optional_ref(cel::TypeValue const&)
52
53
  template <
54
      typename U,
55
      typename = std::enable_if_t<std::conjunction_v<
56
          std::is_const<T>, std::is_same<std::decay_t<U>, std::decay_t<T>>>>>
57
  // NOLINTNEXTLINE(google-explicit-constructor)
58
  constexpr optional_ref(
59
      const absl::optional<U>& value ABSL_ATTRIBUTE_LIFETIME_BOUND)
60
      : value_(value.has_value() ? std::addressof(*value) : nullptr) {}
61
62
  template <typename U, typename = std::enable_if_t<
63
                            std::is_same_v<std::decay_t<U>, std::decay_t<T>>>>
64
  // NOLINTNEXTLINE(google-explicit-constructor)
65
  constexpr optional_ref(absl::optional<U>& value ABSL_ATTRIBUTE_LIFETIME_BOUND)
66
      : value_(value.has_value() ? std::addressof(*value) : nullptr) {}
67
68
  template <
69
      typename U,
70
      typename = std::enable_if_t<std::conjunction_v<
71
          std::negation<std::is_same<U, T>>,
72
          std::is_convertible<std::add_pointer_t<U>, std::add_pointer_t<T>>>>>
73
  // NOLINTNEXTLINE(google-explicit-constructor)
74
  constexpr optional_ref(const optional_ref<U>& other) : value_(other.value_) {}
75
76
  optional_ref(const optional_ref<T>&) = default;
77
78
  optional_ref<T>& operator=(const optional_ref<T>&) = delete;
79
80
20.4M
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::CustomListValue const>::has_value() const
Line
Count
Source
80
1.12k
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::CustomMapValue const>::has_value() const
Line
Count
Source
80
23
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedMessageValue const>::has_value() const
Line
Count
Source
80
614k
  constexpr bool has_value() const { return value_ != nullptr; }
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::has_value() const
cel::optional_ref<cel::BytesValue const>::has_value() const
Line
Count
Source
80
895
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ErrorValue const>::has_value() const
Line
Count
Source
80
9.92M
  constexpr bool has_value() const { return value_ != nullptr; }
Unexecuted instantiation: cel::optional_ref<cel::OpaqueValue const>::has_value() const
cel::optional_ref<cel::ParsedJsonListValue const>::has_value() const
Line
Count
Source
80
868
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedJsonMapValue const>::has_value() const
Line
Count
Source
80
503
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedMapFieldValue const>::has_value() const
Line
Count
Source
80
236
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::has_value() const
Line
Count
Source
80
802
  constexpr bool has_value() const { return value_ != nullptr; }
Unexecuted instantiation: cel::optional_ref<cel::CustomStructValue const>::has_value() const
cel::optional_ref<cel::StringValue const>::has_value() const
Line
Count
Source
80
23.3k
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::TypeValue const>::has_value() const
Line
Count
Source
80
645
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::UnknownValue const>::has_value() const
Line
Count
Source
80
9.92M
  constexpr bool has_value() const { return value_ != nullptr; }
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue>::has_value() const
81
82
  ABSL_DEPRECATE_AND_INLINE()
83
20.4M
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::CustomListValue const>::operator bool() const
Line
Count
Source
83
1.12k
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::CustomMapValue const>::operator bool() const
Line
Count
Source
83
23
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedMessageValue const>::operator bool() const
Line
Count
Source
83
614k
  constexpr explicit operator bool() const { return has_value(); }
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::operator bool() const
Unexecuted instantiation: cel::optional_ref<cel::BytesValue const>::operator bool() const
cel::optional_ref<cel::ErrorValue const>::operator bool() const
Line
Count
Source
83
9.92M
  constexpr explicit operator bool() const { return has_value(); }
Unexecuted instantiation: cel::optional_ref<cel::OpaqueValue const>::operator bool() const
cel::optional_ref<cel::ParsedJsonListValue const>::operator bool() const
Line
Count
Source
83
868
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedJsonMapValue const>::operator bool() const
Line
Count
Source
83
503
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedMapFieldValue const>::operator bool() const
Line
Count
Source
83
236
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::operator bool() const
Line
Count
Source
83
802
  constexpr explicit operator bool() const { return has_value(); }
Unexecuted instantiation: cel::optional_ref<cel::CustomStructValue const>::operator bool() const
cel::optional_ref<cel::StringValue const>::operator bool() const
Line
Count
Source
83
20.3k
  constexpr explicit operator bool() const { return has_value(); }
Unexecuted instantiation: cel::optional_ref<cel::TypeValue const>::operator bool() const
cel::optional_ref<cel::UnknownValue const>::operator bool() const
Line
Count
Source
83
9.92M
  constexpr explicit operator bool() const { return has_value(); }
84
85
  constexpr T& value() const {
86
    return ABSL_PREDICT_TRUE(has_value())
87
               ? *value_
88
               // Replicate the same error logic as in `absl::optional`'s
89
               // `value()`. It either throws an exception or aborts the
90
               // program. We intentionally ignore the return value of
91
               // the constructed optional's value as we only need to run
92
               // the code for error checking.
93
               : ((void)absl::optional<T>().value(), *value_);
94
  }
95
96
612k
  constexpr T& operator*() const {
97
612k
    ABSL_ASSERT(has_value());
98
612k
    return *value_;
99
612k
  }
Unexecuted instantiation: cel::optional_ref<cel::CustomListValue const>::operator*() const
cel::optional_ref<cel::CustomMapValue const>::operator*() const
Line
Count
Source
96
22
  constexpr T& operator*() const {
97
22
    ABSL_ASSERT(has_value());
98
22
    return *value_;
99
22
  }
cel::optional_ref<cel::ParsedMessageValue const>::operator*() const
Line
Count
Source
96
612k
  constexpr T& operator*() const {
97
612k
    ABSL_ASSERT(has_value());
98
612k
    return *value_;
99
612k
  }
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::BytesValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::ErrorValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::OpaqueValue const>::operator*() const
cel::optional_ref<cel::ParsedJsonListValue const>::operator*() const
Line
Count
Source
96
145
  constexpr T& operator*() const {
97
145
    ABSL_ASSERT(has_value());
98
145
    return *value_;
99
145
  }
cel::optional_ref<cel::ParsedJsonMapValue const>::operator*() const
Line
Count
Source
96
268
  constexpr T& operator*() const {
97
268
    ABSL_ASSERT(has_value());
98
268
    return *value_;
99
268
  }
Unexecuted instantiation: cel::optional_ref<cel::ParsedMapFieldValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::ParsedRepeatedFieldValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::CustomStructValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::StringValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::TypeValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue const>::operator*() const
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue>::operator*() const
100
101
600k
  constexpr T* absl_nonnull operator->() const {
102
600k
    ABSL_ASSERT(has_value());
103
600k
    return value_;
104
600k
  }
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::operator->() const
cel::optional_ref<cel::StringValue const>::operator->() const
Line
Count
Source
101
12.6k
  constexpr T* absl_nonnull operator->() const {
102
12.6k
    ABSL_ASSERT(has_value());
103
12.6k
    return value_;
104
12.6k
  }
cel::optional_ref<cel::BytesValue const>::operator->() const
Line
Count
Source
101
679
  constexpr T* absl_nonnull operator->() const {
102
679
    ABSL_ASSERT(has_value());
103
679
    return value_;
104
679
  }
cel::optional_ref<cel::CustomListValue const>::operator->() const
Line
Count
Source
101
2.08k
  constexpr T* absl_nonnull operator->() const {
102
2.08k
    ABSL_ASSERT(has_value());
103
2.08k
    return value_;
104
2.08k
  }
cel::optional_ref<cel::CustomMapValue const>::operator->() const
Line
Count
Source
101
22
  constexpr T* absl_nonnull operator->() const {
102
22
    ABSL_ASSERT(has_value());
103
22
    return value_;
104
22
  }
Unexecuted instantiation: cel::optional_ref<cel::ParsedRepeatedFieldValue const>::operator->() const
Unexecuted instantiation: cel::optional_ref<cel::ParsedMapFieldValue const>::operator->() const
Unexecuted instantiation: cel::optional_ref<cel::ParsedJsonMapValue const>::operator->() const
Unexecuted instantiation: cel::optional_ref<cel::ParsedJsonListValue const>::operator->() const
Unexecuted instantiation: cel::optional_ref<cel::ErrorValue const>::operator->() const
cel::optional_ref<cel::ParsedMessageValue const>::operator->() const
Line
Count
Source
101
585k
  constexpr T* absl_nonnull operator->() const {
102
585k
    ABSL_ASSERT(has_value());
103
585k
    return value_;
104
585k
  }
Unexecuted instantiation: cel::optional_ref<cel::TypeValue const>::operator->() const
105
106
 private:
107
  template <typename U>
108
  friend class optional_ref;
109
110
  T* const value_ = nullptr;
111
};
112
113
template <typename T>
114
optional_ref(const T&) -> optional_ref<const T>;
115
116
template <typename T>
117
optional_ref(T&) -> optional_ref<T>;
118
119
template <typename T>
120
optional_ref(const absl::optional<T>&) -> optional_ref<const T>;
121
122
template <typename T>
123
optional_ref(absl::optional<T>&) -> optional_ref<T>;
124
125
template <typename T>
126
constexpr bool operator==(const optional_ref<T>& lhs, absl::nullopt_t) {
127
  return !lhs.has_value();
128
}
129
130
template <typename T>
131
constexpr bool operator==(absl::nullopt_t, const optional_ref<T>& rhs) {
132
  return !rhs.has_value();
133
}
134
135
template <typename T>
136
constexpr bool operator!=(const optional_ref<T>& lhs, absl::nullopt_t) {
137
  return !operator==(lhs, absl::nullopt);
138
}
139
140
template <typename T>
141
constexpr bool operator!=(absl::nullopt_t, const optional_ref<T>& rhs) {
142
  return !operator==(absl::nullopt, rhs);
143
}
144
145
namespace common_internal {
146
147
template <typename T>
148
0
absl::optional<std::decay_t<T>> AsOptional(optional_ref<T> ref) {
149
0
  if (ref) {
150
0
    return *ref;
151
0
  }
152
0
  return absl::nullopt;
153
0
}
Unexecuted instantiation: std::__1::optional<__decay, cel::CustomListValue const> cel::common_internal::AsOptional<cel::CustomListValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::CustomMapValue const> cel::common_internal::AsOptional<cel::CustomMapValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::ParsedMessageValue const> cel::common_internal::AsOptional<cel::ParsedMessageValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::OptionalValue const> cel::common_internal::AsOptional<cel::OptionalValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::BytesValue const> cel::common_internal::AsOptional<cel::BytesValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::ErrorValue const> cel::common_internal::AsOptional<cel::ErrorValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::OpaqueValue const> cel::common_internal::AsOptional<cel::OpaqueValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::ParsedJsonListValue const> cel::common_internal::AsOptional<cel::ParsedJsonListValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::ParsedJsonMapValue const> cel::common_internal::AsOptional<cel::ParsedJsonMapValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::ParsedMapFieldValue const> cel::common_internal::AsOptional<cel::ParsedMapFieldValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::ParsedRepeatedFieldValue const> cel::common_internal::AsOptional<cel::ParsedRepeatedFieldValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::CustomStructValue const> cel::common_internal::AsOptional<cel::CustomStructValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::StringValue const> cel::common_internal::AsOptional<cel::StringValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::TypeValue const> cel::common_internal::AsOptional<cel::TypeValue const>(cel::optional_ref<__decay>)
Unexecuted instantiation: std::__1::optional<__decay, cel::UnknownValue const> cel::common_internal::AsOptional<cel::UnknownValue const>(cel::optional_ref<__decay>)
154
155
template <typename T>
156
0
absl::optional<T> AsOptional(absl::optional<T> opt) {
157
0
  return opt;
158
0
}
Unexecuted instantiation: std::__1::optional<cel::ListValue> cel::common_internal::AsOptional<cel::ListValue>(std::__1::optional<cel::ListValue>)
Unexecuted instantiation: std::__1::optional<cel::MapValue> cel::common_internal::AsOptional<cel::MapValue>(std::__1::optional<cel::MapValue>)
Unexecuted instantiation: std::__1::optional<cel::MessageValue> cel::common_internal::AsOptional<cel::MessageValue>(std::__1::optional<cel::MessageValue>)
Unexecuted instantiation: std::__1::optional<cel::StructValue> cel::common_internal::AsOptional<cel::StructValue>(std::__1::optional<cel::StructValue>)
159
160
}  // namespace common_internal
161
162
}  // namespace cel
163
164
#endif  // THIRD_PARTY_CEL_CPP_OPTIONAL_REF_H_