summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string
Commit message (Collapse)AuthorAgeFilesLines
...
* Move the test for zero-length into the char_traits (from string_view). Add ↵Marshall Clow2015-02-121-2/+2
| | | | | | tests to char_traits specializations llvm-svn: 228981
* [libcxx] Fix use of operator comma where the types can be user definedEric Fiselier2014-10-271-1/+1
| | | | | | | | | | | | | | | | 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
* Fix char_traits functions for GCC compatibility.Dan Albert2014-09-171-104/+52
| | | | | | | | GCC 4.9 fails to inline these functions at -O1 because they are used indirectly. Declare them as inline instead of always_inline. Discussion in GCC bugreport: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63220 llvm-svn: 217961
* NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove ↵Eric Fiselier2014-08-101-0/+2
| | | | | | | | | | | | | | | | | | 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
* Fix bug #20335 - memory leak when move-constructing a string with unequal ↵Marshall Clow2014-07-171-14/+16
| | | | | | allocator. Thanks to Thomas Koeppe for the report llvm-svn: 213269
* Make the helper routines in string really be constexpr. This required a bit ↵Marshall Clow2014-06-101-43/+45
| | | | | | 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
* Preparation for <string_view>. More helper functions that can be shared ↵Marshall Clow2014-06-021-62/+109
| | | | | | between <string> and <string_view>. No functionality change llvm-svn: 210002
* Fix typosAlp Toker2014-05-151-23/+23
| | | | llvm-svn: 208869
* Implement LWG #2268: Setting a default argument in the declaration of a ↵Marshall Clow2014-03-041-10/+10
| | | | | | member function assign of std::basic_string. llvm-svn: 202876
* Remove tabs that crept in during an earlier refactoring. No functionality changeMarshall Clow2014-02-161-14/+14
| | | | llvm-svn: 201472
* Refactor some of the operations in <string> so that they can be reused; no ↵Marshall Clow2013-12-091-80/+130
| | | | | | functionality change llvm-svn: 196788
* Fix an off-by-one error in basic_string::__grow_by, where it would ↵Marshall Clow2013-11-061-1/+1
| | | | | | incorrectly throw length_error (instead of bad_alloc) when attempting to resize the string to 'max_size()'. Add tests for resizing to max_size +/-1 llvm-svn: 194151
* Fixes PR17148Marshall Clow2013-10-311-2/+2
| | | | llvm-svn: 193772
* Mark namespaces for user defined literals as 'inline'Marshall Clow2013-10-051-4/+1
| | | | llvm-svn: 192047
* G M: Changes all references to "x inline" to "inline x" where x = ↵Howard Hinnant2013-10-041-88/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | _libcpp_always_inline or _libcpp_inline_visibility macros. The patch touches these files: locale array deque new string utility vector __bit_reference __split_buffer locale_win32.h There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc. It is intended to make libcxx more consistent with itself and to prevent the 1000 or so "inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc. Prefer "inline [other inline related keyword]" over "[other related keyword] inline". After this patch, libcxx should be consistent to this pattern. llvm-svn: 191987
* Debug mode for string. This commit also marks the first time libc++ ↵Howard Hinnant2013-08-231-176/+227
| | | | | | 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
* Xing Xue: port to IBM XLC++/AIX.Howard Hinnant2013-08-141-2/+2
| | | | llvm-svn: 188396
* Nico Rieck: this patch series fixes visibility issues on Windows as ↵Howard Hinnant2013-08-121-51/+51
| | | | | | explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>. llvm-svn: 188192
* War on tabsHoward Hinnant2013-08-071-23/+23
| | | | llvm-svn: 187906
* Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which isHoward Hinnant2013-08-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* Implement string suffixes from N3642Marshall Clow2013-07-231-0/+41
| | | | llvm-svn: 186956
* Implement full support for non-pointer pointers in custom allocators for ↵Howard Hinnant2013-06-281-161/+167
| | | | | | string. This completes the custom pointer support for the entire library. llvm-svn: 185167
* This patch introduces an alternative layout for basic_string which when the ↵Howard Hinnant2013-04-301-12/+107
| | | | | | 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. llvm-svn: 180811
* Modest performance improvement for std::string's operator==.Howard Hinnant2013-04-221-7/+28
| | | | llvm-svn: 180072
* No functionality change at this time. I've split _LIBCPP_VISIBLE up into ↵Howard Hinnant2013-03-061-8/+8
| | | | | | 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
* Revert accidental check-in. These changes are probably good, but premature ↵Howard Hinnant2013-02-071-6/+3
| | | | | | at this point. llvm-svn: 174625
* Michael van der Westhuizen: The attached patch add support for building ↵Howard Hinnant2013-02-071-3/+6
| | | | | | | | | | | 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 llvm-svn: 174623
* Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.Howard Hinnant2012-12-311-1/+1
| | | | llvm-svn: 171321
* Provide a way to disable use of extern templates in libc++. This is ↵Howard Hinnant2012-11-061-3/+3
| | | | | | 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
* Rename uses of _ and __ because these are getting stepped on by macros from ↵Howard Hinnant2012-10-301-3/+3
| | | | | | other system code. llvm-svn: 167038
* Don't neglect to "return *this".Argyrios Kyrtzidis2012-10-131-0/+1
| | | | llvm-svn: 165860
* constexpr applied to <string>.Howard Hinnant2012-07-201-42/+44
| | | | llvm-svn: 160563
* Installation of CityHash by Craig SilversteinHoward Hinnant2011-12-101-1/+1
| | | | llvm-svn: 146329
* Starting using murmur2 when combining multiple size_t's into a single hash, ↵Howard Hinnant2011-12-051-10/+2
| | | | | | and also for basic_string. Also made hash<thread::id> ever so slighly more portable. I had to tweak one test which is questionable (definitely not portable) anyway. llvm-svn: 145795
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-9/+13
| | | | llvm-svn: 145624
* Add protection from min/max macrosHoward Hinnant2011-11-291-0/+2
| | | | llvm-svn: 145407
* More windows port work by Ruben Van BoxemHoward Hinnant2011-10-221-0/+7
| | | | llvm-svn: 142732
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* Fix const correctness bug in __move_assign. Found and fixed by Ion Gaztañaga.Howard Hinnant2011-09-021-3/+3
| | | | llvm-svn: 139032
* Don't move assign string::allocator_type when ↵Howard Hinnant2011-08-171-1/+23
| | | | | | propagate_on_container_move_assignment is false. llvm-svn: 137862
* Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574Howard Hinnant2011-08-121-0/+18
| | | | llvm-svn: 137522
* Add a new hash class in __gnu_ext for the extension containers. ThereAlexis Hunt2011-07-291-14/+16
| | | | | | | | | | | | | | are two motivations for this. First, this allows users who are specializing __gnu_ext::hash to continue doing so without changing their code. Second, SGI specifies hash overloads for char* and const char* that perform a hash of the string, not of the pointer. In order to support this, the hashing code for string is factored out. llvm-svn: 136539
* Optimization of string::operator< by M.E. O'Neill. Discussion in ↵Howard Hinnant2011-07-241-1/+11
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=10461 llvm-svn: 135893
* http://llvm.org/bugs/show_bug.cgi?id=10461Howard Hinnant2011-07-241-92/+2
| | | | llvm-svn: 135873
* http://llvm.org/bugs/show_bug.cgi?id=10390Howard Hinnant2011-07-181-0/+37
| | | | llvm-svn: 135393
* Fixing up some ABI issuesHoward Hinnant2011-07-071-48/+0
| | | | llvm-svn: 134639
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-38/+38
| | | | llvm-svn: 134190
* Provide names for template and function parameters in forward declarations. ↵Howard Hinnant2011-06-141-5/+6
| | | | | | The purpose is to aid automated documentation tools. llvm-svn: 133008
* Bring noexcept for <string> inline with other containers.Howard Hinnant2011-06-031-18/+45
| | | | llvm-svn: 132573
* noexcept for Chapter 21 [strings].Howard Hinnant2011-05-291-276/+491
| | | | llvm-svn: 132296
OpenPOWER on IntegriCloud