summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string_view
Commit message (Collapse)AuthorAgeFilesLines
* Add forward declaration of operator<< in <string_view> as required.Eric Fiselier2019-09-251-0/+7
| | | | | | | | This declaration was previously missing despite appearing in the synopsis. Users are still required to include <ostream> to get the definition of the streaming operator. llvm-svn: 372909
* Add debug check for null pointers passed to <string_view>Eric Fiselier2019-09-141-1/+1
| | | | llvm-svn: 371925
* Revert "Suppress -Wctad-maybe-unsupported on types w/o deduction guides."Eric Fiselier2019-08-041-1/+0
| | | | | | | | | Some modules builds are issuing buggy diagnostics. The cause of which is TBD. This reverts commit r@367770. llvm-svn: 367777
* Suppress -Wctad-maybe-unsupported on types w/o deduction guides.Eric Fiselier2019-08-031-0/+1
| | | | | | | | | | | There are a handful of standard library types that are intended to support CTAD but don't need any explicit deduction guides to do so. This patch adds a dummy deduction guide to those types to suppress -Wctad-maybe-unsupported (which gets emitted in user code). llvm-svn: 367770
* Provide hashers for string_view only if they are using the default ↵Marshall Clow2019-06-271-4/+4
| | | | | | char_traits. Seen on SO: test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp llvm-svn: 364545
* We had a _LIBCPP_ASSERT commented out because gcc 4.9 didn't like it. We ↵Marshall Clow2019-06-041-3/+3
| | | | | | (LLVM) now require GCC 5.1, so that's not a problem any more. Re-enable the assertion. Fixes PR#36863 llvm-svn: 362465
* [NFC][libcxx] Remove trailing whitespaceLouis Dionne2019-05-291-8/+8
| | | | | | It's incredibly annoying when trying to create diffs llvm-svn: 361981
* Mark 'front()' and 'back()' as noexcept for array/deque/string/string_view. ↵Marshall Clow2019-03-191-2/+2
| | | | | | These are just rebranded 'operator[]', and should be noexcept like it is. llvm-svn: 356435
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Second part of P0482 - char8_t. Reviewed as https://reviews.llvm.org/D55308Marshall Clow2018-12-111-0/+11
| | | | llvm-svn: 348828
* [libcxx] Apply _LIBCPP_INLINE_VISIBILITY for std::hash for string_viewLouis Dionne2018-11-281-9/+4
| | | | llvm-svn: 347765
* Implement the infrastructure for feature-test macros. Very few actual ↵Marshall Clow2018-09-121-0/+1
| | | | | | feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 llvm-svn: 342073
* Implement LWG3034: P0767R1 breaks previously-standard-layout typesMarshall Clow2018-03-211-1/+3
| | | | llvm-svn: 328064
* Change a static_assert to check for is_trivial instead of is_pod, as is ↵Marshall Clow2018-01-221-1/+1
| | | | | | mandated by P0767. llvm-svn: 323071
* Fix the definitions of 'reference' and 'pointer' in string_view that no one ↵Marshall Clow2017-12-201-2/+2
| | | | | | uses :-). Thanks to K-ballo for the catch. llvm-svn: 321188
* Implement P0457R2: 'String Prefix and Suffix Checking' for c++2aMarshall Clow2017-12-041-0/+33
| | | | llvm-svn: 319687
* More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in ↵Marshall Clow2017-11-151-409/+409
| | | | | | string, string_view, and the free function std::empty(). Removed tabs from <string_view>, which is why the diff is so big. llvm-svn: 318328
* Mark string_view's constructor from (ptr,len) as noexcept (an extension). ↵Marshall Clow2017-10-241-1/+1
| | | | | | Update the tests to check this (and other noexcept bits llvm-svn: 316456
* Mark string_view literals as 'noexcept'. Fixes PR#25054. Thanks to Pavel K ↵Marshall Clow2017-10-241-8/+8
| | | | | | for the bug report. llvm-svn: 316439
* Fix more unreserved namesEric Fiselier2017-06-011-2/+2
| | | | llvm-svn: 304383
* [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on WindowsEric Fiselier2017-05-311-1/+6
| | | | | | | | | | | | | | | | Summary: This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning. This patch changes libc++ to use `#pragma push_macro` to save the macro before undefining it, and `#pragma pop_macro` to restore the macros and the end of the header. Reviewers: mclow.lists, bcraig, compnerd, EricWF Reviewed By: EricWF Subscribers: cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D33080 llvm-svn: 304357
* Remove non-standard basic_string_view::clear() member.Eric Fiselier2017-05-121-8/+0
| | | | | | | | This patch removes the clear() member from <string_view>. The modifier was removed from the TS before it ever landed in the standard. There is no reason libc++ should be providing this method. llvm-svn: 302869
* Implement LWG#2761: 'basic_string should require that charT match ↵Marshall Clow2017-03-151-0/+4
| | | | | | traits::char_type'. Tests for string_view, too llvm-svn: 297872
* Implement LWG#2778: basic_string_view is missing constexpr.Marshall Clow2017-01-231-5/+5
| | | | llvm-svn: 292823
* Implement P0403R1 - 'Literal suffixes for basic_string_view'. Requires clang ↵Marshall Clow2017-01-091-0/+37
| | | | | | 4.0 (specifically, r290744) llvm-svn: 291457
* [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VISEric Fiselier2017-01-041-2/+2
| | | | | | | | | | | | | The name _LIBCPP_TYPE_VIS_ONLY is no longer accurate because both _LIBCPP_TYPE_VIS and _LIBCPP_TYPE_VIS_ONLY expand to __attribute__((__type_visibility__)) with Clang. The only remaining difference is that _LIBCPP_TYPE_VIS_ONLY can be applied to templates whereas _LIBCPP_TYPE_VIS cannot (due to dllimport/dllexport not being allowed on templates). This patch renames _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS. llvm-svn: 291035
* Add module definitions for string_viewEric Fiselier2016-12-051-0/+3
| | | | llvm-svn: 288733
* Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted ↵Marshall Clow2016-11-141-3/+2
| | | | | | last week in Issaquah llvm-svn: 286858
* Move 'quoted' for string_view from <string_view> to <iomanip> (where the ↵Marshall Clow2016-10-271-12/+0
| | | | | | other versions of 'quoted' live. No functional change. llvm-svn: 285300
* Followon to r279744. Find the other exception types and make __throw_XXX ↵Marshall Clow2016-08-251-3/+3
| | | | | | routines (and call them). Remove the generic __libcpp_throw routine, since no one uses it anymore. llvm-svn: 279763
* Add a bunch of noexcepts to char_traits and string_view.Marshall Clow2016-07-281-1/+1
| | | | llvm-svn: 276955
* Fix some string_view tests that were failing when exceptions were disabled. ↵Marshall Clow2016-07-211-3/+3
| | | | | | Also comment out a _LIBCPP_ASSERT that gcc4.9 was complaining about. Will revisit that later. llvm-svn: 276241
* Implement std::string_view as described in http://wg21.link/P0254R1. ↵Marshall Clow2016-07-211-0/+764
Reviewed as https://reviews.llvm.org/D21459 llvm-svn: 276238
OpenPOWER on IntegriCloud