function D = intmaxLike(X)
%INTMAXLIKE intmaxLike codistributed array
%   
%   D = intmaxLike(P) is a codistributed scalar with the value of intmax for the
%   underlyingType of P and matching all other attributes.
%   
%   P must have integer underlying type.
%   
%   See also INTMAX, CODISTRIBUTED.


%   Copyright 2021 The MathWorks, Inc.

if ~isinteger(X)
    error(message("MATLAB:intmax:invalidPrototype"));
end
D = buildScalarLike(@intmax, X);