Coverage Report

Created: 2026-11-24 06:40

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
25.1M
  optional_ref() = default;
cel::optional_ref<cel::UnknownValue const>::optional_ref()
Line
Count
Source
44
12.5M
  optional_ref() = default;
cel::optional_ref<cel::ErrorValue const>::optional_ref()
Line
Count
Source
44
12.5M
  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
322
  optional_ref() = default;
Unexecuted instantiation: cel::optional_ref<cel::UnknownValue>::optional_ref()
cel::optional_ref<cel::StringValue const>::optional_ref()
Line
Count
Source
44
11.6k
  optional_ref() = default;
cel::optional_ref<cel::BytesValue const>::optional_ref()
Line
Count
Source
44
201
  optional_ref() = default;
cel::optional_ref<cel::CustomListValue const>::optional_ref()
Line
Count
Source
44
125
  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
1.28k
  optional_ref() = default;
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::optional_ref()
Line
Count
Source
44
1.40k
  optional_ref() = default;
cel::optional_ref<cel::ParsedJsonMapValue const>::optional_ref()
Line
Count
Source
44
26.0k
  optional_ref() = default;
cel::optional_ref<cel::ParsedMapFieldValue const>::optional_ref()
Line
Count
Source
44
26.0k
  optional_ref() = default;
cel::optional_ref<cel::TypeValue const>::optional_ref()
Line
Count
Source
44
759
  optional_ref() = default;
45
46
  // NOLINTNEXTLINE(google-explicit-constructor)
47
25.1M
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::UnknownValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
12.5M
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ErrorValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
12.5M
  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
322
  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
11.6k
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::BytesValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
201
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::CustomListValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
125
  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
1.28k
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
1.40k
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ParsedJsonMapValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
26.0k
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::ParsedMapFieldValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
26.0k
  constexpr optional_ref(absl::nullopt_t) : optional_ref() {}
cel::optional_ref<cel::TypeValue const>::optional_ref(std::__1::nullopt_t)
Line
Count
Source
47
759
  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
609k
      : 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
595k
      : 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
11.2k
      : value_(std::addressof(value)) {}
cel::optional_ref<cel::BytesValue const>::optional_ref(cel::BytesValue const&)
Line
Count
Source
51
649
      : value_(std::addressof(value)) {}
cel::optional_ref<cel::CustomListValue const>::optional_ref(cel::CustomListValue const&)
Line
Count
Source
51
1.28k
      : value_(std::addressof(value)) {}
cel::optional_ref<cel::CustomMapValue const>::optional_ref(cel::CustomMapValue const&)
Line
Count
Source
51
28
      : 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
479
      : 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
235
      : value_(std::addressof(value)) {}
Unexecuted instantiation: cel::optional_ref<cel::ParsedMapFieldValue const>::optional_ref(cel::ParsedMapFieldValue const&)
cel::optional_ref<cel::TypeValue const>::optional_ref(cel::TypeValue const&)
Line
Count
Source
51
3
      : value_(std::addressof(value)) {}
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
25.7M
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::CustomListValue const>::has_value() const
Line
Count
Source
80
1.41k
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::CustomMapValue const>::has_value() const
Line
Count
Source
80
29
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedMessageValue const>::has_value() const
Line
Count
Source
80
595k
  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
850
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ErrorValue const>::has_value() const
Line
Count
Source
80
12.5M
  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
1.76k
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedJsonMapValue const>::has_value() const
Line
Count
Source
80
26.2k
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedMapFieldValue const>::has_value() const
Line
Count
Source
80
26.0k
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::has_value() const
Line
Count
Source
80
1.40k
  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
22.8k
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::TypeValue const>::has_value() const
Line
Count
Source
80
762
  constexpr bool has_value() const { return value_ != nullptr; }
cel::optional_ref<cel::UnknownValue const>::has_value() const
Line
Count
Source
80
12.5M
  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
25.7M
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::CustomListValue const>::operator bool() const
Line
Count
Source
83
1.41k
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::CustomMapValue const>::operator bool() const
Line
Count
Source
83
29
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedMessageValue const>::operator bool() const
Line
Count
Source
83
595k
  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
12.5M
  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
1.76k
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedJsonMapValue const>::operator bool() const
Line
Count
Source
83
26.2k
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedMapFieldValue const>::operator bool() const
Line
Count
Source
83
26.0k
  constexpr explicit operator bool() const { return has_value(); }
cel::optional_ref<cel::ParsedRepeatedFieldValue const>::operator bool() const
Line
Count
Source
83
1.40k
  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
21.2k
  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
12.5M
  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
596k
  constexpr T& operator*() const {
97
596k
    ABSL_ASSERT(has_value());
98
596k
    return *value_;
99
596k
  }
Unexecuted instantiation: cel::optional_ref<cel::CustomListValue const>::operator*() const
cel::optional_ref<cel::CustomMapValue const>::operator*() const
Line
Count
Source
96
28
  constexpr T& operator*() const {
97
28
    ABSL_ASSERT(has_value());
98
28
    return *value_;
99
28
  }
cel::optional_ref<cel::ParsedMessageValue const>::operator*() const
Line
Count
Source
96
595k
  constexpr T& operator*() const {
97
595k
    ABSL_ASSERT(has_value());
98
595k
    return *value_;
99
595k
  }
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
479
  constexpr T& operator*() const {
97
479
    ABSL_ASSERT(has_value());
98
479
    return *value_;
99
479
  }
cel::optional_ref<cel::ParsedJsonMapValue const>::operator*() const
Line
Count
Source
96
235
  constexpr T& operator*() const {
97
235
    ABSL_ASSERT(has_value());
98
235
    return *value_;
99
235
  }
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
525k
  constexpr T* absl_nonnull operator->() const {
102
525k
    ABSL_ASSERT(has_value());
103
525k
    return value_;
104
525k
  }
Unexecuted instantiation: cel::optional_ref<cel::OptionalValue const>::operator->() const
cel::optional_ref<cel::StringValue const>::operator->() const
Line
Count
Source
101
11.2k
  constexpr T* absl_nonnull operator->() const {
102
11.2k
    ABSL_ASSERT(has_value());
103
11.2k
    return value_;
104
11.2k
  }
cel::optional_ref<cel::BytesValue const>::operator->() const
Line
Count
Source
101
649
  constexpr T* absl_nonnull operator->() const {
102
649
    ABSL_ASSERT(has_value());
103
649
    return value_;
104
649
  }
cel::optional_ref<cel::CustomListValue const>::operator->() const
Line
Count
Source
101
2.57k
  constexpr T* absl_nonnull operator->() const {
102
2.57k
    ABSL_ASSERT(has_value());
103
2.57k
    return value_;
104
2.57k
  }
cel::optional_ref<cel::CustomMapValue const>::operator->() const
Line
Count
Source
101
28
  constexpr T* absl_nonnull operator->() const {
102
28
    ABSL_ASSERT(has_value());
103
28
    return value_;
104
28
  }
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
510k
  constexpr T* absl_nonnull operator->() const {
102
510k
    ABSL_ASSERT(has_value());
103
510k
    return value_;
104
510k
  }
cel::optional_ref<cel::TypeValue const>::operator->() const
Line
Count
Source
101
3
  constexpr T* absl_nonnull operator->() const {
102
3
    ABSL_ASSERT(has_value());
103
3
    return value_;
104
3
  }
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_