Suppress warnings on VS (#642)
- gsl::narrow, gsl::narrow_cast and gsl::at are the safe variants suggested by CppCoreGuideline. It does not make sense to let VS warn inside the implementation of these functions that unsafe static_cast is used and that the safe variants shall be used. - Suppress warning that throw_exception can be declared noexcept (for the GSL_TERMINATE_ON_CONTRACT_VIOLATION case)
This commit is contained in:
1 parent
1f76fbd168
commit
f4a715816c
2 files changed
+20
No files matched your search
@@ -110,6 +110,10 @@ namespace details
|
||||
#if defined(GSL_TERMINATE_ON_CONTRACT_VIOLATION)
|
||||
|
||||
template <typename Exception>
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#else
|
||||
[[gsl::suppress(f.6)]]
|
||||
#endif
|
||||
[[noreturn]] void throw_exception(Exception&&)
|
||||
{
|
||||
gsl::details::terminate();
|
||||
|
||||
Reference in new issue
Block a user