summaryrefslogtreecommitdiffstats
path: root/libcxx/include/span
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-04-01 16:39:34 +0000
committerLouis Dionne <ldionne@apple.com>2019-04-01 16:39:34 +0000
commit2b0c7abba35ac2dc8e00c121b93476ff879bfd86 (patch)
tree8513f212173b7c12fdc12c21c5f77d16afd5a0e2 /libcxx/include/span
parentefa6d803c624f9251d0ab7881122501bb9d27368 (diff)
downloadbcm5719-llvm-2b0c7abba35ac2dc8e00c121b93476ff879bfd86.tar.gz
bcm5719-llvm-2b0c7abba35ac2dc8e00c121b93476ff879bfd86.zip
[libc++] Declare std::tuple_element as struct instead of class
Similarly to https://reviews.llvm.org/rL350972, this revision changes std::tuple_element from class to struct. Fixes PR41331. Thanks to Jan Wilken Dörrie for the patch. Differential Revision: https://reviews.llvm.org/D60069 llvm-svn: 357411
Diffstat (limited to 'libcxx/include/span')
-rw-r--r--libcxx/include/span3
1 files changed, 1 insertions, 2 deletions
diff --git a/libcxx/include/span b/libcxx/include/span
index 6b89d606c80..0694f5115df 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -531,11 +531,10 @@ struct _LIBCPP_TEMPLATE_VIS tuple_size<span<_Tp, dynamic_extent>>; // declared b
template <size_t _Ip, class _Tp, size_t _Size>
-class _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, span<_Tp, _Size>>
+struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, span<_Tp, _Size>>
{
static_assert( dynamic_extent != _Size, "std::tuple_element<> not supported for std::span<T, dynamic_extent>");
static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::span)");
-public:
typedef _Tp type;
};
OpenPOWER on IntegriCloud