aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-12-10 16:15:55 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2019-12-10 16:15:55 +0000
commitb65bdd27fd96afa3074308de18d6a54c67ba6aef (patch)
tree56456a67d6fb29ed438ae7a266cba2a7bd56ae44 /libstdc++-v3
parent990a09e486a2fb6170d82580d245e6f013a16904 (diff)
libstdc++: Reduce header dependencies in <span>
* include/std/span: Do not include <tuple> and <utility>. (tuple_size, tuple_element): Declare. From-SVN: r279171
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog3
-rw-r--r--libstdc++-v3/include/std/span5
2 files changed, 6 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f25e0407bfa..38c844117f4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,8 @@
2019-12-10 Jonathan Wakely <jwakely@redhat.com>
+ * include/std/span: Do not include <tuple> and <utility>.
+ (tuple_size, tuple_element): Declare.
+
* include/bits/iterator_concepts.h (indirect_result_t): Do not apply
iter_reference_t to parameter pack.
* testsuite/24_iterators/indirect_callable/projected.cc: New test.
diff --git a/libstdc++-v3/include/std/span b/libstdc++-v3/include/std/span
index f215decb453..ecce0b33b0b 100644
--- a/libstdc++-v3/include/std/span
+++ b/libstdc++-v3/include/std/span
@@ -39,8 +39,6 @@
#if __cplusplus > 201703L
#include <type_traits>
-#include <tuple>
-#include <utility>
#include <array>
#include <bits/stl_iterator.h>
#include <bits/range_access.h>
@@ -451,6 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __sp[_Index];
}
+ template<typename _Tp> struct tuple_size;
+ template<size_t __i, typename _Tp> struct tuple_element;
+
template<typename _Type, size_t _Extent>
struct tuple_size<span<_Type, _Extent>>
: public integral_constant<size_t, _Extent>