[all-commits] [llvm/llvm-project] 3894a8: [libc++] Implement the resolutions of LWG3506 and ...

Quuxplusone via All-commits all-commits at lists.llvm.org
Wed Jul 28 18:16:24 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3894a8a4768fd6fa9bf18303a0db1687c7c687b3
      https://github.com/llvm/llvm-project/commit/3894a8a4768fd6fa9bf18303a0db1687c7c687b3
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    M libcxx/docs/Status/Cxx2bIssues.csv
    M libcxx/docs/Status/RangesIssues.csv
    M libcxx/include/queue
    A libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_iter_iter_alloc.pass.cpp
    A libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_iter_iter_comp_alloc.pass.cpp
    A libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_iter_iter_comp_cont_alloc.pass.cpp
    A libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_iter_iter_comp_rcont_alloc.pass.cpp
    A libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_constraint.compile.pass.cpp
    M libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp

  Log Message:
  -----------
  [libc++] Implement the resolutions of LWG3506 and LWG3522.

Implement the changes in all language modes.

LWG3506 "Missing allocator-extended constructors for priority_queue"
makes the following changes:
- New allocator-extended constructors for priority_queue.
- New deduction guides targeting those constructors.

LWG3522: "Missing requirement on InputIterator template parameter
for priority_queue constructors". The iterator parameter should be
constrained to actually be an iterator type. `priority_queue{1,2}`
should be SFINAE-friendly ill-formed.

Also, do a drive-by fix in the allocator-extended move constructor:
there's no need to do a `make_heap` after moving from `__q.c` into
our own `c`, because that container was already heapified when it
was part of `__q`. [priqueue.cons.alloc] actually specifies the
behavior and does *not* mention calling `make_heap`. I think this
was just a copy-paste thinko. It dates back to the initial import
of libc++.

Differential Revision: https://reviews.llvm.org/D106824
Differential Revision: https://reviews.llvm.org/D106827




More information about the All-commits mailing list