[libcxx-commits] [PATCH] D104323: [libc++] Undeprecate the std::allocator<void> specialization
    Andrey Khalyavin via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Sat Nov 13 21:32:59 PST 2021
    
    
  
halyavin added inline comments.
================
Comment at: libcxx/include/__memory/allocator.h:31
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
 template <>
----------------
We use `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` and this change breaks code that uses `allocator<void>` since `_LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp& reference;` in the primary template doesn't compile:  `error: cannot form a reference to 'void'`.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104323/new/
https://reviews.llvm.org/D104323
    
    
More information about the libcxx-commits
mailing list