summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/func.wrap
Commit message (Collapse)AuthorAgeFilesLines
* Implement LWG#2385; remove the allocator-aware std::function::assign call. ↵Marshall Clow2016-01-251-0/+4
| | | | | | It was useless, and didn't actually *do anything* with the allocator. Now it's gone. On the off chance that someone is mistakenly calling it, it's only gone in C++1z llvm-svn: 258697
* Add missing license headersEric Fiselier2016-01-191-0/+9
| | | | llvm-svn: 258196
* [libcxx] Fix PR23589: std::function doesn't recognize null pointer to ↵Eric Fiselier2015-08-181-0/+247
| | | | | | | | | | | | | | | | | | | | 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
* Cleanup tests that fail in C++1z and with Clang 3.8Eric Fiselier2015-07-177-369/+242
| | | | llvm-svn: 242581
* Fix std::function allocator constructors in C++03.Eric Fiselier2015-06-143-119/+206
| | | | | | | | | The C++03 version of function tried to default construct the allocator in the uses allocator constructors when no allocation was performed. These constructors would fail to compile when used with allocators that had no default constructor. llvm-svn: 239708
* [libc++] Fix PR22922 - Allocator support for std::function does not know how ↵Eric Fiselier2015-03-185-15/+18
| | | | | | | | | | | | | | | | | | | to rebind. Summary: This patch changes std::function to use allocator_traits to rebind the allocator instead of allocator itself. It also changes most of the tests to use `bare_allocator` where possible instead of `test_allocator`. Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8391 llvm-svn: 232686
* [libcxx] Fix PR 22468 - std::function<void()> does not accept ↵Eric Fiselier2015-02-104-0/+81
| | | | | | | | | | | | | | | | | | | non-void-returning functions Summary: The bug can be found here: http://llvm.org/bugs/show_bug.cgi?id=22468 `__invoke_void_return_wrapper` is needed to properly handle calling a function that returns a value but where the std::function return type is void. Without this '-Wsystem-headers' will cause `function::operator()(...)` to not compile. Reviewers: eugenis, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7444 llvm-svn: 228705
* Fix use of C++11 extensions in C++03 code.Eric Fiselier2015-02-102-1/+3
| | | | llvm-svn: 228698
* In early C++11 standard drafts, std::function derived from ↵Marshall Clow2015-01-081-29/+88
| | | | | | 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. llvm-svn: 225430
* [libcxx] Consolidate new/delete replacement in tests and disable it when ↵Eric Fiselier2014-12-229-235/+95
| | | | | | | | | | | | | | | | | | | | using sanitizers. Summary: MSAN and ASAN also replace new/delete which leads to a link error in these tests. Currently they are unsupported but I think it would be useful if these tests could run with sanitizers. This patch creates a support header that consolidates the new/delete replacement functionality and checking. When we are using sanitizers new and delete are no longer replaced and the checks always return true. Reviewers: mclow.lists, danalbert, jroelofs, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6562 llvm-svn: 224741
* Move test into test/std subdirectory.Eric Fiselier2014-12-2029-0/+2156
llvm-svn: 224658
OpenPOWER on IntegriCloud