| 475 | }; |
| 476 | |
| 477 | struct NullCheckOp { |
| 478 | template <typename T> |
| 479 | bool operator()(const T&) const { |
| 480 | return false; |
| 481 | } |
| 482 | |
| 483 | bool operator()(NullType) const { return true; } |
| 484 | // Note: this is not typically possible, but is supported for allowing |
| 485 | // function resolution for null ptrs as Messages. |
| 486 | bool operator()(const MessageWrapper& arg) const { |
| 487 | return arg.message_ptr() == nullptr; |
| 488 | } |
| 489 | }; |
| 490 | |
| 491 | // Constructs CelValue wrapping value supplied as argument. |
| 492 | // Value type T should be supported by specification of ValueHolder. |