From 7b6b8013b1a704d21926f8180a8c0dc70269d07a Mon Sep 17 00:00:00 2001 From: Tiago Date: Tue, 7 Jan 2025 06:42:38 -0800 Subject: [PATCH] Add "gsl" to #includes (#1184) Office is seeing build breaks due to `#include "span"` including C++20 span instead of gsl/span. Most likely we want all headers includes qualified with "gsl/" to avoid similar issues. --- include/gsl/algorithm | 4 ++-- include/gsl/gsl | 16 ++++++++-------- include/gsl/narrow | 4 ++-- include/gsl/pointers | 2 +- include/gsl/span | 8 ++++---- include/gsl/span_ext | 4 ++-- include/gsl/string_span | 2 +- include/gsl/util | 2 +- include/gsl/zstring | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/include/gsl/algorithm b/include/gsl/algorithm index 584f5cd..57e4661 100644 --- a/include/gsl/algorithm +++ b/include/gsl/algorithm @@ -17,8 +17,8 @@ #ifndef GSL_ALGORITHM_H #define GSL_ALGORITHM_H -#include "assert" // for Expects -#include "span" // for dynamic_extent, span +#include "gsl/assert" // for Expects +#include "gsl/span" // for dynamic_extent, span #include // for copy_n #include // for ptrdiff_t diff --git a/include/gsl/gsl b/include/gsl/gsl index 53030b3..358195e 100644 --- a/include/gsl/gsl +++ b/include/gsl/gsl @@ -18,16 +18,16 @@ #define GSL_GSL_H // IWYU pragma: begin_exports -#include "algorithm" // copy -#include "assert" // Ensures/Expects -#include "byte" // byte -#include "pointers" // owner, not_null -#include "span" // span -#include "zstring" // zstring -#include "util" // finally()/narrow_cast()... +#include "gsl/algorithm" // copy +#include "gsl/assert" // Ensures/Expects +#include "gsl/byte" // byte +#include "gsl/pointers" // owner, not_null +#include "gsl/span" // span +#include "gsl/zstring" // zstring +#include "gsl/util" // finally()/narrow_cast()... #ifdef __cpp_exceptions -#include "narrow" // narrow() +#include "gsl/narrow" // narrow() #endif // IWYU pragma: end_exports diff --git a/include/gsl/narrow b/include/gsl/narrow index 7b1a791..44bd470 100644 --- a/include/gsl/narrow +++ b/include/gsl/narrow @@ -16,8 +16,8 @@ #ifndef GSL_NARROW_H #define GSL_NARROW_H -#include "assert" // for GSL_SUPPRESS -#include "util" // for narrow_cast +#include "gsl/assert" // for GSL_SUPPRESS +#include "gsl/util" // for narrow_cast #include // for std::exception namespace gsl { diff --git a/include/gsl/pointers b/include/gsl/pointers index b93ca86..e1bda04 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -17,7 +17,7 @@ #ifndef GSL_POINTERS_H #define GSL_POINTERS_H -#include "assert" // for Ensures, Expects +#include "gsl/assert" // for Ensures, Expects #include // for ptrdiff_t, nullptr_t, size_t #include // for less, greater diff --git a/include/gsl/span b/include/gsl/span index f307e6e..3e4afe8 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -17,10 +17,10 @@ #ifndef GSL_SPAN_H #define GSL_SPAN_H -#include "assert" // for Expects -#include "byte" // for byte -#include "span_ext" // for span specialization of gsl::at and other span-related extensions -#include "util" // for narrow_cast +#include "gsl/assert" // for Expects +#include "gsl/byte" // for byte +#include "gsl/span_ext" // for span specialization of gsl::at and other span-related extensions +#include "gsl/util" // for narrow_cast #include // for array #include // for ptrdiff_t, size_t, nullptr_t diff --git a/include/gsl/span_ext b/include/gsl/span_ext index 2a7664c..242c750 100644 --- a/include/gsl/span_ext +++ b/include/gsl/span_ext @@ -27,8 +27,8 @@ // /////////////////////////////////////////////////////////////////////////////// -#include "assert" // GSL_KERNEL_MODE -#include "util" // for narrow_cast, narrow +#include "gsl/assert" // GSL_KERNEL_MODE +#include "gsl/util" // for narrow_cast, narrow #include // for ptrdiff_t, size_t #include diff --git a/include/gsl/string_span b/include/gsl/string_span index 65790ab..437b41f 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -1,4 +1,4 @@ #pragma once #pragma message( \ "This header will soon be removed. Use instead of ") -#include "zstring" +#include "gsl/zstring" diff --git a/include/gsl/util b/include/gsl/util index 04c3c34..fb7572e 100644 --- a/include/gsl/util +++ b/include/gsl/util @@ -17,7 +17,7 @@ #ifndef GSL_UTIL_H #define GSL_UTIL_H -#include "assert" // for Expects +#include "gsl/assert" // for Expects #include #include // for ptrdiff_t, size_t diff --git a/include/gsl/zstring b/include/gsl/zstring index 2cc13d8..27b96c9 100644 --- a/include/gsl/zstring +++ b/include/gsl/zstring @@ -17,7 +17,7 @@ #ifndef GSL_ZSTRING_H #define GSL_ZSTRING_H -#include "span_ext" // for dynamic_extent +#include "gsl/span_ext" // for dynamic_extent #include // for size_t, nullptr_t