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
|
#ifndef GSL_ALGORITHM_H
|
||||||
#define GSL_ALGORITHM_H
|
#define GSL_ALGORITHM_H
|
||||||
|
|
||||||
#include <gsl/assert> // for Expects
|
#include "assert" // for Expects
|
||||||
#include <gsl/span> // for dynamic_extent, span
|
#include "span" // for dynamic_extent, span
|
||||||
|
|
||||||
#include <algorithm> // for copy_n
|
#include <algorithm> // for copy_n
|
||||||
#include <cstddef> // for ptrdiff_t
|
#include <cstddef> // for ptrdiff_t
|
||||||
|
@ -17,16 +17,16 @@
|
|||||||
#ifndef GSL_GSL_H
|
#ifndef GSL_GSL_H
|
||||||
#define GSL_GSL_H
|
#define GSL_GSL_H
|
||||||
|
|
||||||
#include <gsl/algorithm> // copy
|
#include "algorithm" // copy
|
||||||
#include <gsl/assert> // Ensures/Expects
|
#include "assert" // Ensures/Expects
|
||||||
#include <gsl/byte> // byte
|
#include "byte" // byte
|
||||||
#include <gsl/pointers> // owner, not_null
|
#include "pointers" // owner, not_null
|
||||||
#include <gsl/span> // span
|
#include "span" // span
|
||||||
#include <gsl/string_span> // zstring, string_span, zstring_builder...
|
#include "string_span" // zstring, string_span, zstring_builder...
|
||||||
#include <gsl/util> // finally()/narrow_cast()...
|
#include "util" // finally()/narrow_cast()...
|
||||||
|
|
||||||
#ifdef __cpp_exceptions
|
#ifdef __cpp_exceptions
|
||||||
#include <gsl/narrow> // narrow()
|
#include "narrow" // narrow()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // GSL_GSL_H
|
#endif // GSL_GSL_H
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#pragma message( \
|
#pragma message( \
|
||||||
"This header will soon be removed. Use <gsl/algorithm> instead of <gsl/gsl_algorithm>")
|
"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 once
|
||||||
#pragma message("This header will soon be removed. Use <gsl/assert> instead of <gsl/gsl_assert>")
|
#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 once
|
||||||
#pragma message("This header will soon be removed. Use <gsl/byte> instead of <gsl/gsl_byte>")
|
#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 once
|
||||||
#pragma message("This header will soon be removed. Use <gsl/narrow> instead of <gsl/gsl_narrow>")
|
#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 once
|
||||||
#pragma message("This header will soon be removed. Use <gsl/util> instead of <gsl/gsl_util>")
|
#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
|
#ifndef GSL_NARROW_H
|
||||||
#define GSL_NARROW_H
|
#define GSL_NARROW_H
|
||||||
#include <gsl/assert> // for Expects
|
#include "assert" // for Expects
|
||||||
#include <gsl/util> // for narrow_cast
|
#include "util" // for narrow_cast
|
||||||
namespace gsl
|
namespace gsl
|
||||||
{
|
{
|
||||||
struct narrowing_error : public std::exception
|
struct narrowing_error : public std::exception
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#ifndef GSL_POINTERS_H
|
#ifndef GSL_POINTERS_H
|
||||||
#define GSL_POINTERS_H
|
#define GSL_POINTERS_H
|
||||||
|
|
||||||
#include <gsl/assert> // for Ensures, Expects
|
#include "assert" // for Ensures, Expects
|
||||||
|
|
||||||
#include <algorithm> // for forward
|
#include <algorithm> // for forward
|
||||||
#include <cstddef> // for ptrdiff_t, nullptr_t, size_t
|
#include <cstddef> // for ptrdiff_t, nullptr_t, size_t
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
#ifndef GSL_SPAN_H
|
#ifndef GSL_SPAN_H
|
||||||
#define GSL_SPAN_H
|
#define GSL_SPAN_H
|
||||||
|
|
||||||
#include <gsl/assert> // for Expects
|
#include "assert" // for Expects
|
||||||
#include <gsl/byte> // for byte
|
#include "byte" // for byte
|
||||||
#include <gsl/util> // for narrow_cast
|
#include "span_ext" // for span specialization of gsl::at and other span-related extensions
|
||||||
|
#include "util" // for narrow_cast
|
||||||
|
|
||||||
#include <array> // for array
|
#include <array> // for array
|
||||||
#include <cstddef> // for ptrdiff_t, size_t, nullptr_t
|
#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 <iterator> // for reverse_iterator, distance, random_access_...
|
||||||
#include <type_traits> // for enable_if_t, declval, is_convertible, inte...
|
#include <type_traits> // for enable_if_t, declval, is_convertible, inte...
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <gsl/assert> // GSL_KERNEL_MODE
|
#include "assert" // GSL_KERNEL_MODE
|
||||||
#include <gsl/util> // for narrow_cast, narrow
|
#include "util" // for narrow_cast, narrow
|
||||||
|
|
||||||
#include <cstddef> // for ptrdiff_t, size_t
|
#include <cstddef> // for ptrdiff_t, size_t
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
#ifndef GSL_STRING_SPAN_H
|
#ifndef GSL_STRING_SPAN_H
|
||||||
#define GSL_STRING_SPAN_H
|
#define GSL_STRING_SPAN_H
|
||||||
|
|
||||||
#include <gsl/assert> // for Ensures, Expects
|
#include "assert" // for Ensures, Expects
|
||||||
#include <gsl/span_ext> // for operator!=, operator==, dynamic_extent
|
#include "span_ext" // for operator!=, operator==, dynamic_extent
|
||||||
#include <gsl/util> // for narrow_cast
|
#include "util" // for narrow_cast
|
||||||
|
|
||||||
#include <algorithm> // for equal, lexicographical_compare
|
#include <algorithm> // for equal, lexicographical_compare
|
||||||
#include <array> // for array
|
#include <array> // for array
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#ifndef GSL_UTIL_H
|
#ifndef GSL_UTIL_H
|
||||||
#define GSL_UTIL_H
|
#define GSL_UTIL_H
|
||||||
|
|
||||||
#include <gsl/assert> // for Expects
|
#include "assert" // for Expects
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstddef> // for ptrdiff_t, size_t
|
#include <cstddef> // for ptrdiff_t, size_t
|
||||||
|
Loading…
Reference in New Issue
Block a user