| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Windows is greedy and it defines the identifier `__out` as a macro.
This patch renames all conflicting libc++ identifiers in order
to correctly work on Windows.
llvm-svn: 291345
|
|
|
|
| |
llvm-svn: 290654
|
|
|
|
| |
llvm-svn: 290459
|
|
|
|
|
|
|
|
|
| |
The macro _LIBCPP_UNROLL_LOOPS isn't used anywhere
so the code was dead.
Differential Revision: https://reviews.llvm.org/D26991
llvm-svn: 288143
|
|
|
|
|
|
| |
last week in Issaquah
llvm-svn: 286858
|
|
|
|
|
|
|
|
| |
This patch implements the std::sample function added to C++17 from LFTS. It
also removes the std::experimental::sample implementation which now forwards
to std::sample.
llvm-svn: 279948
|
|
|
|
| |
llvm-svn: 279731
|
|
|
|
| |
llvm-svn: 276751
|
|
|
|
| |
llvm-svn: 276059
|
|
|
|
| |
llvm-svn: 267079
|
|
|
|
| |
llvm-svn: 265363
|
|
|
|
| |
llvm-svn: 262928
|
|
|
|
|
|
| |
values' for C++17
llvm-svn: 262871
|
|
|
|
|
|
| |
strong exception safety guarantee'. This turned out to be a pervasive problem in <string>, which required a fair amount of rework. Add in an optimization for when iterators provide noexcept increment/comparison/assignment/dereference (which covers many of the iterators in libc++). Reviewed as http://reviews.llvm.org/D15862
llvm-svn: 257682
|
|
|
|
|
|
| |
swap directly. No real change.
llvm-svn: 251836
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Throughout the libc++ headers, there are a few instances where
_VSTD::move() is used to return a local variable. Howard commented in
r189039 that these were there "for non-obvious reasons such as to help
things limp along in C++03 language mode".
However, when compiling these headers with warnings on, and in C++11 or
higher mode (like we do in FreeBSD), they cause the following complaints
about pessimizing moves:
In file included from tests.cpp:26:
In file included from tests.hpp:29:
/usr/include/c++/v1/map:1368:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
return _VSTD::move(__h); // explicitly moved for C++03
^
/usr/include/c++/v1/__config:368:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
Attempt to fix this by adding a _LIBCPP_EXPLICIT_MOVE() macro to
__config, which gets defined to _VSTD::move for pre-C++11, and to
nothing for C++11 and later.
I am not completely satisfied with the macro name (I also considered
_LIBCPP_COMPAT_MOVE and some other variants), so suggestions are
welcome. :)
Reviewers: mclow.lists, howard.hinnant, EricWF
Subscribers: arthur.j.odwyer, cfe-commits
Differential Revision: http://reviews.llvm.org/D11394
llvm-svn: 245421
|
|
|
|
|
|
| |
that might give wrong answers on a 1's complement machine.
llvm-svn: 243674
|
|
|
|
|
|
| |
and the suggested fix.
llvm-svn: 243530
|
|
|
|
| |
llvm-svn: 238831
|
|
|
|
| |
llvm-svn: 236952
|
|
|
|
|
|
| |
in the initializer_list
llvm-svn: 228839
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The requirement on the `Size` type passed to *_n algorithms is that it is convertible to an integral type. This means we can't use a variable of type `Size` directly. Instead we need to convert it to an integral type first. The problem is finding out what integral type to convert it to. `__convert_to_integral` figures out what integral type to convert it to and performs the conversion, It also promotes the resulting integral type so that it is at least as big as an integer. `__convert_to_integral` also has a special case for converting enums. This should only work on non-scoped enumerations because it does not apply an explicit conversion from the enum to its underlying type.
Reviewers: chandlerc, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7449
llvm-svn: 228704
|
|
|
|
| |
llvm-svn: 228344
|
|
|
|
|
|
| |
of the sequence twice.
llvm-svn: 227824
|
|
|
|
|
|
| |
optimization; if either half of the merge was small (i.e, less than 9 items), it did an inplace merge rather than allocating a buffer and doing a faster/smarter merge. However, this failed to satisfy the complexity requirements in the standard. Remove that code. Add tests to check the complexity, and add the same tests for std::merge, since we are in that section of the test suite anyway.
llvm-svn: 227811
|
|
|
|
|
|
| |
complexity guidelines mandated by the standard. References PR22427
llvm-svn: 227808
|
|
|
|
|
|
|
|
|
| |
test iterators.
The comma operators in the test iterators give better error messages when they
are deleted as opposed to not defined. Delete these functions when possible.
llvm-svn: 220715
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
An evil user might overload operator comma. Use a void cast to make sure any user overload is not selected.
Modify all the test iterators to define operator comma.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5929
llvm-svn: 220706
|
|
|
|
| |
llvm-svn: 217903
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
external include guards.
Things done in this patch:
1. Make __debug include __config since it uses macros from it.
2. The current method of defining _LIBCPP_ASSERT is prone to redefinitions. Move
the null _LIBCPP_ASSERT definition into the __debug header to prevent this.
3. Remove external <__debug> include gaurds. <__debug> guards almost all of its
contents internally. There is no reason to be doing it externally.
This patch should not change any functionality.
llvm-svn: 215332
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 213615
|
|
|
|
|
|
| |
of refacoring in algorithm as well. Give them better names while we're at it. All of these are internal rotines; no visible functionality change.
llvm-svn: 210561
|
|
|
|
|
|
| |
<algorithm>. Since we don't actually do anything when a call is deprecated, there is no functionality change. Maybe someday, we'll decide to warn when using a deprecated function.
llvm-svn: 202672
|
|
|
|
| |
llvm-svn: 201697
|
|
|
|
| |
llvm-svn: 190837
|
|
|
|
| |
llvm-svn: 189140
|
|
|
|
|
|
| |
debug-mode has found a bug (found one in regex). Had to play with extern templates a bit to get this to work since string is heavily used within libc++.dylib.
llvm-svn: 189114
|
|
|
|
|
|
| |
the unnecessary ones, and commented the ones that are there for non-obvious reasons such as to help things limp along in C++03 language mode.
llvm-svn: 189039
|
|
|
|
| |
llvm-svn: 188396
|
|
|
|
|
|
| |
explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>.
llvm-svn: 188192
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
these macros should not be used interchangeably.
This patch divides all Windows-related bits into the aforementioned
categories. Two new macros are introduced:
- _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
_MSC_VER, excluding Clang.
- _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
when _WIN32 is defined.
This leaves _WIN32 for code using the Windows API.
This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.
Nico, please prepare a patch for CREDITS.TXT, thanks.
llvm-svn: 187593
|
|
|
|
| |
llvm-svn: 187587
|
|
|
|
|
|
| |
unsigned char. This fixes http://llvm.org/bugs/show_bug.cgi?id=16764. Also a drive-by fix on a chrono test suite bug.
llvm-svn: 187552
|
|
|
|
|
|
|
|
| |
when it shouldn’t.
Reviewed by Howard.
llvm-svn: 186875
|
|
|
|
| |
llvm-svn: 181569
|
|
|
|
| |
llvm-svn: 181548
|
|
|
|
|
|
| |
fixes http://llvm.org/bugs/show_bug.cgi?id=15667.
llvm-svn: 178764
|
|
|
|
|
|
| |
truncation warnings on Linux
llvm-svn: 174669
|
|
|
|
|
|
| |
from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.
llvm-svn: 174544
|
|
|
|
|
|
| |
intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
llvm-svn: 167486
|