Convenience overload for non-owning pointers (such as the generated pool). The descriptor pool must outlive the compiler builder and any compiler instances it builds.
| 56 | // The descriptor pool must outlive the compiler builder and any compiler |
| 57 | // instances it builds. |
| 58 | inline absl::StatusOr<std::unique_ptr<CompilerBuilder>> NewCompilerBuilder( |
| 59 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 60 | CompilerOptions options = {}) { |
| 61 | return NewCompilerBuilder( |
| 62 | std::shared_ptr<const google::protobuf::DescriptorPool>( |
| 63 | descriptor_pool, |
| 64 | internal::NoopDeleteFor<const google::protobuf::DescriptorPool>()), |
| 65 | std::move(options)); |
| 66 | } |
| 67 | |
| 68 | } // namespace cel |
| 69 |
no outgoing calls