diff --git a/include/gsl/span b/include/gsl/span index 23c58c9..e8ca691 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -21,7 +21,6 @@ #include // for byte #include // for narrow_cast, narrow -#include // for array #include // for ptrdiff_t, size_t, nullptr_t #include // for reverse_iterator, distance, random_access_... #include // for enable_if_t, declval, is_convertible, inte... @@ -63,6 +62,15 @@ #pragma GCC diagnostic ignored "-Wsign-conversion" #endif +namespace std +{ +// forward declaring std::array. +// array is only used for a few constructors, so pulling the entire header is unnecessary for span. +// The end user's logic will pull in the actual definition of array if they need it. +template +class array; +} + namespace gsl {