Similar-but-distinct from #942; we should track it as a separate issue. The following libcxx tests are skipped:
|
# STL bug: We allow fill() and swap() for array<const T, 0>.
|
|
std/containers/sequences/array/array.fill/fill.fail.cpp FAIL
|
|
std/containers/sequences/array/array.swap/swap.fail.cpp FAIL
|
|
# STL bug: We allow fill() and swap() for array<const T, 0>.
|
|
containers\sequences\array\array.fill\fill.fail.cpp
|
|
containers\sequences\array\array.swap\swap.fail.cpp
|
Because they're implemented as no-ops:
|
template <class _Ty>
|
|
class array<_Ty, 0> {
|
|
public:
|
|
using value_type = _Ty;
|
|
using size_type = size_t;
|
|
using difference_type = ptrdiff_t;
|
|
using pointer = _Ty*;
|
|
using const_pointer = const _Ty*;
|
|
using reference = _Ty&;
|
|
using const_reference = const _Ty&;
|
|
|
|
using iterator = _Array_iterator<_Ty, 0>;
|
|
using const_iterator = _Array_const_iterator<_Ty, 0>;
|
|
using reverse_iterator = _STD reverse_iterator<iterator>;
|
|
using const_reverse_iterator = _STD reverse_iterator<const_iterator>;
|
|
|
|
#if _HAS_TR1_NAMESPACE
|
|
_DEPRECATE_TR1_NAMESPACE void assign(const _Ty&) {}
|
|
#endif // _HAS_TR1_NAMESPACE
|
|
|
|
_CONSTEXPR20 void fill(const _Ty&) {}
|
|
|
|
_CONSTEXPR20 void swap(array&) noexcept {}
|
WG21-N4861 [array.members]/3 specifies fill() with "Effects: As if by fill_n(begin(), N, u)." and /4 specifies swap() with "Effects: Equivalent to swap_ranges(begin(), end(), y.begin())."
Notably, these "equivalent to" calls are ill-formed for const T (even if there happen to be zero of them), so libcxx is correct to expect these to fail to compile (this is what meow.fail.cpp means).
We should be able to fix this without breaking ABI; static_assert should be sufficient.
Similar-but-distinct from #942; we should track it as a separate issue. The following libcxx tests are skipped:
STL/tests/libcxx/expected_results.txt
Lines 543 to 545 in 9e76d8c
STL/tests/libcxx/skipped_tests.txt
Lines 543 to 545 in 9e76d8c
Because they're implemented as no-ops:
STL/stl/inc/array
Lines 600 to 622 in 9e76d8c
WG21-N4861 [array.members]/3 specifies
fill()with "Effects: As if byfill_n(begin(), N, u)." and /4 specifiesswap()with "Effects: Equivalent toswap_ranges(begin(), end(), y.begin())."Notably, these "equivalent to" calls are ill-formed for
const T(even if there happen to be zero of them), so libcxx is correct to expect these to fail to compile (this is whatmeow.fail.cppmeans).We should be able to fix this without breaking ABI;
static_assertshould be sufficient.