GSL/include/gsl
Anna Gringauze d846fe50a3
Enable usage of gsl::narrow with exceptions disabled (#640)
* Enable usage of gsl::narrow with exceptions disabled

This solution uses the approach of boost::asio to enabling usage of the
library in environments where exception usage is either prohibited
or not feasible (due to code size constraints). A function template
gsl::throw_exception has been added, which in a normal environment just
throws the exception. However, when GSL_TERMINATE_ON_CONTRACT_VIOLATION
is defined the function is only declared by gsl and the definition of
this function template must be supplied by the library's user.

Closes: #468

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>

Addition:
- understand STL no exception macro
- use function static variable to set termination handler in kernel mode
- add compile-only tests for no-exception mode

* added termination tests and fixed bugs

* disabled warning C4577 for msvc 2015
2018-03-15 16:00:08 -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 Enable usage of gsl::narrow with exceptions disabled (#640) 2018-03-15 16:00:08 -07:00
gsl_byte Remove inline added for the now unsupported MSVC 2013. (#585) 2018-02-20 14:46:37 -08:00
gsl_util Enable usage of gsl::narrow with exceptions disabled (#640) 2018-03-15 16:00:08 -07:00
multi_span add gsl::index typedef (#620) 2018-02-21 13:33:07 -08:00
pointers make explicit not_null move constructor so it is noexcept (#630) 2018-03-03 15:53:23 -08:00
span simplified constructors and removed GSL_NOEXCEPT in span (#639) 2018-03-15 12:14:29 -07:00
string_span simplified constructors and removed GSL_NOEXCEPT in span (#639) 2018-03-15 12:14:29 -07:00