Add checking for the complexity guarantees in the standard

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212017 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a typo in the noexcept calculation for __compressed_pair::swap. Thanks to EricWF for the bug report and the fix.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212046 91177308-0d34-0410-b5e6-96231b3b80d8
Fix libc++ bug #20039: 'Constructing std::function from empty compatible std::function results in half-empty state' Thanks to Agustin Berge for the report, and for his and Eric Fiselier's work on a fix.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212070 91177308-0d34-0410-b5e6-96231b3b80d8
Minor cleanup for string_view; mostly from suggestions by Richard Smith. Also, make the tests pass under c++03

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212185 91177308-0d34-0410-b5e6-96231b3b80d8
Fix some failing tests for the standard containers. The tests were failing in 32-bit mode because they assumed that std::size_type and make_unsigned<ptrdiff_t>::type were always the same type. No change to libc++, just the tests.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212538 91177308-0d34-0410-b5e6-96231b3b80d8
string_view enhancements. Move to the correct namespace. Better constexpr support (thanks to Richard for the suggestions). Update the tests to match this. Add <experimental/__config for experimental macros/etc to live.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212569 91177308-0d34-0410-b5e6-96231b3b80d8
Add a reset method to the counting predicates in the test suite

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212651 91177308-0d34-0410-b5e6-96231b3b80d8
Fix warning in test - missing exception specifier for overload of operator new

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212723 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for BIONIC C library (Android). Patch from Dan Albert

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212724 91177308-0d34-0410-b5e6-96231b3b80d8
Support the built-in type-trait support in gcc 4.7 and later. Thanks to Albert Wong for the patch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212727 91177308-0d34-0410-b5e6-96231b3b80d8
Change Windows decoration on some base classes

Mark the base classes for time_get_byname and time_get as _LIBCPP_TYPE_VIS_ONLY
rather than _LIBCPP_TYPE_VIS.  These base classes are templated types and cannot
be stored with export dll storage.

Fixes compilation with _LIBCPP_DLL for Windows when the time_get and
time_get_byname classes are used.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213116 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly implement LWG 2049; std::is_destructible.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213163 91177308-0d34-0410-b5e6-96231b3b80d8
Test commit: whitespace change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213222 91177308-0d34-0410-b5e6-96231b3b80d8
Test commit: Reverting whitespace changes

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213223 91177308-0d34-0410-b5e6-96231b3b80d8
Change _LIBCXX_CONSTEXPR_AFTER_CXX11 to check for c++14 constexpr rules

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213225 91177308-0d34-0410-b5e6-96231b3b80d8
[libcxx] Add <experimental/utility> header for LFTS. 

Summary:
This patch adds the `<experimental/utility>` header as specified in the latest draft of the library fundamentals TS.

`<experimental/utility>` only contains `class erased_type`. 

This patch also updates the documentation to list the `erased_type` class as "initial implementation complete".

Test Plan:
Three test cases where added:

1. Test that `_LIBCPP_VERSION` is defined.
2. Test that `<utility>` has been included.
3. Test that `erased_type` is in the correct namespace and is constexpr default constructible.

Reviewers: mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213226 91177308-0d34-0410-b5e6-96231b3b80d8
Fix bug #20335 - memory leak when move-constructing a string with unequal allocator. Thanks to Thomas Koeppe for the report

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213269 91177308-0d34-0410-b5e6-96231b3b80d8
In response to bug #20362, change the order of operations in vector move assignment so that if the allocator move assignment throws, we aren't left with two objects pointing at the same memory. This is not a complete fix; I am unconvinced that a complete fix is possible. With this change in place, we will leak the old contents of the vector. LWG issue #2106, when adopted, will make this problem illegal. Thanks to Thomas Koeppe for the report and analysis.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213546 91177308-0d34-0410-b5e6-96231b3b80d8
make the same change as in 213546 for vector<bool>

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213547 91177308-0d34-0410-b5e6-96231b3b80d8
Fix std::make_heap's worst case time complexity

std::make_heap is currently implemented by iteratively applying a
siftup-type algorithm.  Since sift-up is O(ln n), this gives
std::make_heap a worst case time complexity of O(n ln n).

The C++ standard mandates that std::make_heap make no more than O(3n)
comparisons, this makes our std::make_heap out of spec.

Fix this by introducing an implementation of __sift_down and switch
std::make_heap to create the heap using it.
This gives std::make_heap linear time complexity in the worst case.

This fixes PR20161.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213615 91177308-0d34-0410-b5e6-96231b3b80d8