Commit b65bdd27 by Jonathan Wakely Committed by Jonathan Wakely

libstdc++: Reduce header dependencies in <span>

	* include/std/span: Do not include <tuple> and <utility>.
	(tuple_size, tuple_element): Declare.

From-SVN: r279171
parent 990a09e4
2019-12-10 Jonathan Wakely <jwakely@redhat.com> 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 * include/bits/iterator_concepts.h (indirect_result_t): Do not apply
iter_reference_t to parameter pack. iter_reference_t to parameter pack.
* testsuite/24_iterators/indirect_callable/projected.cc: New test. * testsuite/24_iterators/indirect_callable/projected.cc: New test.
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
#if __cplusplus > 201703L #if __cplusplus > 201703L
#include <type_traits> #include <type_traits>
#include <tuple>
#include <utility>
#include <array> #include <array>
#include <bits/stl_iterator.h> #include <bits/stl_iterator.h>
#include <bits/range_access.h> #include <bits/range_access.h>
...@@ -451,6 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -451,6 +449,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __sp[_Index]; return __sp[_Index];
} }
template<typename _Tp> struct tuple_size;
template<size_t __i, typename _Tp> struct tuple_element;
template<typename _Type, size_t _Extent> template<typename _Type, size_t _Extent>
struct tuple_size<span<_Type, _Extent>> struct tuple_size<span<_Type, _Extent>>
: public integral_constant<size_t, _Extent> : public integral_constant<size_t, _Extent>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment