mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-05 22:36:05 +00:00

Currently the member functions std::allocator<T>::allocate, std::experimental::pmr::polymorphic_allocator::allocate and std::resource_adaptor<T>::do_allocate throw an exception of type std::length_error when the requested size exceeds the maximum size. According to the C++ standard ([allocator.members]/4, [mem.poly.allocator.mem]/1), std::allocator<T>::allocate and std::pmr::polymorphic_allocator::allocate must throw a std::bad_array_new_length exception in this case. The patch fixes the issue with std::allocator<T>::allocate and changes the type the exception thrown by std::experimental::pmr::resource_adaptor<T>::do_allocate to std::bad_array_new_length as well for consistency. The patch resolves LWG 3237, LWG 3038 and LWG 3190. Reviewed By: ldionne, #libc, Quuxplusone Differential Revision: https://reviews.llvm.org/D110846
libc++ Documentation ==================== The libc++ documentation is written using the Sphinx documentation generator. It is currently tested with Sphinx 1.1.3. To build the documents into html configure libc++ with the following cmake options: * -DLLVM_ENABLE_SPHINX=ON * -DLIBCXX_INCLUDE_DOCS=ON After configuring libc++ with these options the make rule `docs-libcxx-html` should be available. The documentation in this directory is published at https://libcxx.llvm.org. It is kept up-to-date by a build bot: https://lab.llvm.org/buildbot/#/builders/publish-sphinx-docs. If you notice that the documentation is not updating anymore, please contact one of the maintainers.