#include "tensorstore/index_interval.h"
Result<OptionallyImplicitIndexInterval>
tensorstore::MergeOptionallyImplicitIndexIntervals(
    
OptionallyImplicitIndexInterval a,
    
OptionallyImplicitIndexInterval b);

Merges two index intervals.

For both the lower and upper bounds, the bound of a and b must either be equal (excluding the implicit indicator), or the bound in at least one of a or b must be implicit and infinite.

The explicit/finite bounds take precedence over implicit/infinite bounds.

Parameters:
OptionallyImplicitIndexInterval a

Interval to merge.

OptionallyImplicitIndexInterval b

Other interval to merge.

Error absl::StatusCode::kInvalidArgument:

if a and b are not compatible.