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

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Mar 3 10:47:11 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);
----------------
mordante wrote:

Since this works for libc++ can you add a comment referring to the LWG issue you created.
(That should avoid people trying to "simplify the code.)
Searching for the original `assert` in the libc++ tests finds more occurrences. Can you fix these too?

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


More information about the libcxx-commits mailing list