Skip to content

Commit 7b6b801

Browse files
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.
1 parent 1cdb8d2 commit 7b6b801

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

include/gsl/algorithm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#ifndef GSL_ALGORITHM_H
1818
#define GSL_ALGORITHM_H
1919

20-
#include "assert" // for Expects
21-
#include "span" // for dynamic_extent, span
20+
#include "gsl/assert" // for Expects
21+
#include "gsl/span" // for dynamic_extent, span
2222

2323
#include <algorithm> // for copy_n
2424
#include <cstddef> // for ptrdiff_t

include/gsl/gsl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
#define GSL_GSL_H
1919

2020
// IWYU pragma: begin_exports
21-
#include "algorithm" // copy
22-
#include "assert" // Ensures/Expects
23-
#include "byte" // byte
24-
#include "pointers" // owner, not_null
25-
#include "span" // span
26-
#include "zstring" // zstring
27-
#include "util" // finally()/narrow_cast()...
21+
#include "gsl/algorithm" // copy
22+
#include "gsl/assert" // Ensures/Expects
23+
#include "gsl/byte" // byte
24+
#include "gsl/pointers" // owner, not_null
25+
#include "gsl/span" // span
26+
#include "gsl/zstring" // zstring
27+
#include "gsl/util" // finally()/narrow_cast()...
2828

2929
#ifdef __cpp_exceptions
30-
#include "narrow" // narrow()
30+
#include "gsl/narrow" // narrow()
3131
#endif
3232
// IWYU pragma: end_exports
3333

include/gsl/narrow

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#ifndef GSL_NARROW_H
1818
#define GSL_NARROW_H
19-
#include "assert" // for GSL_SUPPRESS
20-
#include "util" // for narrow_cast
19+
#include "gsl/assert" // for GSL_SUPPRESS
20+
#include "gsl/util" // for narrow_cast
2121
#include <exception> // for std::exception
2222
namespace gsl
2323
{

include/gsl/pointers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef GSL_POINTERS_H
1818
#define GSL_POINTERS_H
1919

20-
#include "assert" // for Ensures, Expects
20+
#include "gsl/assert" // for Ensures, Expects
2121

2222
#include <cstddef> // for ptrdiff_t, nullptr_t, size_t
2323
#include <functional> // for less, greater

include/gsl/span

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
#ifndef GSL_SPAN_H
1818
#define GSL_SPAN_H
1919

20-
#include "assert" // for Expects
21-
#include "byte" // for byte
22-
#include "span_ext" // for span specialization of gsl::at and other span-related extensions
23-
#include "util" // for narrow_cast
20+
#include "gsl/assert" // for Expects
21+
#include "gsl/byte" // for byte
22+
#include "gsl/span_ext" // for span specialization of gsl::at and other span-related extensions
23+
#include "gsl/util" // for narrow_cast
2424

2525
#include <array> // for array
2626
#include <cstddef> // for ptrdiff_t, size_t, nullptr_t

include/gsl/span_ext

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
//
2828
///////////////////////////////////////////////////////////////////////////////
2929

30-
#include "assert" // GSL_KERNEL_MODE
31-
#include "util" // for narrow_cast, narrow
30+
#include "gsl/assert" // GSL_KERNEL_MODE
31+
#include "gsl/util" // for narrow_cast, narrow
3232

3333
#include <cstddef> // for ptrdiff_t, size_t
3434
#include <utility>

include/gsl/string_span

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#pragma once
22
#pragma message( \
33
"This header will soon be removed. Use <gsl/zstring> instead of <gsl/string_span>")
4-
#include "zstring"
4+
#include "gsl/zstring"

include/gsl/util

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef GSL_UTIL_H
1818
#define GSL_UTIL_H
1919

20-
#include "assert" // for Expects
20+
#include "gsl/assert" // for Expects
2121

2222
#include <array>
2323
#include <cstddef> // for ptrdiff_t, size_t

include/gsl/zstring

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef GSL_ZSTRING_H
1818
#define GSL_ZSTRING_H
1919

20-
#include "span_ext" // for dynamic_extent
20+
#include "gsl/span_ext" // for dynamic_extent
2121

2222
#include <cstddef> // for size_t, nullptr_t
2323

0 commit comments

Comments
 (0)