[libcxx-commits] [PATCH] D112904: [libc++] P0433R2: test that deduction guides are properly SFINAEd away.

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Oct 31 20:35:24 PDT 2021


var-const created this revision.
var-const requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Deduction guides for containers should not participate in overload
resolution when called with certain incorrect types (e.g. when called
with a template argument in place of an `InputIterator` that doesn't
qualify as an input iterator). Attempts to deduce the type of
a `unique_ptr` from a pointer or a built-in array are ill-formed.

The tests try out every possible incorrect parameter (but never more
than one incorrect parameter in the same invocation).
incorrect parameters.

Also add deduction guides to the synopsis for associative and unordered
containers (this was accidentally omitted from D112510 <https://reviews.llvm.org/D112510>).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112904

Files:
  libcxx/docs/Status/Cxx17.rst
  libcxx/docs/Status/Cxx17Papers.csv
  libcxx/include/__memory/allocator_traits.h
  libcxx/include/deque
  libcxx/include/forward_list
  libcxx/include/list
  libcxx/include/map
  libcxx/include/set
  libcxx/include/unordered_map
  libcxx/include/unordered_set
  libcxx/include/vector
  libcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp
  libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.pass.cpp
  libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.pass.cpp
  libcxx/test/std/containers/associative/set/set.cons/deduct.pass.cpp
  libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
  libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp
  libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
  libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp
  libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp
  libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp
  libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp
  libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp
  libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.pass.cpp
  libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.pass.cpp
  libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp
  libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/deduct.fail.cpp
  libcxx/test/support/deduction_guides_sfinae_checks.h
  libcxx/test/support/sfinaes_away.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112904.383708.patch
Type: text/x-patch
Size: 70189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211101/9a93b885/attachment-0001.bin>


More information about the libcxx-commits mailing list