[PATCH] D11111: [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function.

Eric Fiselier eric at efcs.ca
Fri Jul 10 15:30:04 PDT 2015


EricWF created this revision.
EricWF added a reviewer: mclow.lists.
EricWF added a subscriber: cfe-commits.

This patch fixes __not_null's detection of nullptr by breaking it down into 4 cases.

1. `__not_null(Tp const&)`: Default case. Tp is not null.
2. `__not_null(Tp* __ptr);` Case for pointers to functions.
3. `__not_null(_Ret _Class::* __ptr);` Case for pointers to members.
4. `__not_null(function<Tp> const&);`: Cases for other std::functions.

http://reviews.llvm.org/D11111

Files:
  include/__functional_03
  include/functional
  test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11111.29499.patch
Type: text/x-patch
Size: 19516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150710/8fe0761d/attachment.bin>


More information about the cfe-commits mailing list