[libc++] Add an assertion in the subrange constructors with a size hint
Those constructors are very easy to misuse -- one could easily think that the size passed to the constructor is the size of the range to exhibit from the subrange. Instead, it's a size hint and it's UB to get it wrong. Hence, when it's cheap to compute the real size of the range, it's cheap to make sure that the user didn't get it wrong. Differential Revision: https://reviews.llvm.org/D108827
Loading
Please sign in to comment