| 114 | } |
| 115 | |
| 116 | bool Activation::InsertFunction(const cel::FunctionDescriptor& descriptor, |
| 117 | std::unique_ptr<cel::Function> impl) { |
| 118 | auto& overloads = functions_[descriptor.name()]; |
| 119 | for (auto& overload : overloads) { |
| 120 | if (overload.descriptor->ShapeMatches(descriptor)) { |
| 121 | return false; |
| 122 | } |
| 123 | } |
| 124 | overloads.push_back( |
| 125 | {std::make_unique<FunctionDescriptor>(descriptor), std::move(impl)}); |
| 126 | return true; |
| 127 | } |
| 128 | |
| 129 | Activation::Activation(Activation&& other) { |
| 130 | using std::swap; |