mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
AK: Conform SimpleIterator to the random access iterator requirements
This requires pulling in some of the STL, but the result is that our
iterator is now STL Approved ™️ and our containers can be
auto-conformed to Swift protocols.
This commit is contained in:
parent
227ac9973f
commit
756ef2c722
Notes:
github-actions[bot]
2024-08-17 23:45:35 +00:00
Author: https://github.com/ADKaster
Commit: 756ef2c722
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/986
6 changed files with 109 additions and 26 deletions
|
@ -16,6 +16,19 @@ TEST_CASE(constexpr_default_constructor_is_empty)
|
|||
static_assert(span.is_empty(), "Default constructed span should be empty.");
|
||||
}
|
||||
|
||||
TEST_CASE(conforms_to_iterator_protocol)
|
||||
{
|
||||
static_assert(std::random_access_iterator<Span<int>::Iterator>);
|
||||
static_assert(std::random_access_iterator<Span<int>::ConstIterator>);
|
||||
static_assert(std::random_access_iterator<Span<int const>::Iterator>);
|
||||
static_assert(std::random_access_iterator<Span<int const>::ConstIterator>);
|
||||
|
||||
static_assert(std::random_access_iterator<Bytes::Iterator>);
|
||||
static_assert(std::random_access_iterator<Bytes::ConstIterator>);
|
||||
static_assert(std::random_access_iterator<ReadonlyBytes::Iterator>);
|
||||
static_assert(std::random_access_iterator<ReadonlyBytes::ConstIterator>);
|
||||
}
|
||||
|
||||
TEST_CASE(implicit_conversion_to_const)
|
||||
{
|
||||
constexpr Bytes bytes0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue