MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / Assign

Method Assign

common/values/map_value_variant.h:105–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104 template <typename T>
105 void Assign(T&& value) {
106 using U = absl::remove_cvref_t<T>;
107
108 static_assert(alignof(U) <= kMapValueVariantAlign);
109 static_assert(sizeof(U) <= kMapValueVariantSize);
110 static_assert(std::is_trivially_copyable_v<U>);
111
112 index_ = MapValueAlternative<U>::kIndex;
113 ::new (static_cast<void*>(&raw_[0])) U(std::forward<T>(value));
114 }
115
116 template <typename T>
117 bool Is() const {

Callers 1

ValueClass · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected