[libcxx-commits] [libcxx] [libc++] tests with picolibc: Fix iterator diff_type to std::streamoff (PR #74072)

S. B. Tam via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 1 06:20:37 PST 2023


================
@@ -152,8 +147,7 @@ static_assert(testIOIterator<std::insert_iterator<std::vector<int>>, std::output
 static_assert(testConst<std::istream_iterator<int, char>, std::input_iterator_tag, int>());
 
 #if !defined(TEST_HAS_NO_LOCALIZATION)
-// libc++-specific since pointer type is unspecified:
-LIBCPP_STATIC_ASSERT(test<std::istreambuf_iterator<char>, std::input_iterator_tag, char, long long, char, char*>());
+static_assert(test<std::istreambuf_iterator<char>, std::input_iterator_tag, char, std::streamoff, char, char*>());
----------------
cpplearner wrote:

This is libc++-specific because it assumes that `std::istreambuf_iterator<char>::pointer` is `char*`. MSVC STL, for example, uses `const char*`.

https://github.com/llvm/llvm-project/pull/74072


More information about the libcxx-commits mailing list