On Monday, 7 November 2016 at 23:07:27 UTC, Picaud Vincent wrote:
typo... auto capacity = max(0,(size_-1)*stride_+1);
To be more correct I have something like: alias IntergralConstant!(int,0) Zero_c; alias IntergralConstant!(int,1) One_c; auto capacity = max(Zero_c,(size_-One_c)*stride_+One_c);with "smooth" implicit conversion IntegralConstant -> int for cases where size_ or stride_ are "int" and not both IntegralConstant types.