GSL/include/gsl
Anna Gringauze 51ae678d08
Add usage for check-and-unwrap of MS STL iterators (#687)
* Add usage for check-and-unwrap of MS STL iterators

This is Billy ONeal's PR #682 with a typo fixed.

See corresponding change here:
ca77129308
That change officially exposes the STL's range checking machinery,
available in MSVC++ "15.8"+
This change augments GSL span::iterator to call into that newly exposed
machinery.

_Verify_range(cit, cit)
Requests that the iterator type check that the parameters form a valid
[First, Last) range iterator pair. This replaces _DEBUG_RANGE and
supporting machinery. The standard library provides a version for
pointers under _IDL != 0; otherwise they are normally provided via
hidden friend functions. Note that declaring some of these hidden
friends for "wrapper" iterators like move_iterator and reverse_iterator
triggers VSO#610735.

cit._Verify_offset(difference_type _Off)
For random-access iterators, performs any asserts that would be
performed by i += _Off; except with possibly a better error message and
without moving the iterator.

cit._Unwrapped()
Returns an "unchecked" or "unwrapped" iterator which has previously been
validated. The iterator may have been validated by a call to
_Verify_range or _Verify_offset (above), or by seeking a checked
iterator to a "high water mark" point.

it._Seek_to(cit) / it._Seek_to(return value from _Unwrapped())
Moves the position of the checked iterator it to the position of the
unchecked iterator supplied. Generally not intended to perform range
checks.

* Fixed build break in VS2015

* fixed constexpr build break when using VS2015
2018-05-22 18:07:49 -07:00
..
gsl added gsl_algorithm and gsl_byte headers to main gsl header (#594) 2017-12-04 09:18:40 -08:00
gsl_algorithm Applied iwyu --comment to the code base (#588) 2017-11-28 07:13:49 -08:00
gsl_assert make terminate_handler __cdecl (#673) 2018-05-02 16:19:37 -07:00
gsl_byte Add __may_alias__ attribute to gsl::byte (#668) 2018-05-01 12:32:31 -07:00
gsl_util final_action move assignment operator =delete against C26432 (#660) 2018-04-24 18:35:53 -07:00
multi_span add gsl::index typedef (#620) 2018-02-21 13:33:07 -08:00
pointers not_null constructor is now explicit (#659) 2018-04-24 19:11:43 -07:00
span Add usage for check-and-unwrap of MS STL iterators (#687) 2018-05-22 18:07:49 -07:00
string_span Fix clang-tidy warning about wrong comment on closing namespace (#654) 2018-04-24 19:04:24 -07:00