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
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
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
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
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
ff9267709d
Provide a way to disable use of extern templates in libc++. This is 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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167486 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:08:48 +00:00
Argyrios Kyrtzidis
1dc6f7ab97
Don't neglect to "return *this".
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165860 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-13 02:03:45 +00:00
Howard Hinnant
4ae952ab9a
Consistently label __bit_array as a struct, not a class.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17 17:10:18 +00:00
Howard Hinnant
a58402abb9
Change emplace for vector and deque to create the temporary (when necessary) before any changes to the container are made. Nikolay Ivchenkov deserves the credit for pushing this problem and the solution for it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-08 23:23:04 +00:00
Howard Hinnant
f867f6326b
SFINAE __bit_iterator such that it will only get instantiated with a container that has the nested type __storage_type. This prevents accidental instantiation such as in http://llvm.org/bugs/show_bug.cgi?id=12755 . This fixes http://llvm.org/bugs/show_bug.cgi?id=12755 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@156308 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-07 16:50:38 +00:00
Howard Hinnant
0438ea241e
vector::emplace_back was mistakenly requiring move assignable. Fixed that and did a little drive-by optimization at the same time. This fixes http://llvm.org/bugs/show_bug.cgi?id=12085 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 15:30:12 +00:00
Howard Hinnant
b0bfd9bdd6
Implement a few optimizations for vector push_back and insert. Fixes r10828365.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150542 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 00:41:34 +00:00
Howard Hinnant
ec3773c2da
Quash a whole bunch of warnings
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01 20:21:04 +00:00
Howard Hinnant
9996844df0
Further macro protection by replacing _[A-Z] with _[A-Z]p
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145410 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-29 18:15:50 +00:00
Howard Hinnant
66c6f9733b
Add protection from min/max macros
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145407 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-29 16:45:27 +00:00
Howard Hinnant
78b6828f14
More windows port work by Ruben Van Boxem
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142732 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-22 20:59:45 +00:00
Howard Hinnant
08e17472e4
Windows support by Ruben Van Boxem.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142235 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 20:05:10 +00:00
Howard Hinnant
e6125bdeae
Chris Jefferson noted that vector iterator ownership can be transferred from source to target under move construction and move assignment. This commit makes that happen for debug mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140023 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 16:34:29 +00:00
Howard Hinnant
0442b12591
The vector test suite now passes for no-debug, debug-lite and debug-regular
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139930 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-16 18:41:29 +00:00
Howard Hinnant
abe2628b43
Create multilevel debug mode
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139913 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-16 17:29:17 +00:00
Howard Hinnant
7a563db09a
Initial checkin for debug mode (version 2)
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139711 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14 18:33:51 +00:00
Howard Hinnant
9cbee430da
Fix const correctness bug in __move_assign. Found and fixed by Ion Gaztañaga.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139032 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-02 20:42:31 +00:00
Howard Hinnant
e3e3291f3a
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@137522 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 21:56:02 +00:00
Sean Hunt
110b8bf57e
Explicitly invoke the size_type specialization of max and min. This
...
avoids bugs where, when the allocator's size_type was smaller than int,
the multiplication or division would cause integral promotions and, with
two different integer types as arguments, deduction of the template
arguments would fail.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@136540 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 23:31:58 +00:00
Howard Hinnant
2bf1c08510
Make vector<bool>::reference and const_reference public
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134815 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 15:50:42 +00:00
Howard Hinnant
f03c3b4612
http://llvm.org/bugs/show_bug.cgi?id=10248
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134327 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 20:33:23 +00:00
Howard Hinnant
0949eedbd6
_STD -> _VSTD to avoid macro clash on windows
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30 21:18:19 +00:00
Howard Hinnant
d1d27a4afa
noexcept for <vector>. This also includes installing move_if_noexcept() into vector.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132577 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 19:40:40 +00:00
Howard Hinnant
6cf5d8c3aa
Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@125510 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 19:12:38 +00:00
Howard Hinnant
04240d90ef
Reverting an old optimization that conflicts with the new allocator model, and causes some test casees to compile that shouldn't.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@122830 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-04 19:53:31 +00:00
Howard Hinnant
2d72b1e393
Effort to reduce the number of exported symbols
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@122057 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 14:46:43 +00:00
Howard Hinnant
1468b668aa
N3142. Many of these traits are just placeholders with medium quality emulation; waiting on compiler intrinsics to do it right.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119854 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-19 22:17:28 +00:00
Howard Hinnant
b64f8b07c1
license change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 22:09:02 +00:00
Howard Hinnant
ee6ccd0e32
visibility-decoration sweep completed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23 18:58:28 +00:00
Howard Hinnant
36cdf027d2
I am experimenting with putting visibility-default attributes on all struct/classes in libc++. This checkin decorates only basic_string and vector as an experiment, and for review by those in this audience that might know more about visibilty than I do. If I get no negative feedback on this procedure I will begin to decorate the entire library in this way.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113590 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 16:42:26 +00:00
Howard Hinnant
73d21a4f07
Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-04 23:28:19 +00:00
Howard Hinnant
324bb03bb9
Fixing whitespace problems
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-22 00:02:43 +00:00
Howard Hinnant
adff4895b2
patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@104516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-24 17:49:41 +00:00
Howard Hinnant
f5256e16df
Wiped out some non-ascii characters that snuck into the copyright.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 21:36:01 +00:00
Howard Hinnant
bc8d3f97eb
libcxx initial import
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 19:42:16 +00:00