| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a macro for defining `TSentinelOptional` type aliases when the value type is not structural (e.g. has protected members) and therefore cannot use `TValueSentinel<V>`. The macro collapses the boilerplate sentinel struct plus `using` declaration into a single line:
```cpp
// before
struct TInstantSentinel
{
static constexpr auto Sentinel = TInstant::Zero();
};
using TSentinelOptionalInstant = TSentinelOptional<TInstant, TInstantSentinel>;
// after
YT_DEFINE_SENTINEL_OPTIONAL(TSentinelOptionalInstant, TInstant, TInstant::Zero());
```
Also convert the existing call sites in `service_detail.cpp` and `inferrum/block_cache.cpp`.
commit_hash:5dcdeb8db215736b0ce5a5b71f30aead91c7b8e8
|