[libcxx-commits] [PATCH] D101638: [libc++] std::to_address mustn't depend on P::element_type.
    Zoe Carver via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Mon May  3 12:54:38 PDT 2021
    
    
  
zoecarver added inline comments.
================
Comment at: libcxx/test/std/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp:32
+    assert(std::to_address(c.begin()) == c.data());
+    assert(std::to_address(c.end()) == c.data() + c.size());
+    assert(std::to_address(cc.begin()) == cc.data());
----------------
@Quuxplusone this is the reason the test is failing in debug mode, we can't dereference end. Do we ever really want to be dereferencing end anyway, isn't that UB? I don't think we need to test this, at least not in debug mode. 
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101638/new/
https://reviews.llvm.org/D101638
    
    
More information about the libcxx-commits
mailing list