llvm-project/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func
Eric Fiselier 0d28f78401 [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function.
Summary:
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.

Reviewers: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11111

llvm-svn: 245335
2015-08-18 19:41:51 +00:00
..
func.wrap.func.alg
func.wrap.func.cap
func.wrap.func.con [libcxx] Fix PR23589: std::function doesn't recognize null pointer to varargs function. 2015-08-18 19:41:51 +00:00
func.wrap.func.inv Cleanup tests that fail in C++1z and with Clang 3.8 2015-07-17 22:27:43 +00:00
func.wrap.func.mod
func.wrap.func.nullptr
func.wrap.func.targ
function_types.h Fix std::function allocator constructors in C++03. 2015-06-14 23:30:09 +00:00
types.pass.cpp In early C++11 standard drafts, std::function derived from std::unary_function or std::binary_function if there was only one (or two) parameters. Before C++11 shipped, this restiction was lifted, but libc++ still does this (which is fine). However, the tests still check for this outdated requiremnt. Change then to check for the nested typedefs instead (which are still required by the standard). No change to the library. 2015-01-08 06:36:41 +00:00