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

Method New

common/internal/reference_count.cc:64–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62class ReferenceCountedString final : public ReferenceCounted {
63 public:
64 static std::pair<const ReferenceCount* absl_nonnull, absl::string_view> New(
65 absl::string_view string) {
66 const auto* const refcount =
67 ::new (internal::New(Overhead() + string.size()))
68 ReferenceCountedString(string);
69 return std::pair{static_cast<const ReferenceCount* absl_nonnull>(refcount),
70 absl::string_view(refcount->data_, refcount->size_)};
71 }
72
73 private:
74// ReferenceCountedString is non-standard-layout due to having virtual functions

Callers 15

TESTFunction · 0.45
ReflectedCopyMethod · 0.45
ValueFromAnyMethod · 0.45
DurationFromValueFunction · 0.45
BoolFromValueFunction · 0.45
BytesFromValueFunction · 0.45
DoubleFromValueFunction · 0.45
FloatFromValueFunction · 0.45
Int32FromValueFunction · 0.45
Int64FromValueFunction · 0.45
StringFromValueFunction · 0.45
TimestampFromValueFunction · 0.45

Calls 2

NewFunction · 0.85
sizeMethod · 0.45

Tested by 15

TESTFunction · 0.36
ReflectedCopyMethod · 0.36
CreateMessageFromTextMethod · 0.36
ReflectedCopyMethod · 0.36
CreateTestMessageFunction · 0.36
TESTFunction · 0.36
MakeDynamicMethod · 0.36
MakeDynamicMethod · 0.36
MakeDynamicMethod · 0.36
PackMessageFunction · 0.36