mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
quoted form of #include when GSL includes GSL files (#1030)
[SF.12: Prefer the quoted form of #include for files relative to the including file and the angle bracket form everywhere else](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rs-incform) Additionally changed #include order in `span` so that all `span_ext` is in the GSL include block and not in the STL include block. Fixes issues #1025. Co-authored-by: Werner Henze <w.henze@avm.de>
This commit is contained in:
parent
a353456718
commit
4377f6e603
@ -17,8 +17,8 @@
|
||||
#ifndef GSL_ALGORITHM_H
|
||||
#define GSL_ALGORITHM_H
|
||||
|
||||
#include <gsl/assert> // for Expects
|
||||
#include <gsl/span> // for dynamic_extent, span
|
||||
#include "assert" // for Expects
|
||||
#include "span" // for dynamic_extent, span
|
||||
|
||||
#include <algorithm> // for copy_n
|
||||
#include <cstddef> // for ptrdiff_t
|
||||
|
@ -17,16 +17,16 @@
|
||||
#ifndef GSL_GSL_H
|
||||
#define GSL_GSL_H
|
||||
|
||||
#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/string_span> // zstring, string_span, zstring_builder...
|
||||
#include <gsl/util> // finally()/narrow_cast()...
|
||||
#include "algorithm" // copy
|
||||
#include "assert" // Ensures/Expects
|
||||
#include "byte" // byte
|
||||
#include "pointers" // owner, not_null
|
||||
#include "span" // span
|
||||
#include "string_span" // zstring, string_span, zstring_builder...
|
||||
#include "util" // finally()/narrow_cast()...
|
||||
|
||||
#ifdef __cpp_exceptions
|
||||
#include <gsl/narrow> // narrow()
|
||||
#include "narrow" // narrow()
|
||||
#endif
|
||||
|
||||
#endif // GSL_GSL_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma message( \
|
||||
"This header will soon be removed. Use <gsl/algorithm> instead of <gsl/gsl_algorithm>")
|
||||
#include <gsl/algorithm>
|
||||
#include "algorithm"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
#pragma message("This header will soon be removed. Use <gsl/assert> instead of <gsl/gsl_assert>")
|
||||
#include <gsl/assert>
|
||||
#include "assert"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
#pragma message("This header will soon be removed. Use <gsl/byte> instead of <gsl/gsl_byte>")
|
||||
#include <gsl/byte>
|
||||
#include "byte"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
#pragma message("This header will soon be removed. Use <gsl/narrow> instead of <gsl/gsl_narrow>")
|
||||
#include <gsl/narrow>
|
||||
#include "narrow"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
#pragma message("This header will soon be removed. Use <gsl/util> instead of <gsl/gsl_util>")
|
||||
#include <gsl/util>
|
||||
#include "util"
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
#ifndef GSL_NARROW_H
|
||||
#define GSL_NARROW_H
|
||||
#include <gsl/assert> // for Expects
|
||||
#include <gsl/util> // for narrow_cast
|
||||
#include "assert" // for Expects
|
||||
#include "util" // for narrow_cast
|
||||
namespace gsl
|
||||
{
|
||||
struct narrowing_error : public std::exception
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef GSL_POINTERS_H
|
||||
#define GSL_POINTERS_H
|
||||
|
||||
#include <gsl/assert> // for Ensures, Expects
|
||||
#include "assert" // for Ensures, Expects
|
||||
|
||||
#include <algorithm> // for forward
|
||||
#include <cstddef> // for ptrdiff_t, nullptr_t, size_t
|
||||
|
@ -17,13 +17,13 @@
|
||||
#ifndef GSL_SPAN_H
|
||||
#define GSL_SPAN_H
|
||||
|
||||
#include <gsl/assert> // for Expects
|
||||
#include <gsl/byte> // for byte
|
||||
#include <gsl/util> // for narrow_cast
|
||||
#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 <array> // for array
|
||||
#include <cstddef> // for ptrdiff_t, size_t, nullptr_t
|
||||
#include <gsl/span_ext> // for span specialization of gsl::at and other span-related extensions
|
||||
#include <iterator> // for reverse_iterator, distance, random_access_...
|
||||
#include <type_traits> // for enable_if_t, declval, is_convertible, inte...
|
||||
|
||||
|
@ -27,8 +27,8 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <gsl/assert> // GSL_KERNEL_MODE
|
||||
#include <gsl/util> // for narrow_cast, narrow
|
||||
#include "assert" // GSL_KERNEL_MODE
|
||||
#include "util" // for narrow_cast, narrow
|
||||
|
||||
#include <cstddef> // for ptrdiff_t, size_t
|
||||
#include <utility>
|
||||
|
@ -17,9 +17,9 @@
|
||||
#ifndef GSL_STRING_SPAN_H
|
||||
#define GSL_STRING_SPAN_H
|
||||
|
||||
#include <gsl/assert> // for Ensures, Expects
|
||||
#include <gsl/span_ext> // for operator!=, operator==, dynamic_extent
|
||||
#include <gsl/util> // for narrow_cast
|
||||
#include "assert" // for Ensures, Expects
|
||||
#include "span_ext" // for operator!=, operator==, dynamic_extent
|
||||
#include "util" // for narrow_cast
|
||||
|
||||
#include <algorithm> // for equal, lexicographical_compare
|
||||
#include <array> // for array
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef GSL_UTIL_H
|
||||
#define GSL_UTIL_H
|
||||
|
||||
#include <gsl/assert> // for Expects
|
||||
#include "assert" // for Expects
|
||||
|
||||
#include <array>
|
||||
#include <cstddef> // for ptrdiff_t, size_t
|
||||
|
Loading…
Reference in New Issue
Block a user