Use move semantics if possible to construct ConstantRanges.