GSL/include/gsl
Dmitry Kobets 9face82309
Remove unnecessary check from size_bytes() (#1105)
`size_bytes()` returns the span's size in bytes. 
Assuming the span was constructed with an accurate size parameter, the check `size() < dynamic_extent / sizeof(element_type)` isn't required, since `size_t(-1)` (which is `dynamic_extent`) represents the size of the address space, so the number of bytes will never exceed it and in practice won't even come close.
Otherwise, it is not actually feasible to detect cases when the size parameter does not correspond to the dimensions of the underlying data pointer. In these cases, the relationship `size() < dynamic_extent / sizeof(element_type)` is simply one of many ways in which the `size()` could be incorrect, and serves no necessary purpose.

Resolves #1012
2023-05-09 09:05:26 -07:00
..
algorithm quoted form of #include when GSL includes GSL files (#1030) 2022-01-31 13:06:42 -08:00
assert Documentation (#1086) 2023-02-17 10:38:34 -08:00
byte simplify to_byte (#1090) 2023-02-14 14:10:56 -08:00
gsl quoted form of #include when GSL includes GSL files (#1030) 2022-01-31 13:06:42 -08:00
gsl_algorithm quoted form of #include when GSL includes GSL files (#1030) 2022-01-31 13:06:42 -08:00
gsl_assert quoted form of #include when GSL includes GSL files (#1030) 2022-01-31 13:06:42 -08:00
gsl_byte quoted form of #include when GSL includes GSL files (#1030) 2022-01-31 13:06:42 -08:00
gsl_narrow quoted form of #include when GSL includes GSL files (#1030) 2022-01-31 13:06:42 -08:00
gsl_util quoted form of #include when GSL includes GSL files (#1030) 2022-01-31 13:06:42 -08:00
narrow Document potentially confusing behavior in gsl::narrow (#1073) 2022-12-24 11:49:26 -08:00
pointers Documentation (#1086) 2023-02-17 10:38:34 -08:00
span Remove unnecessary check from size_bytes() (#1105) 2023-05-09 09:05:26 -07:00
span_ext Resolve MSVC warning C5260 (#1049) 2022-07-18 17:42:21 -07:00
string_span remove all deprecated string_span stuff (#1074) 2022-12-27 07:22:26 -08:00
util Fix max macro collision (#1081) 2023-01-19 13:17:39 -08:00