Marshall Clow
6dff618d7d
LWG Issue 2210 (Part #6 ): unordered_map and unordered_multimap
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190576 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 03:00:31 +00:00
Marshall Clow
599e60d2f7
Implement uses-allocator construction
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190571 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 02:11:16 +00:00
Howard Hinnant
f9d2680e19
A collection of minor type-o fixes. The first two aren't testable, but all tests pass with them. I stumbled across them while experimenting with a std::move that checks its argument for non-const. The third corrects a test that is currently failing.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190563 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 00:10:44 +00:00
Marshall Clow
7f9f52e6c6
Adding bad_array_length to libc++
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 01:38:42 +00:00
Marshall Clow
49d596d412
LWG Issue #2210 Part 5 - map/multimap; no, really - the last one was set/multiset. THIS is map/multimap
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190474 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 01:15:47 +00:00
Marshall Clow
24a7e331f1
LWG Issue #2210 Part 4 - map/multimap
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190454 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 00:06:45 +00:00
Marshall Clow
e00f53bcfb
Update synopsis for list/forward_list/deque to match the allocator style of existing comment. No code change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190320 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09 18:19:45 +00:00
Marshall Clow
955f2c88a1
LWG Issue 2210 (Part #2 & #3 ): list and forward_list
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190279 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-08 19:11:51 +00:00
Marshall Clow
ab04aadaf4
LWG Issue 2210 (Part #1 ): deque
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190251 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-07 16:16:19 +00:00
Marshall Clow
62f34be0ba
N3545: Quoted strings
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190032 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 04:48:45 +00:00
Marshall Clow
9e613ca1b3
LWG Issue 2148: Hashing Enums
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189831 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 17:55:32 +00:00
Marshall Clow
1b5f3adcef
Updated the synopsis for weak_ptr<T>::owner_before to match the code. No code changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189812 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 14:37:50 +00:00
Howard Hinnant
01afa5c6e4
Implement N3672, optional<T>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189772 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 20:30:37 +00:00
Howard Hinnant
713f4db2e5
SFINAE out duration converting constructor if the constructor would otherwise cause a ratio compile-time overflow. This fixes LWG 2094.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-31 16:51:56 +00:00
Howard Hinnant
d179407288
is_destructible for function types was mistakenly returning true instead of false. This is true in both C++11 and C++1y, but has been clarified by the post C++11 LWG issue 2049.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189687 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 19:12:42 +00:00
Howard Hinnant
cb0e6b65a8
Xing Xue: Fix type-o. Thanks to C. Bergström for spotting it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189674 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 14:42:39 +00:00
Marshall Clow
09da3c053c
LWG Issue 2128: Implement global cbegin/rbegin/cend/rbegin
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189634 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 01:17:07 +00:00
Howard Hinnant
161a9bf447
Glen: Remove unneeded _LIBCPP_ALWAYS_INLINE.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189626 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 23:50:48 +00:00
Howard Hinnant
5143722d14
Xing Xue: Some minor changes for IBM XLC++/AIX.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189623 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 23:37:50 +00:00
Howard Hinnant
04a2c71d67
Turn off extern templates for most uses. It is causing more problems than it is worth. The extern templates will still be built into the dylib, mainly for ABI stability purposes. And the client can still turn these back on with a #define if desire. This fixes http://llvm.org/bugs/show_bug.cgi?id=17027 . However there's no associated test for the test suite because http://llvm.org/bugs/show_bug.cgi?id=17027 needs mismatched dylib and headers to fire.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189610 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 20:56:53 +00:00
Marshall Clow
08b4f3f99b
LWG Issue 2162: mark allocator_traits::maxsize as noexcept
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189399 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27 20:22:15 +00:00
Marshall Clow
83179a788f
LWG issues 2174/5/6 - mark wstring_convert::converted as noexcept, and make (some of) the constructors for wstring_convert and wbuffer_convert as explicit. Add configuration macro _LIBCPP_EXPLICIT_AFTER_CXX11
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189398 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27 20:18:59 +00:00
Marshall Clow
e42f184a76
Update synopsis in <locale> to match LWG Issue 2229. No code change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27 14:22:13 +00:00
Marshall Clow
af74651f61
Implement LWG issue 2061
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189345 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27 13:03:03 +00:00
Howard Hinnant
e1c5f9ec1b
Apply constexpr to initializer_list for c++1y.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189271 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-26 20:11:32 +00:00
Howard Hinnant
fc3f80badf
G M: Improve support for compilers not supporting defaulted functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189184 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-24 21:31:37 +00:00
Howard Hinnant
5e57142c59
Rename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189140 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23 20:10:18 +00:00
Howard Hinnant
5d5f9f9786
Remove _LIBCPP_DEBUG. This was my first attempt at debug mode for libc++, and is now obsoleted by _LIBCPP_DEBUG2 (which isn't finished).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189135 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23 19:03:36 +00:00
Howard Hinnant
499cea12bb
Debug mode for string. This commit also marks the first time libc++ 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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189114 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23 17:37:05 +00:00
Howard Hinnant
e31c432a33
Glen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189046 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 19:39:03 +00:00
Howard Hinnant
9a894d93de
Zhihao Yuan noted that there were a few unneeded statements. Eliminated 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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189039 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 18:29:50 +00:00
Howard Hinnant
1c44f51de7
Zhihao Yuan noted that a move assignment operation was missing from std::adjacent_difference. Fixed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 18:02:34 +00:00
Howard Hinnant
8a1df3ca0c
David Blaikie suggested this test for detecting constexpr on the error_category default constructor. Additionally I decided to make this constructor trivial as well, as I could not come up with a rationale for not doing so. Fully tested with both current Apple clang and tip-of-trunk clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 17:41:48 +00:00
Marshall Clow
5c316a6d04
LWG 2145 - mark constructor for std::error_category as inline and constexpr. Leave the (existing, out-of-line, non-constexpr) in the dylib for compatibility with existing programs)
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188858 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 02:57:19 +00:00
Howard Hinnant
de8fc6b2b1
Relax complete-type check for functions and function pointers to allow void return type. This bug was exposed by Eli Friedman's commit to clang r188324. Anywhere this version of clang ships, this libc++ fix must follow. However this fix is compatible with previous clangs, and so this libc++ doesn't need to wait for this clang.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188413 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 21:28:31 +00:00
Howard Hinnant
7f76450ee9
Xing Xue: port to IBM XLC++/AIX.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188396 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 18:00:20 +00:00
Marshall Clow
2df3700879
Add a deleted assignment operator for basic_ostream; LWG Issue #2067
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188375 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 15:15:28 +00:00
Marshall Clow
198a2a59ee
Implement LWG Issue #2187 (emplace_back and emplace for vector<bool>)
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188333 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 23:54:12 +00:00
Marshall Clow
5cfc6ab2b8
Second half (map/multimap) of N3657
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188320 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 22:18:47 +00:00
Marshall Clow
4a0a98166c
First half of support for N3657; heterogenous lookups for set/multiset
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188241 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 01:11:06 +00:00
Howard Hinnant
0f678bd69e
Nico Rieck: this patch series fixes visibility issues on Windows as explained in < http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html >.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12 18:38:34 +00:00
Howard Hinnant
80e19ac90f
Add a check for arrays of unknown bounds to is_destructible. This fixes http://llvm.org/bugs/show_bug.cgi?id=16839
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188080 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 16:53:45 +00:00
Howard Hinnant
5ea5d31f6d
Partial implementation of N3665. This paper was not voted into the C++1y draft. However I was looking at it and with some experimentation realized that I could partially implement it, and at the same time offer a performance optimization to cout. I simply added an xsputn override to the cout filebuf. The override does nothing special at all if there is a non-trivial codecvt installed. However if the codecvt returns true for always_noconv(), then this function can dump an entire string to fwrite, instead of doing it a character at a time under overflow(). This just makes sense. I stopped short of a full implementation of N3665 because in order to do so, xsputn would have to allocate a buffer when always_noconv() returned false, and I don't want to go to that expense.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 16:25:43 +00:00
Marshall Clow
051c848e88
N3644 tests for map/multimap/set/multiset. Drive-by NOEXCEPT for __tree_const_iterator constructor. Fix comment typos in other tests
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188019 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 21:52:50 +00:00
Howard Hinnant
a4e87abbb9
My previous reorganization of addressof broke -std=c++03. Thanks much to Arnold Schwaighofer for catching this. This patch also catches a few more missing addressof in <future>, thanks go to Zhihao Yuan for catching these.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 18:38:55 +00:00
Arnold Schwaighofer
a709c823f7
Revert r187927.
...
Zhihao Yuan: Replace operator& with addressof in reference_wrapper constructor.
It breaks a clang bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187959 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 03:06:24 +00:00
Howard Hinnant
d8bfe7ba56
Zhihao Yuan: Replace operator& with addressof in reference_wrapper constructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187927 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:02:42 +00:00
Marshall Clow
193ef03eb5
N3644 support for <unordered_set> and <unordered_map>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 21:30:44 +00:00
Marshall Clow
b92ee614f2
N3644 support for vector<bool>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187911 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:53:44 +00:00
Marshall Clow
0f164c9d75
N3644 support for <string> and <vector>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187909 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:48:48 +00:00
Howard Hinnant
36ba399a33
Correct logic bug in find optimization for vector<bool>. This fixes http://llvm.org/bugs/show_bug.cgi?id=16816
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:42:16 +00:00
Howard Hinnant
ab61b2c9f1
War on tabs
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187906 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 19:39:48 +00:00
Marshall Clow
5a11f94583
Implement NULL iterators for <forward_list> and <deque> re: N3644
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187805 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 16:14:36 +00:00
Marshall Clow
65d2e6a392
Implement NULL iterators for <list> re: N3644
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 21:23:28 +00:00
Howard Hinnant
824c19963e
debug mode for unordered_map. Also picked up a missing check and test in unordered_multimap. This wraps up debug mode for the unordered containers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187659 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 17:50:49 +00:00
Howard Hinnant
8b00e6c960
Ok, 3 major changes for debug mode in one commit:
...
1. I had been detecting and trapping iterator == and \!= among iterators
in different containers as an error. But the trapping itself is actually
an error.
Consider:
#include <iostream>
#include <vector>
#include <algorithm>
template <class C>
void
display(const C& c)
{
std::cout << "{";
bool first = true;
for (const auto& x : c)
{
if (\!first)
std::cout << ", ";
first = false;
std::cout << x;
}
std::cout << "}\n";
}
int
main()
{
typedef std::vector<int> V;
V v1 = {1, 3, 5};
V v2 = {2, 4, 6};
display(v1);
display(v2);
V::iterator i = std::find(v1.begin(), v1.end(), 1);
V::iterator j = std::find(v2.begin(), v2.end(), 2);
if (*i == *j)
i = j; // perfectly legal
// ...
if (i \!= j) // the only way to check
v2.push_back(*i);
display(v1);
display(v2);
}
It is legal to assign an iterator from one container to another of the
same type. This is required to work. One might want to test whether or
not such an assignment had been made. The way one performs such a check
is using the iterator's ==, \!= operator. This is a logical and necessary
function and does not constitute an error.
2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined.
This caused a problem in several of the libc++ tests.
Fixed.
3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that
std::basic_string is inoperable. std::basic_string uses __wrap_iterator
to implement its iterators. __wrap_iterator has been rigged up in debug
mode to support vector. But string hasn't been rigged up yet. This means
that one gets false positives when using std::string in debug mode. I've
upped std::string's priority in www/debug_mode.html.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 00:26:35 +00:00
Howard Hinnant
e9df0a5c6c
Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:17:34 +00:00
Howard Hinnant
56dcf0b809
Taking another swing at correctly optimizing fill_n.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187587 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 17:29:28 +00:00
Howard Hinnant
eb34122153
Constrain fill_n -> memset operations to include implicit convertibility to unsigned char. This fixes http://llvm.org/bugs/show_bug.cgi?id=16764 . Also a drive-by fix on a chrono test suite bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187552 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 00:41:55 +00:00
Marshall Clow
a61e6f8705
Implement constexpr (n3302) and fix operator *= and /=
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187529 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 21:02:34 +00:00
Marshall Clow
0777473911
Backwards!
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187518 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 19:39:37 +00:00
Marshall Clow
832b304076
Implement n3469 - constexpr for chrono
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 19:32:19 +00:00
Howard Hinnant
f890d9bfaa
Debug mode for unordered_multimap. Some mods were done for unordered_map as well to keep all the tests passing. However unordered_map is at the very least still missing tests, if not functionality (if it isn't tested, it probably isn't working).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187446 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 21:04:42 +00:00
Howard Hinnant
0bb0a7c9ea
Debug mode for unordered_multiset. The exercise spotted a few places I had missed on unordered_set, so I picked those up as well.
...
There are actually two debug modes:
1. -D_LIBCPP_DEBUG2 or -D_LIBCPP_DEBUG2=1
This is a relatively expensive debug mode, but very thorough. This is normally what you want to debug with, but may turn O(1) operations into O(N) operations.
2. -D_LIBCPP_DEBUG2=0
This is "debug lite." Only preconditions that can be checked with O(1) expense are checked. For example range checking on an indexing operation. But not iterator validity.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187369 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 19:05:47 +00:00
Marshall Clow
ff46409221
Implement N3421; comparison predicates<void>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 14:21:53 +00:00
Marshall Clow
f182038521
literal suffixes for std::chrono
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187078 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24 21:18:14 +00:00
Howard Hinnant
39213641f4
Debug mode for unordered_set. I believe this to be fairly complete for
...
unordered_set, however it is not complete yet for unordered_multiset,
unordered_map or unordered_multimap. There has been a lot of work done
for these other three containers, however that work was done just to
keep all of the tests passing.
You can try this out with -D_LIBCPP_DEBUG2. You will have to link to a
libc++.dylib that has been compiled with src/debug.cpp. So far, vector
(but not vector<bool>), list, and unordered_set are treated. I hope to
get the other three unordered containers up fairly quickly now that
unordered_set is done.
The flag _LIBCPP_DEBUG2 will eventually be changed to _LIBCPP_DEBUG, but
not today. This is my second effort at getting debug mode going for
libc++, and I'm not quite yet ready to throw all of the work under the
first attempt away.
The basic design is that all of the debug information is kept in a
central database, instead of in the containers. This has been done as
an attempt to have debug mode and non-debug mode be ABI compatible with
each other. There are some circumstances where if you construct a
container in an environment without debug mode and pass it into debug
mode, the checking will get confused and let you know with a readable
error message. Passing containers the other way: from debug mode out to
a non-debugging mode container should be 100% safe (at least that is the
goal).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186991 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 22:01:58 +00:00
Marshall Clow
152343260f
Implement string suffixes from N3642
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186956 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 17:05:24 +00:00
Howard Hinnant
cd59accbf5
Bill Fisher: This patch fixes a bug where std::regex in ECMAScript mode was ignoring capture groups inside lookahead assertions.
...
For example, matching /(?=(a))(a)/ to "a" should yield two captures: \1 = "a", \2 = "a"
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 16:18:04 +00:00
Richard Smith
01fbfc2fa6
Add some missing cv-qualifiers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186909 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 01:24:30 +00:00
Anders Carlsson
b8e0d9086e
Fix a bug in std::fill_n where memset would end up being called in cases when it shouldn’t.
...
Reviewed by Howard.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186875 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-22 21:08:00 +00:00
Marshall Clow
da0a0e8a1b
Make tuple's constructor and std::get<>(tuple) constexpr. Final stage of fixing bug #16599 . Thanks to Howard for the review and updates.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186834 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-22 16:02:19 +00:00
Marshall Clow
8fc4f5a251
Make std::get constexpr
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-17 18:25:36 +00:00
Marshall Clow
206f6cdc33
Bug 16599 part 2: Make std::pair's constructors and comparison operators (and make_pair) constexpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186430 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-16 17:45:44 +00:00
Marshall Clow
01a0e90783
Make std::forward and std::move (and std::move_if_noexcept) constexpr in C++14
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186344 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 20:46:11 +00:00
Howard Hinnant
1e1d05121d
Bill Fisher: This patch fixes an ill-formed comparison when parsing control escapes, e.g. "\cA\ca". The code will now throw an error_escape exception for invalid control sequences like "\c:" or "\c".
...
I've added the test cases to bad_escape.pass.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 18:21:11 +00:00
Marshall Clow
ac93d0ebf2
Add macro _LIBCPP_CONSTEXPR_AFTER_CXX11 for functions that have been marked constexpr post C++11
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186323 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 14:57:19 +00:00
Marshall Clow
e8029e54f1
Implement n3584 - Addressing Tuples by Type
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-13 02:54:05 +00:00
Howard Hinnant
e840208989
Bill Fisher: This patch fixes a less likely case where '\b' can back up into invalid memory, when driven by a regex_iterator (for case 1, see r185273 or http://llvm.org/bugs/show_bug.cgi?id=16240 )
...
The attached test program also supplies a test for the case 1 fix in r185273.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186089 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-11 15:32:55 +00:00
Marshall Clow
809e93f7f2
move __save_flags from <random> to <ios> in preparation for reuse; no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185968 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09 20:34:14 +00:00
Howard Hinnant
7670f7d1ed
Bill Fisher: This patch fixes a bug where regex_iterator doesn't indicate when it's restarting in the middle of a string. This bug causes /^a/ to match in the middle of the string "aaaaaaa", during iteration.
...
My patch uses to communicate when is false.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09 17:29:09 +00:00
Howard Hinnant
171771a9f5
War on tabs.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 21:06:38 +00:00
Marshall Clow
e2735d1df0
Implement n3668 - std::exchange
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185863 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:54:40 +00:00
Marshall Clow
d29bb4b7c4
Implement n3545 for c++14
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185856 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:05:31 +00:00
Howard Hinnant
9b128e06ed
Remove implicit conversion from __value_type to value_type in [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16549
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-05 18:06:00 +00:00
Howard Hinnant
b66e1c3f96
Removed extension in [unordered_][multi]map which allowed one to emplace using just an argument for the key, as opposed to using piecewise_construct. However a bug report exposed that this created an unfortunate ambiguity. People who are currently using the extension will be notified the next time they compile, and will have to change to using piecewise_construct. There are no ABI issues with the removal of this extension. This fixes http://llvm.org/bugs/show_bug.cgi?id=16542
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185666 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 20:59:16 +00:00
Howard Hinnant
e008d4eecc
Simplify comparators of [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16538
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185665 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 19:46:35 +00:00
Marshall Clow
933afa9761
Patch for N3655 (Transformation type traits) with Howard's additions
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185597 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 00:10:01 +00:00
Marshall Clow
42e55e932e
Commit patch for integer sequences. Suggested by Richard, reworked by Howard, and annotated by me
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-03 19:20:30 +00:00
Howard Hinnant
24ae8f8e5b
Matthew Dempsky: Attached patch replaces the type punning with memcpy(), which on
...
x86/x86-64 clang optimizes to direct word accesses anyway. This fixes an unaligned word access in murmurhash/cityhash.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185558 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-03 17:39:28 +00:00
Marshall Clow
fb5511027b
Adorn make_unique with visibility and inline attributes
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185468 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 20:06:09 +00:00
Howard Hinnant
839ae58c2e
Matthew Dempsky: In libc++'s <locale>, there's already dependence on an snprintf_l
...
implementation and all of the char buffers readily have their
allocated size available, so we can easily use snprintf_l instead of
sprintf_l.
This avoids OpenBSD's linker warnings against using sprintf and
vsprintf.
Howard: Please consider a patch for CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 18:42:28 +00:00
Howard Hinnant
6a683bfb5f
Constrain launch ~ operator to defined bits.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 18:01:41 +00:00
Howard Hinnant
dbc8cf059e
Bill Fisher: This patch fixes a bug where the regex parser doesn't advance the pointer after reading the third character of an octal escape (in awk mode).
...
That is, regex{"\141", awk} results in the regular expression /a1/ instead of just /a/.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 17:43:31 +00:00
Marshall Clow
fd7481e96d
Implement n3656 - make_unique. Thanks to Howard for the review and suggestions.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 18:16:03 +00:00
Marshall Clow
7ec46bc422
Implement n3658 - Compile-time integer sequences
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 16:26:55 +00:00
Howard Hinnant
11b87182b0
In istream::ignore, check the delimeter as an int_type, not as a char_type, so as to correctly handle EOF. This fixes http://llvm.org/bugs/show_bug.cgi?id=16427
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185298 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 00:37:50 +00:00
Howard Hinnant
099dec1ba0
The bind and function functor constructors and assignment operators were overly general and getting confused with the copy constructor and copy assignment operators. Constrained them. This fixes http://llvm.org/bugs/show_bug.cgi?id=16385
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 00:01:51 +00:00
Howard Hinnant
c05e98660f
Fix bind by making _is_valid_bind_return more robust. It should return false instead of give a compile time error, always. The problem was down in ____mu_return, the version that handles nested bind objects. This fixes http://llvm.org/bugs/show_bug.cgi?id=16343
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185289 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-30 19:48:15 +00:00
Howard Hinnant
a9602d56de
Prevent '\b' from backing up into invalid memory. Fixes http://llvm.org/bugs/show_bug.cgi?id=16240 . Sorry, I can not think of a good test case for this one, except by running valgrind as reported in the bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185273 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-29 23:45:43 +00:00
Howard Hinnant
f491e51ebd
Add operators to make launch a bitmask type. Searched all of the standard, and libc++ to see if this error occurred elsewhere and didn't see any other place. This fixes http://llvm.org/bugs/show_bug.cgi?id=16207
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185265 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-29 18:38:17 +00:00
Howard Hinnant
ab135d7f4e
Make cout a little more thread-safe. This fixes http://llvm.org/bugs/show_bug.cgi?id=12158
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185222 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 21:40:28 +00:00
Howard Hinnant
c1ecd97f00
Provide missing '{' in parsing extended quoted characters. This fixes http://llvm.org/bugs/show_bug.cgi?id=16135
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185211 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 20:31:05 +00:00
Howard Hinnant
e57b7c445b
William Fisher: A bug in __lookahead::exec causes /(?=^)b/ to match ab. When makes a recursive call to , it passes true for the value of . This causes a beginning-of-line anchor (^) inside a lookahead assertion to match anywhere in the text. This fixes http://llvm.org/bugs/show_bug.cgi?id=11118
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185196 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 19:11:23 +00:00
Howard Hinnant
918f2a80ab
Bill Fisher: Fix for failing to throw an exception in regex when parsing an invalid escape sequence. This fixes http://llvm.org/bugs/show_bug.cgi?id=16023
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 18:57:30 +00:00
Howard Hinnant
b9d9fb4a17
Dimitry Andric: Add const to constexpr member functions in order to cope with new C++1y language rules. This silences -Wconstexpr-not-const warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185181 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 18:09:35 +00:00
Howard Hinnant
9dcdcdee25
Implement full support for non-pointer pointers in custom allocators for string. This completes the custom pointer support for the entire library.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185167 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 16:59:19 +00:00
Howard Hinnant
2c39cbe020
Implement full support for non-pointer pointers in custom allocators for vector.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27 19:35:32 +00:00
Howard Hinnant
29f7432ff3
Implement full support for non-pointer pointers in custom allocators for list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 16:08:47 +00:00
Howard Hinnant
81381a932f
Implement full support for non-pointer pointers in custom allocators for forward_list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184759 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 17:17:28 +00:00
Dmitri Gribenko
c7a39cf584
Fix typo in assertion message. Reported by Shriramana Sharma.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184691 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 06:15:57 +00:00
Howard Hinnant
fcd8db7133
Implement full support for non-pointer pointers in custom allocators for deque.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184673 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-23 21:17:24 +00:00
Howard Hinnant
7a6b7cedcb
Implement full support for non-pointer types in custom allocators. This is for the unordered containers only. This work still needs to be done on the sequence containers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184635 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-22 15:21:29 +00:00
Howard Hinnant
70342b99e2
Implement full support for non-pointer types in custom allocators. This is for the associative containers only. This work still needs to be done on the unordered and sequence containers. Fixes http://llvm.org/bugs/show_bug.cgi?id=15978
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184358 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:29:40 +00:00
Howard Hinnant
9360e9f944
Minor bug fix for allowing an extension of const-qualified types in containers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@183481 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 01:56:37 +00:00
Howard Hinnant
ddb4e4cbb1
Neglected to remove a debugging comment from last commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182422 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 21:19:35 +00:00
Howard Hinnant
8f72d5ce16
Fix a couple of bugs in linear_congruential_engine::seed. Regression test added.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182421 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 21:05:12 +00:00
Joerg Sonnenberger
a71a952634
Add NetBSD support.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 21:17:34 +00:00
Howard Hinnant
9e98b34a8c
Glen: This patch gets the string conversion functions working on Windows. It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 17:13:40 +00:00
Howard Hinnant
6287c65a03
Remove cv qualifiers from member pointers in the __member_pointer_traits test. This was causing a const-qualified bind result to malfunction. This was a recent regression due to the new use of __member_pointer_traits in restricting the __invokable and __invoke_of tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181935 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 21:49:27 +00:00
David Blaikie
e27e907403
Fixing the MSan/compiler-rt build
...
Patch by Evgieniy Stepanov, review by İsmail Dönmez.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-13 21:53:44 +00:00
Howard Hinnant
b3585e8226
İsmail Dönmez: Enable quick_exit on linux.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181612 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 17:36:59 +00:00
Marshall Clow
9f8f524541
Fix incorrect type usage; nice catch by Sebastian
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 00:16:10 +00:00
Marshall Clow
b30abdd07a
Implement n3607: 'equal', 'mismatch', and 'is_permutation'
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 21:14:23 +00:00
Howard Hinnant
a7f5c1bcd8
Put a 1-character unget buffer into cin. This fixes http://llvm.org/bugs/show_bug.cgi?id=15867
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181470 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 21:18:42 +00:00
Howard Hinnant
ecc9742f27
Constrain __invoke functions more accurately. This fixes http://llvm.org/bugs/show_bug.cgi?id=15861 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 23:40:12 +00:00
Howard Hinnant
5f1286f574
Introduce _LIBCPP_STD_VER. This can be set by the client (or the clang driver). Or it will be defaulted. The default is 11 if -std= c++11 or eariler, else it will default to the current year modulo the century. We anticipate it defaulting to 14 for C++14 when the time comes. For now, post-C++11 libcxx implementations should protect themselves with #if _LIBCPP_STD_VER > 11.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181347 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 20:16:13 +00:00
Howard Hinnant
8c23819220
Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181217 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 16:58:36 +00:00
Howard Hinnant
74f4da7219
Stephan Tolksdorf: fixes the issue in the <atomic> header and adds corresponding tests. I've used macros to fall back to a user-provided default constructor if _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS (though I suspect that there won't be many users defining that macro).
...
The tests use placement new to check that atomic values get properly zero-initialized. I had to modify the atomic_is_lock_free test, because default initialization of an object of const type 'const A' (aka 'const atomic<int>') requires a user-provided default constructor.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 20:18:43 +00:00
Howard Hinnant
15467189c3
This patch introduces an alternative layout for basic_string which when the string is short, the data pointer will be word-aligned. It can be activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT. These two different layouts (the default and _LIBCPP_ALTERNATE_STRING_LAYOUT) are not ABI compatible with each other. Once one is chosen for a given platform, it is disruptive to change it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180811 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 21:44:48 +00:00
Joerg Sonnenberger
155f06018e
Use protected version of the malloc attribute in case source wants to
...
define malloc as macro.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180727 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29 19:52:08 +00:00
Joerg Sonnenberger
a9b94f1337
GCC doesn't support __has_attribute.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180683 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 20:51:42 +00:00
Howard Hinnant
05e7d24b3d
default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24 19:44:26 +00:00
Howard Hinnant
08dd25303e
Modest performance improvement for std::string's operator==.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22 23:55:13 +00:00
Howard Hinnant
5544f7e0c7
Somehow aligned_union got dropped through the cracks. This adds it. Did a drive-by fix of alignment_of while I was in the neighborhood.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22 19:37:49 +00:00
Howard Hinnant
b4e67cfd42
After years of telling people: 'If you ever find any of my code that self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179760 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18 15:02:57 +00:00
Howard Hinnant
4313ec3975
addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179608 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16 17:27:56 +00:00
Howard Hinnant
ae57a1ab1d
Numeric parsing was getting the wrong answer when faced with very long inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-15 20:40:06 +00:00
Howard Hinnant
993248935c
Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179467 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-14 00:01:13 +00:00
Howard Hinnant
4f67100219
Set failbit when strtold sets errno to ERANGE when parsing floating point values.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13 18:19:25 +00:00
Howard Hinnant
a5733b3ad3
Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179408 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 20:22:57 +00:00
Howard Hinnant
0795931dee
Change <cwchar> and <cstring> to look out for flags which may or may not be set by the C headers <wchar.h> and <string.h> indicating C support for the C++-altered wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr, strchr, strpbrk, strrchr, memchr, and strstr. This was already done in <cstring> for other platforms using other flags, so just had to add one more flag to the list there.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179041 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 18:59:28 +00:00
Howard Hinnant
6dcaf3ee1a
Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 17:58:52 +00:00
Howard Hinnant
79a35570a5
More work on debug mode for list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 00:18:49 +00:00
Howard Hinnant
128f7bf4fa
Somehow search_n never got tested, so of course it had a bug in it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15667 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04 15:40:48 +00:00
Howard Hinnant
c5e8961a35
Fix stupid but harmless type-o. Fixes http://llvm.org/bugs/show_bug.cgi?id=15657 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178691 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 20:29:45 +00:00
Howard Hinnant
4aa8b06e67
The move / swap members were not correctly taking all of the possible states of the basic_stringbuf into account. Just rewrote these members. Test included. This fixes http://llvm.org/bugs/show_bug.cgi?id=15659 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178690 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 20:21:29 +00:00
Howard Hinnant
cf31d3864e
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 22:14:51 +00:00
Howard Hinnant
11a50ac497
Richard Smith: It was pointed out to me off-list that libc++'s non-compiler-builtin
...
implementation of std::is_polymorphic does this:
template <class _Tp> struct __is_polymorphic1 : public _Tp {};
... and that g++ rejects this if _Tp has an inaccessible virtual destructor
(because __is_polymorphic1<_Tp> would have a deleted virtual destructor
overriding _Tp's non-deleted destructor). Clang was failing to reject this;
I've fixed that in r178563, but that causes libc++'s corresponding test
case to fail with both clang and gcc when using the fallback
implementation. The fallback code also incorrectly rejects final types.
The attached patch fixes the fallback implementation of is_polymorphic; we
now use dynamic_cast's detection of polymorphic class types rather than
trying to determine if adding a virtual function makes the type larger:
enable_if<sizeof((_Tp*)dynamic_cast<const volatile
void*>(declval<_Tp*>())) != 0, ...>
Two things of note here:
* the (_Tp*) cast is necessary to work around bugs in Clang and g++ where
we otherwise don't instantiate the dynamic_cast (filed as PR15656)
* the 'const volatile' is here to treat is_polymorphic<cv T> as true for a
polymorphic class type T -- my reading of the standard suggests this is
incorrect, but it matches our builtin __is_polymorphic and gcc
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178576 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 21:25:06 +00:00
Howard Hinnant
fc2f021bdd
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29 18:27:28 +00:00
Howard Hinnant
742fecbd2a
Second try at r178075. The llvm breakage has been fixed by r178240.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178253 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 17:44:32 +00:00
Howard Hinnant
2c0d3edf68
Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 15:00:04 +00:00
Daniel Dunbar
34d36f39b0
Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVM
...
bootstrap with libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178116 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 04:10:25 +00:00
Howard Hinnant
32d40f5f44
Tighten up the iterator requirements for the vector member templates. This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178075 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 21:40:54 +00:00
Howard Hinnant
02d5e18917
Another vector debug mode test, and a static test on Allocator::value_type. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 19:04:56 +00:00
Howard Hinnant
d9cdb2dcfd
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178016 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 13:48:57 +00:00
Howard Hinnant
782da33d1c
Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end().
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 22:12:26 +00:00
Howard Hinnant
f5f4684e71
Debug mode: learning to crawl. I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 19:29:35 +00:00
Marshall Clow
9b145da078
Fix buffer read overflow in money_get::do_get(). Found by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177694 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 02:14:40 +00:00
Marshall Clow
04bd79b23a
Fix undefined behavior in syntax_option_type::operator~ and match_flag_type::operator./a.out Found by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177693 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 02:13:55 +00:00
Howard Hinnant
903439f735
This is an optimization which produces improved launching time. There should be no functionality change. Clients should see no ABI differences.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 21:34:48 +00:00
Marshall Clow
53e2763966
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 19:34:07 +00:00
Marshall Clow
dab9b2eb32
Removed raw references to _MSC_VER; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177304 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 18:20:48 +00:00
Marshall Clow
dece7fe670
Removed raw references to __APPLE__; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +00:00
Marshall Clow
a22d2addb1
Removed raw references to _WIN32; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
c789025a5a
This SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin. Added. I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin. The current testsuite setup does not have a way a good way to test std::cin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176822 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 19:53:48 +00:00
Howard Hinnant
6319f1462d
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 19:06:24 +00:00
Howard Hinnant
23fb972520
Albert Wong: definition for regex_traits<_CharT>::__regex_word.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176640 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 19:38:08 +00:00
Howard Hinnant
707f318787
Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__(default) when available. This change makes just the type_info visible so that types like vectors and strings can be used as exception objects across dylib boundaries even when hidden visibility is specified globally (at the command line), and yet this allows clients to hide the member functions of things like vector and string (with global visibility commands).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176639 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 19:25:03 +00:00
Howard Hinnant
83eade6abb
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 23:30:19 +00:00
Howard Hinnant
cc7bdae931
Have basic_istream::read call sgetn intead of sbumpc individual characters. This addresses http://llvm.org/bugs/show_bug.cgi?id=15427 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 19:27:56 +00:00
Howard Hinnant
3101474720
Correct silly type-o. Thanks Richard.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176568 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 18:16:12 +00:00
Howard Hinnant
11a31d0583
The bitset(unsigned long long) constructor was broken by the constexpr additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 17:30:26 +00:00
Howard Hinnant
4a0e74fff8
Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-25 15:50:36 +00:00
Howard Hinnant
0560f786fe
Constrain bind operator()() to not exist if the call is not valid. Fixes http://llvm.org/bugs/show_bug.cgi?id=15295 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 18:16:55 +00:00
Marshall Clow
5920cfc403
Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174669 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 22:12:02 +00:00
Howard Hinnant
635bbbb6d1
Revert accidental check-in. These changes are probably good, but premature at this point.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174625 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 15:31:44 +00:00
Howard Hinnant
46c49d19aa
Michael van der Westhuizen: The attached patch add support for building against libc++abi and libcxxrt to CMake builds of libc++.
...
Usage (with the appropriate CC and CXX environment variables) is:
$ cmake -DLIBCXX_CXX_ABI=libcxxabi '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include' ../libcxx
and:
$ cmake -DLIBCXX_CXX_ABI=libcxxrt '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src' ../libcxx
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174623 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 15:27:39 +00:00
Howard Hinnant
b73568dc24
Marcin Zalewski: Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174544 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 21:03:39 +00:00
Howard Hinnant
54e2fff2e1
Saleem Abdulrasool: If errno is defined as volatile int, the qualifier differences can cause
...
template typename deductions on swap<> (used in string.cpp). Use
decltype(errno) to replicate the type and qualifier information for holding the
errno value. Because errno is expected to be assignable, there is no need to
use typename std::remove_const<decltype(errno)>::type to hold the value.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173172 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 17:26:08 +00:00
Howard Hinnant
7b9d6a8d40
Implement the ATOMIC_*_LOCK_FREE macros.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21 20:39:41 +00:00
Howard Hinnant
78f0de22db
Donated anonymously: This enables GCC 4.8.0 to build libc++.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21 17:26:55 +00:00
Howard Hinnant
0b93963db7
Optimize basic_ostream::write by having it call sputn instead of sputc.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-15 17:22:03 +00:00
Howard Hinnant
b05a55675f
Make <cmath> classification macros work with integral types.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:56:22 +00:00
Howard Hinnant
1b031c947f
Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:01:24 +00:00
Howard Hinnant
750039f50c
Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:07:27 +00:00
Howard Hinnant
f619e230cc
Fix exception safety bug in vector::push_back
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:36:59 +00:00
Howard Hinnant
6ae47055f9
atomic_bool was missing (just a typedef to atomic<bool>).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:58:50 +00:00
Howard Hinnant
352bd3a273
Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171321 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 20:09:48 +00:00
Chandler Carruth
ed9f69d342
Don't mark variadic functions as always inline -- they cannot in fact be
...
inlined.
Patch by Saleem Abdulrasool, reviewed by Michael Spencer and Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171276 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 06:09:54 +00:00
Howard Hinnant
d1a7479763
Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171232 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-29 17:45:42 +00:00
Howard Hinnant
ee717d8c44
Hyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm.org/bugs/show_bug.cgi?id=14670 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170703 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 15:40:28 +00:00
Richard Smith
b2f2b68143
Implement std::is_base_of for the case where we don't have a compiler
...
intrinsic. This relies upon the fact that overload resolution does not check
access and ambiguity for a derived-to-base conversion. This passes all
is_base_of tests in the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170662 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 04:20:28 +00:00
Marshall Clow
a46482e8bb
Added static_assert to std::get<N>(std::array) calls to catch "out of bounds" calls
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170435 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 16:46:30 +00:00
Howard Hinnant
0a69fa14d2
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12 21:14:28 +00:00
Richard Smith
53008d8b0c
Remove 'noreturn' attribute from friend declaration. This attribute will be
...
inherited from the previous out-of-class declaration, and attributes on friend
function declarations are ill-formed in C++11.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168853 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 04:30:50 +00:00
Howard Hinnant
8a9c5ea750
Dimitry Andric: When using libc++ headers on FreeBSD, in combination with -std=c++98,
...
-ansi or -std=c++03, the long long type is not supported. So in this
case, several functions and types, like lldiv_t, strtoll(), are not
declared.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168610 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-26 21:18:17 +00:00
Howard Hinnant
984f10fdc0
istreambuf_iterator increment should call sbumpc instead of snextc. Patch
...
by Kimball Thurston. This fixes http://llvm.org/bugs/show_bug.cgi?id=14358 .
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168209 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 22:17:23 +00:00
Howard Hinnant
537b2fa6b8
Restrict optimized __pad_and_output implementation detail to desired releases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167980 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 21:17:15 +00:00
Howard Hinnant
0919dbaab3
Dimitry Andric: Silence some miscellaneous warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167493 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:55:44 +00:00