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:
authorbowie7070 <bowie7070@users.noreply.github.com>2020-10-29 01:38:32 +0300
committerGitHub <noreply@github.com>2020-10-29 01:38:32 +0300
commitb6c57e2403d3ea9bd0a1c07623b76151ebe5d036 (patch)
treebf633eca1aa805f8264d7e569410875466dae63e
parent736b62a838335dabc7cea01f808575a47195bd47 (diff)
Include gsl_narrow from gsl and fix comment. (#939)
narrow() is now in gsl_narrow rather than gsl_util. Include gsl_narrow when exceptions are enabled. Ensures that #include <gsl/gsl> includes entire library as advertised in the documentation. Co-authored-by: Bowie Owens <bowie.owens@csiro.au>
-rw-r--r--include/gsl/gsl6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/gsl/gsl b/include/gsl/gsl
index 55862eb..4ce0eb9 100644
--- a/include/gsl/gsl
+++ b/include/gsl/gsl
@@ -20,10 +20,14 @@
#include <gsl/gsl_algorithm> // copy
#include <gsl/gsl_assert> // Ensures/Expects
#include <gsl/gsl_byte> // byte
-#include <gsl/gsl_util> // finally()/narrow()/narrow_cast()...
+#include <gsl/gsl_util> // finally()/narrow_cast()...
#include <gsl/multi_span> // multi_span, strided_span...
#include <gsl/pointers> // owner, not_null
#include <gsl/span> // span
#include <gsl/string_span> // zstring, string_span, zstring_builder...
+#ifdef __cpp_exceptions
+#include <gsl/gsl_narrow> // narrow()
+#endif
+
#endif // GSL_GSL_H