[libcxx-commits] [PATCH] D116388: [libc++] Properly handle specializations of std::is_placeholder.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 29 17:55:33 PST 2021


Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, mclow.lists, libc++, jwakely.
Quuxplusone added a project: libc++.
Herald added a subscriber: kristof.beyls.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

Before this patch, the user needed to specialize both of `is_placeholder<MyType>` and `is_placeholder<const MyType>`.
After this patch, only the former is needed (although the latter is harmless if provided).

The new tests don't actually fail unless return type deduction is used, which is a C++14 feature. Specializing `is_placeholder` is still allowed in C++11, though.

All of the above applies to `is_bind_expression`, too.

Fixes https://github.com/llvm/llvm-project/issues/51095


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116388

Files:
  libcxx/include/__functional/bind.h
  libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
  libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_placeholder.pass.cpp
  libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/specialization.pass.cpp
  libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/specialization.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116388.396588.patch
Type: text/x-patch
Size: 8650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211230/84c7cf30/attachment-0001.bin>


More information about the libcxx-commits mailing list