summaryrefslogtreecommitdiffstats
path: root/libcxx/include/experimental/string_view
Commit message (Collapse)AuthorAgeFilesLines
* [libcxx] Slightly improved policy for handling experimental featuresLouis Dionne2019-06-111-20/+0
| | | | | | | | | | | | | | | | | | | | Summary: Following the discussion on the libcxx-dev mailing list (http://lists.llvm.org/pipermail/libcxx-dev/2019-May/000358.html), this implements the new policy for handling experimental features and their deprecation. We basically add a deprecation warning for std::experimental::filesystem, and we remove a bunch of <experimental/*> headers that were now empty. Reviewers: mclow.lists, EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits, jfb Tags: #libc Differential Revision: https://reviews.llvm.org/D62428 llvm-svn: 363072
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. 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: 351648
* Fix PR39749 - Headers containing just #error harm __has_include.Eric Fiselier2019-01-061-3/+13
| | | | | | | | | | | This patch changes <experimental/foo> to use #warning instead of is harmful to common feature detection idioms. We should also consider only emitting the warning when __DEPRECATED is defined, like we do in the <ext/foo> headers. Users may want to specify "-Werror=-W#warnings" while still ignoring the libc++ warnings. llvm-svn: 350485
* Remove <experimental/string_view>; use <string_view> instead. See ↵Marshall Clow2018-02-051-808/+1
| | | | | | https://libcxx.llvm.org/TS_deprecation.html llvm-svn: 324290
* [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on WindowsEric Fiselier2017-05-311-0/+5
| | | | | | | | | | | | | | | | 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
* Revert "Rework fix for PR19460 - Use explicit bool as an extension instead."Eric Fiselier2017-01-131-6/+1
| | | | | | This reverts commit 3a1b90a866b6d5d62a5f37fbfb3a1ee36cc70dd1. llvm-svn: 291921
* [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
* Rework fix for PR19460 - Use explicit bool as an extension instead.Eric Fiselier2017-01-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | In the previous fix I used a PMF type as a semi-safe bool type in C++03. However immediately after committing I realized clang offered explicit conversion operators as an extension. This patch removes the old fix and enables _LIBCPP_EXPLICIT using __has_extension instead. This change also affects the following other classes, which have '_LIBCPP_EXPLICIT operator bool()'. * shared_ptr * unique_ptr * error_condition * basic_ios * function (already C++11 only) * istream::sentry * experimental::string_view. In all of the above cases I believe it is safe to enable the extension, except in the experimental::string_view case. There seem to be some Clang bugs affecting the experimental::string_view conversion to std::basic_string. To work around that I manually disabled _LIBCPP_EXPLICIT in that case. llvm-svn: 290831
* Followon to r279744. Find the other exception types and make __throw_XXX ↵Marshall Clow2016-08-251-2/+2
| | | | | | routines (and call them). Remove the generic __libcpp_throw routine, since no one uses it anymore. llvm-svn: 279763
* Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception ↵Marshall Clow2016-08-251-2/+2
| | | | | | type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. llvm-svn: 279744
* Make string_view work with -fno-exceptions and get tests passing.Eric Fiselier2016-05-301-3/+4
| | | | llvm-svn: 271237
* Fixed some spelling errors in assert messages. No functional change. Thanks ↵Marshall Clow2016-05-041-19/+19
| | | | | | to giffunip@yahoo.com for the report. llvm-svn: 268510
* Change string_view::at to make it work with gcc and VC++. Thanks to K-ballo ↵Marshall Clow2015-02-231-4/+1
| | | | | | for the bug report, and Jonathan Wakeley for the code review in the bar. llvm-svn: 230260
* Enable testing with _LIBCPP_DEBUG and fix bad assertions in string_view.Eric Fiselier2015-02-181-2/+2
| | | | llvm-svn: 229698
* Move the test for zero-length into the char_traits (from string_view). Add ↵Marshall Clow2015-02-121-1/+1
| | | | | | tests to char_traits specializations llvm-svn: 228981
* Fixed a problem that UBSAN found, where we were calling memcmp(null, p, 0) - ↵Marshall Clow2015-02-121-1/+1
| | | | | | which is undefined behavior llvm-svn: 228952
* Replaced checking in string_view::remove_suffix/remove_prefix by ↵Marshall Clow2014-11-111-4/+2
| | | | | | _LIBCPP_ASSERT, since this is technically undefined behavior. Fixes PR#21496 llvm-svn: 221717
* Mark string_view::to_string as const. Fixes PR21428Marshall Clow2014-11-021-1/+2
| | | | llvm-svn: 221101
* 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
* NFC. Remove trailing whitespace and tabs.Eric Fiselier2014-08-101-43/+43
| | | | llvm-svn: 215326
* string_view enhancements. Move to the correct namespace. Better constexpr ↵Marshall Clow2014-07-081-11/+12
| | | | | | support (thanks to Richard for the suggestions). Update the tests to match this. Add <experimental/__config for experimental macros/etc to live. llvm-svn: 212569
* Minor cleanup for string_view; mostly from suggestions by Richard Smith. ↵Marshall Clow2014-07-021-18/+19
| | | | | | Also, make the tests pass under c++03 llvm-svn: 212185
* Formatting improvements in the <string_view> synopsis suggested by RSmith. ↵Marshall Clow2014-06-181-112/+111
| | | | | | No functionality change. llvm-svn: 211191
* Implement string_view from the library fundamentals TS (n4023). Also works ↵Marshall Clow2014-06-111-0/+813
in C++11 and 03, with reduced functionality (mostly in the area of constexpr) llvm-svn: 210659
OpenPOWER on IntegriCloud