Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeinhaerter <34543625+beinhaerter@users.noreply.github.com>2018-08-01 03:53:00 +0300
committerAnna Gringauze <annagrin@microsoft.com>2018-08-01 03:53:00 +0300
commitf4a715816ceb2dc136e86a68b71f05a8773c8f2b (patch)
tree9772263eab413474f3f594de7f6e5492242f8717 /include/gsl/gsl_assert
parent1f76fbd168a9db5ffee39e33b751da81704bbc8d (diff)
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)
Diffstat (limited to 'include/gsl/gsl_assert')
-rw-r--r--include/gsl/gsl_assert4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gsl/gsl_assert b/include/gsl/gsl_assert
index be4676b..70a6eba 100644
--- a/include/gsl/gsl_assert
+++ b/include/gsl/gsl_assert
@@ -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();