Skip to content

Commit b2f88d0

Browse files
committed
[libc++] tests with picolibc: Fix iterator diff_type to std::streamoff
The hardcoded value of long int was not valid for newlib and picolibc.
1 parent e59a0cd commit b2f88d0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
// This test uses iterator types from std::filesystem
1212
// XFAIL: availability-filesystem-missing
1313

14-
// std::same_as<typename Traits::difference_type, DiffType> failed.
15-
// The former was long and the latter was long long.
16-
// Possibly related to "using streamoff = long int" in ios.h.
17-
// XFAIL: LIBCXX-PICOLIBC-FIXME
18-
1914
// template<class T>
2015
// struct iterator_traits;
2116

@@ -152,8 +147,7 @@ static_assert(testIOIterator<std::insert_iterator<std::vector<int>>, std::output
152147
static_assert(testConst<std::istream_iterator<int, char>, std::input_iterator_tag, int>());
153148

154149
#if !defined(TEST_HAS_NO_LOCALIZATION)
155-
// libc++-specific since pointer type is unspecified:
156-
LIBCPP_STATIC_ASSERT(test<std::istreambuf_iterator<char>, std::input_iterator_tag, char, long long, char, char*>());
150+
static_assert(test<std::istreambuf_iterator<char>, std::input_iterator_tag, char, std::streamoff, char, char*>());
157151
static_assert(test<std::move_iterator<int*>, std::random_access_iterator_tag, int, std::ptrdiff_t, int&&, int*>());
158152
static_assert(testIOIterator<std::ostream_iterator<int, char>, std::output_iterator_tag>());
159153
static_assert(testIOIterator<std::ostreambuf_iterator<int, char>, std::output_iterator_tag>());

0 commit comments

Comments
 (0)