summaryrefslogtreecommitdiffstats
path: root/libcxx/include/iterator
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove several unused forward declarations. Fixes PR22605.Marshall Clow2015-02-181-3/+1
| | | | llvm-svn: 229728
* Change some template parameter names from _C and _N to _Cont and _Sz. No ↵Marshall Clow2015-02-111-14/+14
| | | | | | functionality change. llvm-svn: 228843
* [libcxx] Make __wrap_iter work with gcc.Nico Weber2015-01-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | he following snippet doesn't build when using gcc and libc++: #include <string> void f(const std::string& s) { s.begin(); } #include <vector> void AppendTo(const std::vector<char>& v) { v.begin(); } The problem is that __wrap_iter has a private constructor. It lists vector<> and basic_string<> as friends, but gcc seems to ignore this for vector<> for some reason. Declaring vector before the friend declaration in __wrap_iter is enough to work around this problem, so do that. With this patch, I'm able to build chromium/android with libc++. Without it, two translation units fail to build. (iosfwd already provides a forward declaration of basic_string.) As far as I can tell, this is due to a gcc bug, which I filed as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64816. Fixes PR22355. http://reviews.llvm.org/D7201 llvm-svn: 227226
* Implement N4280 - 'Non-member size() and more'Marshall Clow2014-11-191-0/+41
| | | | llvm-svn: 222378
* NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove ↵Eric Fiselier2014-08-101-5/+1
| | | | | | | | | | | | | | | | | | 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
* THIRD TIME. Richard pointed out (again) that I'd switched the order of the ↵Marshall Clow2014-03-121-5/+5
| | | | | | instance variables; and thus failed to repair the ABI break. After this, I'm going to sit down and watch TV for the evening. llvm-svn: 203631
* Fix ABI break I made in r203587; thanks to Richard Smith for the catch.Marshall Clow2014-03-111-3/+5
| | | | llvm-svn: 203610
* Implement LWG 2360: 'reverse_iterator::operator*() is unimplementable'. Note ↵Marshall Clow2014-03-111-5/+3
| | | | | | that this is a (small) behavior change in the library. Reverse iterators whose base iterators' operator* return references to 'within themselves' have been sacrificed to the greater goal of avoiding data races. llvm-svn: 203587
* Implement LWG 2324: Insert iterator constructors should use addressof(). Add ↵Marshall Clow2014-03-031-3/+3
| | | | | | two new container classes to the test suite that overload operator &, and add test cases to the insert/front_insert/back_insert iterator tests that use these containers. llvm-svn: 202741
* Implement LWG Issue #2285 - make_reverse_iterator. Also mark issues #1450 ↵Marshall Clow2014-03-031-0/+11
| | | | | | and #2205 as complete; they are just wording changes in the standard. Mark issues #2359, #2320 and #2322 as complete - libc++ implements them already. llvm-svn: 202671
* LWG issue #2188: Reverse iterator does not fully support targets that ↵Marshall Clow2014-02-271-1/+2
| | | | | | overload operator&. Also mark #2272 and #2299 as complete; libc++ already implements them. llvm-svn: 202339
* Implement LWG Issue: 2280. begin/end for arrays should be constexpr and ↵Marshall Clow2014-02-191-6/+6
| | | | | | noexcept, plus a drive-by fix for cbegin/cend suggested by Peter Sommerlad. llvm-svn: 201703
* Rename ___make_pair_return to __make_pair_return_impl; ___make_tuple_return ↵Marshall Clow2014-01-031-3/+3
| | | | | | to __make_tuple_return_impl; and ____iterator_traits to __iterator_traits_impl. Part of a campaign to remove > 2 underscores from libc++. No functionality change. llvm-svn: 198457
* Move std::begin(array) and std::end(array) out from under an #ifdef that was ↵Marshall Clow2013-12-111-2/+2
| | | | | | preventing people from building libc++ using gcc. This corrects a mistake that I introduced in r196058 llvm-svn: 197061
* Fix for PRPR17934; based on a fix suggested by Peter SommerladMarshall Clow2013-12-021-49/+46
| | | | llvm-svn: 196058
* LWG Issue 2128: Implement global cbegin/rbegin/cend/rbeginMarshall Clow2013-08-301-0/+106
| | | | llvm-svn: 189634
* Implement LWG issue 2061Marshall Clow2013-08-271-1/+1
| | | | llvm-svn: 189345
* Rename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.Howard Hinnant2013-08-231-1/+1
| | | | llvm-svn: 189140
* Remove _LIBCPP_DEBUG. This was my first attempt at debug mode for libc++, ↵Howard Hinnant2013-08-231-416/+0
| | | | | | and is now obsoleted by _LIBCPP_DEBUG2 (which isn't finished). llvm-svn: 189135
* Debug mode for string. This commit also marks the first time libc++ ↵Howard Hinnant2013-08-231-1/+2
| | | | | | 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
* Nico Rieck: this patch series fixes visibility issues on Windows as ↵Howard Hinnant2013-08-121-17/+17
| | | | | | explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>. llvm-svn: 188192
* N3644 support for <string> and <vector>Marshall Clow2013-08-071-0/+3
| | | | llvm-svn: 187909
* Ok, 3 major changes for debug mode in one commit:Howard Hinnant2013-08-021-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 187636
* Implement full support for non-pointer pointers in custom allocators for vector.Howard Hinnant2013-06-271-1/+8
| | | | llvm-svn: 185093
* Removed raw references to __APPLE__; now just check to see if it is defined.Marshall Clow2013-03-181-1/+1
| | | | llvm-svn: 177297
* No functionality change at this time. I've split _LIBCPP_VISIBLE up into ↵Howard Hinnant2013-03-061-17/+17
| | | | | | two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute. llvm-svn: 176593
* Remove test for eof from istreambuf_iterator constructors. It is no longer ↵Howard Hinnant2012-12-291-2/+2
| | | | | | necessary and potentially violates the constructor's noexcept spec. llvm-svn: 171232
* istreambuf_iterator increment should call sbumpc instead of snextc. Patch Howard Hinnant2012-11-161-9/+7
| | | | | | by Kimball Thurston. This fixes http://llvm.org/bugs/show_bug.cgi?id=14358. llvm-svn: 168209
* Restrict optimized __pad_and_output implementation detail to desired releases.Howard Hinnant2012-11-141-0/+9
| | | | llvm-svn: 167980
* Rename uses of _ and __ because these are getting stepped on by macros from ↵Howard Hinnant2012-10-301-1/+1
| | | | | | other system code. llvm-svn: 167038
* Make vector::iterator and string::iterator more resilient against overly ↵Howard Hinnant2012-10-021-0/+32
| | | | | | generic relational operators. llvm-svn: 165033
* Overloaded __pad_and_output on ostreambuf_iterator and in this overload call ↵Howard Hinnant2012-09-191-0/+8
| | | | | | sputn instead of dereferencing the iterator which calls sputc. This is intended to be purely a performance optimization, especially for clients who may have overloaded the virtual function xsputn. llvm-svn: 164241
* Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you ↵Howard Hinnant2012-09-141-4/+21
| | | | | | send me a patch to CREDITS.TXT? llvm-svn: 163862
* noexcept applied to <iterator>.Howard Hinnant2012-07-201-14/+14
| | | | llvm-svn: 160565
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-1/+2
| | | | llvm-svn: 145624
* Further macro protection by replacing _[A-Z] with _[A-Z]pHoward Hinnant2011-11-291-31/+31
| | | | llvm-svn: 145410
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-221-14/+14
| | | | llvm-svn: 142732
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* Fix http://llvm.org/bugs/show_bug.cgi?id=11113Howard Hinnant2011-10-111-2/+2
| | | | llvm-svn: 141714
* Doug Gregor pointed out some problems with debug mode enabled in one TU and ↵Howard Hinnant2011-09-161-1/+6
| | | | | | not another. This patch helps detect those situations and offers improved error messages to help get debug mode enabled in more TU's when it is absolutely necessary to do so. Thanks Doug. llvm-svn: 139933
* Create multilevel debug modeHoward Hinnant2011-09-161-3/+19
| | | | llvm-svn: 139913
* Initial checkin for debug mode (version 2)Howard Hinnant2011-09-141-17/+84
| | | | llvm-svn: 139711
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-5/+5
| | | | llvm-svn: 134190
* noexcept for Chapter 21 [strings].Howard Hinnant2011-05-291-39/+39
| | | | llvm-svn: 132296
* Chris Jefferson noted many places where function calls needed to be ↵Howard Hinnant2011-02-141-2/+2
| | | | | | qualified (thanks Chris). llvm-svn: 125510
* Teach move_iterator that rvalue references cannot bind to non-functionDouglas Gregor2011-01-261-3/+10
| | | | | | | | lvalues, nor can one take the address of an xvalue, by adding appropriate static_cast's (in the first case) and a temporary (in the second case). llvm-svn: 124255
* N3142. Many of these traits are just placeholders with medium quality ↵Howard Hinnant2010-11-191-2/+2
| | | | | | emulation; waiting on compiler intrinsics to do it right. llvm-svn: 119854
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* I have reverted all contributions made by Jesse Towner in revision 110724Howard Hinnant2010-11-161-3/+3
| | | | llvm-svn: 119383
* visibility-decoration.Howard Hinnant2010-09-221-30/+31
| | | | llvm-svn: 114551
OpenPOWER on IntegriCloud