Skip to content

Commit 4742bc1

Browse files
authored
use relative path in # include (#1194)
Reverts commit that changes #include "assert" -> #include "gsl/assert". This change is necessary in order to comply with CppCoreGuideline's SF.12. Now we do #include "./assert".
1 parent ec729d6 commit 4742bc1

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
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 "gsl/assert" // for Expects
21-
#include "gsl/span" // for dynamic_extent, span
20+
#include "./assert" // for Expects
21+
#include "./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 "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()...
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()...
2828

2929
#ifdef __cpp_exceptions
30-
#include "gsl/narrow" // narrow()
30+
#include "./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 "gsl/assert" // for GSL_SUPPRESS
20-
#include "gsl/util" // for narrow_cast
19+
#include "./assert" // for GSL_SUPPRESS
20+
#include "./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 "gsl/assert" // for Ensures, Expects
20+
#include "./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 "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
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
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 "gsl/assert" // GSL_KERNEL_MODE
31-
#include "gsl/util" // for narrow_cast, narrow
30+
#include "./assert" // GSL_KERNEL_MODE
31+
#include "./util" // for narrow_cast, narrow
3232

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

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 "gsl/assert" // for Expects
20+
#include "./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 "gsl/span_ext" // for dynamic_extent
20+
#include "./span_ext" // for dynamic_extent
2121

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

0 commit comments

Comments
 (0)