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

Method ProjectKeys

common/values/value_builder.cc:1109–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1107
1108 private:
1109 const CompatListValue* absl_nonnull ProjectKeys() const {
1110 absl::call_once(keys_once_, [this]() {
1111 ListValueBuilderImpl builder(map_.get_allocator().arena());
1112 builder.Reserve(map_.size());
1113
1114 for (const auto& entry : map_) {
1115 builder.UnsafeAdd(entry.first);
1116 }
1117
1118 std::move(builder).BuildCompatAt(&keys_[0]);
1119 });
1120 return std::launder(
1121 reinterpret_cast<const CompatListValueImpl*>(&keys_[0]));
1122 }
1123
1124 const ValueFlatHashMap map_;
1125 mutable absl::once_flag keys_once_;

Callers

nothing calls this directly

Calls 5

UnsafeAddMethod · 0.80
BuildCompatAtMethod · 0.80
arenaMethod · 0.45
ReserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected