Applied iwyu --comment to the code base (#588)

This commit is contained in:
Tiago 2017-11-28 07:13:49 -08:00 committed by Neil MacIntosh
parent 1c95f9436e
commit 0d33bf6794
20 changed files with 157 additions and 102 deletions

View File

@ -20,8 +20,8 @@
#include <gsl/gsl_assert> // Ensures/Expects #include <gsl/gsl_assert> // Ensures/Expects
#include <gsl/gsl_util> // finally()/narrow()/narrow_cast()... #include <gsl/gsl_util> // finally()/narrow()/narrow_cast()...
#include <gsl/multi_span> // multi_span, strided_span... #include <gsl/multi_span> // multi_span, strided_span...
#include <gsl/pointers> // owner, not_null
#include <gsl/span> // span #include <gsl/span> // span
#include <gsl/string_span> // zstring, string_span, zstring_builder... #include <gsl/string_span> // zstring, string_span, zstring_builder...
#include <gsl/pointers> // owner, not_null
#endif // GSL_GSL_H #endif // GSL_GSL_H

View File

@ -17,9 +17,12 @@
#ifndef GSL_ALGORITHM_H #ifndef GSL_ALGORITHM_H
#define GSL_ALGORITHM_H #define GSL_ALGORITHM_H
#include <gsl/span> #include <gsl/gsl_assert> // for Expects
#include <gsl/span> // for dynamic_extent, span
#include <algorithm> #include <algorithm> // for copy_n
#include <cstddef> // for ptrdiff_t
#include <type_traits> // for is_assignable
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)

View File

@ -18,7 +18,7 @@
#define GSL_CONTRACTS_H #define GSL_CONTRACTS_H
#include <exception> #include <exception>
#include <stdexcept> #include <stdexcept> // for logic_error
// //
// There are three configuration options for this GSL implementation's behavior // There are three configuration options for this GSL implementation's behavior

View File

@ -17,12 +17,14 @@
#ifndef GSL_UTIL_H #ifndef GSL_UTIL_H
#define GSL_UTIL_H #define GSL_UTIL_H
#include <gsl/gsl_assert> // Ensures/Expects #include <gsl/gsl_assert> // for Expects
#include <array> #include <array>
#include <exception> #include <cstddef> // for ptrdiff_t, size_t
#include <type_traits> #include <exception> // for exception
#include <utility> #include <initializer_list> // for initializer_list
#include <type_traits> // for is_signed, integral_constant
#include <utility> // for forward
#if defined(_MSC_VER) #if defined(_MSC_VER)

View File

@ -17,22 +17,24 @@
#ifndef GSL_MULTI_SPAN_H #ifndef GSL_MULTI_SPAN_H
#define GSL_MULTI_SPAN_H #define GSL_MULTI_SPAN_H
#include <gsl/gsl_assert> #include <gsl/gsl_assert> // for Expects
#include <gsl/gsl_byte> #include <gsl/gsl_byte> // for byte
#include <gsl/gsl_util> #include <gsl/gsl_util> // for narrow_cast
#include <algorithm> #include <algorithm> // for transform, lexicographical_compare
#include <array> #include <array> // for array
#include <cassert> #include <cassert>
#include <cstddef> #include <cstddef> // for ptrdiff_t, size_t, nullptr_t
#include <cstdint> #include <cstdint> // for PTRDIFF_MAX
#include <functional> #include <functional> // for divides, multiplies, minus, negate, plus
#include <iterator> #include <initializer_list> // for initializer_list
#include <limits> #include <iterator> // for iterator, random_access_iterator_tag
#include <limits> // for numeric_limits
#include <new> #include <new>
#include <numeric> #include <numeric>
#include <stdexcept> #include <stdexcept>
#include <type_traits> #include <string> // for basic_string
#include <type_traits> // for enable_if_t, remove_cv_t, is_same, is_co...
#include <utility> #include <utility>
#ifdef _MSC_VER #ifdef _MSC_VER
@ -1070,7 +1072,6 @@ inline constexpr dim_t<N> dim(std::ptrdiff_t n) GSL_NOEXCEPT
template <typename ValueType, std::ptrdiff_t FirstDimension = dynamic_range, template <typename ValueType, std::ptrdiff_t FirstDimension = dynamic_range,
std::ptrdiff_t... RestDimensions> std::ptrdiff_t... RestDimensions>
class multi_span; class multi_span;
template <typename ValueType, std::size_t Rank> template <typename ValueType, std::size_t Rank>
class strided_span; class strided_span;

View File

@ -17,11 +17,13 @@
#ifndef GSL_POINTERS_H #ifndef GSL_POINTERS_H
#define GSL_POINTERS_H #define GSL_POINTERS_H
#include <gsl/gsl_assert> #include <gsl/gsl_assert> // for Ensures, Expects
#include <iosfwd> #include <algorithm> // for forward
#include <memory> #include <iosfwd> // for ptrdiff_t, nullptr_t, ostream, size_t
#include <type_traits> #include <memory> // for shared_ptr, unique_ptr
#include <system_error> // for hash
#include <type_traits> // for enable_if_t, is_convertible, is_assignable
#if defined(_MSC_VER) && _MSC_VER < 1910 #if defined(_MSC_VER) && _MSC_VER < 1910
#pragma push_macro("constexpr") #pragma push_macro("constexpr")

View File

@ -17,16 +17,18 @@
#ifndef GSL_SPAN_H #ifndef GSL_SPAN_H
#define GSL_SPAN_H #define GSL_SPAN_H
#include <gsl/gsl_assert> #include <gsl/gsl_assert> // for Expects
#include <gsl/gsl_byte> #include <gsl/gsl_byte> // for byte
#include <gsl/gsl_util> #include <gsl/gsl_util> // for narrow_cast, narrow
#include <array> #include <algorithm> // for lexicographical_compare
#include <iterator> #include <array> // for array
#include <cstddef> // for ptrdiff_t, size_t, nullptr_t
#include <iterator> // for reverse_iterator, distance, random_access_...
#include <limits> #include <limits>
#include <memory> #include <memory> // for unique_ptr, shared_ptr
#include <stdexcept> #include <stdexcept>
#include <type_traits> #include <type_traits> // for enable_if_t, declval, is_convertible, inte...
#include <utility> #include <utility>
#ifdef _MSC_VER #ifdef _MSC_VER

View File

@ -17,13 +17,17 @@
#ifndef GSL_STRING_SPAN_H #ifndef GSL_STRING_SPAN_H
#define GSL_STRING_SPAN_H #define GSL_STRING_SPAN_H
#include <gsl/gsl_assert> #include <gsl/gsl_assert> // for Ensures, Expects
#include <gsl/gsl_util> #include <gsl/gsl_util> // for narrow_cast
#include <gsl/span> #include <gsl/span> // for operator!=, operator==, dynamic_extent
#include <cstdint> #include <algorithm> // for equal, lexicographical_compare
#include <array> // for array
#include <cstddef> // for ptrdiff_t, size_t, nullptr_t
#include <cstdint> // for PTRDIFF_MAX
#include <cstring> #include <cstring>
#include <string> #include <string> // for basic_string, allocator, char_traits
#include <type_traits> // for declval, is_convertible, enable_if_t, add_...
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)

View File

@ -14,11 +14,17 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHE...
#include <gsl/gsl_algorithm> #include <gsl/gsl_algorithm> // for copy
#include <gsl/span> // for span
#include <array> #include <array> // for array
#include <cstddef> // for size_t
namespace gsl {
struct fail_fast;
} // namespace gsl
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;

View File

@ -14,9 +14,9 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
#include <gsl/gsl> #include <gsl/gsl_assert> // for fail_fast (ptr only), Ensures, Expects
using namespace gsl; using namespace gsl;

View File

@ -14,12 +14,18 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK_THROW...
#include <gsl/gsl> #include <gsl/gsl_util> // for at
#include <initializer_list> #include <array> // for array
#include <vector> #include <cstddef> // for size_t
#include <initializer_list> // for initializer_list
#include <vector> // for vector
namespace gsl {
struct fail_fast;
} // namespace gsl
using gsl::fail_fast; using gsl::fail_fast;

View File

@ -14,11 +14,15 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, TEST_CASE
#include <gsl/multi_span> #include <gsl/multi_span> // for static_bounds, static_bounds_dynamic_range_t
#include <vector> #include <cstddef> // for ptrdiff_t, size_t
namespace gsl {
struct fail_fast;
} // namespace gsl
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;

View File

@ -14,16 +14,9 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, TEST_...
#include <gsl/gsl_byte> #include <gsl/gsl_byte> // for to_byte, to_integer, byte, operator&, ope...
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <string>
#include <vector>
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;

View File

@ -14,16 +14,24 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
#include <gsl/multi_span> #include <gsl/gsl_byte> // for byte
#include <gsl/gsl_util> // for narrow_cast
#include <gsl/multi_span> // for multi_span, contiguous_span_iterator, dim
#include <iostream> #include <algorithm> // for fill, for_each
#include <list> #include <array> // for array
#include <map> #include <iostream> // for ptrdiff_t, size_t
#include <memory> #include <iterator> // for reverse_iterator, begin, end, operator!=
#include <string> #include <numeric> // for iota
#include <vector> #include <stddef.h> // for ptrdiff_t
#include <string> // for string
#include <vector> // for vector
namespace gsl {
struct fail_fast;
} // namespace gsl
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;

View File

@ -14,13 +14,20 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, TEST_...
#include <gsl/pointers> #include <gsl/pointers> // for not_null, operator<, operator<=, operator>
#include <memory> #include <algorithm> // for addressof
#include <string> #include <memory> // for shared_ptr, make_shared, operator<, opera...
#include <vector> #include <sstream> // for operator<<, ostringstream, basic_ostream:...
#include <stdint.h> // for uint16_t
#include <string> // for basic_string, operator==, string, operator<<
#include <typeinfo> // for type_info
namespace gsl {
struct fail_fast;
} // namespace gsl
using namespace gsl; using namespace gsl;

View File

@ -14,12 +14,9 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, TEST_...
#include <gsl/pointers> #include <gsl/pointers> // for owner
#include <functional>
#include <memory>
using namespace gsl; using namespace gsl;

View File

@ -14,17 +14,25 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, TEST_...
#include <gsl/span> #include <gsl/gsl_byte> // for byte
#include <gsl/gsl_util> // for narrow_cast, at
#include <gsl/span> // for span, span_iterator, operator==, operator!=
#include <iostream> #include <array> // for array
#include <list> #include <iostream> // for ptrdiff_t
#include <map> #include <iterator> // for reverse_iterator, operator-, operator==
#include <memory> #include <memory> // for unique_ptr, shared_ptr, make_unique, allo...
#include <regex> #include <regex> // for match_results, sub_match, match_results<>...
#include <string> #include <stddef.h> // for ptrdiff_t
#include <vector> #include <string> // for string
#include <type_traits> // for integral_constant<>::value, is_default_co...
#include <vector> // for vector
namespace gsl {
struct fail_fast;
} // namespace gsl
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;

View File

@ -14,16 +14,21 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
#include <gsl/multi_span> #include <gsl/gsl_byte> // for byte
#include <gsl/gsl_util> // for narrow_cast
#include <gsl/multi_span> // for strided_span, index, multi_span, strided_...
#include <iostream> #include <iostream> // for size_t
#include <list> #include <iterator> // for begin, end
#include <map> #include <numeric> // for iota
#include <memory> #include <type_traits> // for integral_constant<>::value, is_convertible
#include <string> #include <vector> // for vector
#include <vector>
namespace gsl {
struct fail_fast;
} // namespace gsl
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;

View File

@ -14,15 +14,19 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, TEST_...
#include <gsl/gsl> //owner #include <gsl/gsl_assert> // for Expects, fail_fast (ptr only)
#include <gsl/string_span> #include <gsl/pointers> // for owner
#include <gsl/span> // for span, dynamic_extent
#include <gsl/string_span> // for basic_string_span, operator==, ensure_z
#include <algorithm> #include <algorithm> // for move, find
#include <cstdlib> #include <cstddef> // for size_t
#include <map> #include <map> // for map
#include <vector> #include <string> // for basic_string, string, char_traits, operat...
#include <type_traits> // for remove_reference<>::type
#include <vector> // for vector, allocator
using namespace std; using namespace std;
using namespace gsl; using namespace gsl;

View File

@ -14,11 +14,14 @@
// //
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <catch/catch.hpp> #include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, TEST_...
#include <gsl/gsl> #include <gsl/gsl_util> // for narrow, finally, narrow_cast, narrowing_e...
#include <functional> #include <algorithm> // for move
#include <functional> // for reference_wrapper, _Bind_helper<>::type
#include <limits> // for numeric_limits
#include <stdint.h> // for uint32_t, int32_t
using namespace gsl; using namespace gsl;