MCPcopy Create free account
hub / github.com/apache/arrow / GetConstSharedPtrOption

Function GetConstSharedPtrOption

cpp/src/arrow/filesystem/util_internal.h:119–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118template <typename T>
119Result<std::shared_ptr<const T>> GetConstSharedPtrOption(const std::string& key,
120 const std::any& value) {
121 if (const auto* v = std::any_cast<std::shared_ptr<const T>>(&value)) return *v;
122 if (const auto* v = std::any_cast<std::shared_ptr<T>>(&value)) return *v;
123 return Status::Invalid("Filesystem option '", key, "' has the wrong type");
124}
125
126} // namespace arrow::fs::internal

Callers

nothing calls this directly

Calls 1

InvalidFunction · 0.50

Tested by

no test coverage detected