[libcxx-commits] [libcxx] [libc++][test] Don't include `test_format_context.h` in `parse.pass.cpp` (PR #83734)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 5 21:34:21 PST 2024


================
@@ -41,7 +41,7 @@ constexpr void test(StringViewT fmt, std::size_t offset) {
   static_assert(std::semiregular<decltype(formatter)>);
 
   std::same_as<typename StringViewT::iterator> auto it = formatter.parse(parse_ctx);
-  assert(it == fmt.end() - offset);
+  assert(std::to_address(it) == std::to_address(fmt.end()) - offset);
----------------
frederick-vs-ja wrote:

Added. Now the comments say `// std::to_address works around LWG3989 and MSVC STL's iterator debugging mechanism.` and `<memory>` are correspondingly included in all modified tests.

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


More information about the libcxx-commits mailing list