summaryrefslogtreecommitdiff
path: root/include/string_view
AgeCommit message (Collapse)Author
2017-12-20Fix the definitions of 'reference' and 'pointer' in string_view that no one ↵Marshall Clow
uses :-). Thanks to K-ballo for the catch. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321188 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-04Implement P0457R2: 'String Prefix and Suffix Checking' for c++2aMarshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@319687 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-15More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in ↵Marshall Clow
string, string_view, and the free function std::empty(). Removed tabs from <string_view>, which is why the diff is so big. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318328 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24Mark string_view's constructor from (ptr,len) as noexcept (an extension). ↵Marshall Clow
Update the tests to check this (and other noexcept bits git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316456 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-24Mark string_view literals as 'noexcept'. Fixes PR#25054. Thanks to Pavel K ↵Marshall Clow
for the bug report. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316439 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-01Fix more unreserved namesEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304383 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[Libc++] Use #pragma push_macro/pop_macro to better handle min/max on WindowsEric Fiselier
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304357 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-12Remove non-standard basic_string_view::clear() member.Eric Fiselier
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302869 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15Implement LWG#2761: 'basic_string should require that charT match ↵Marshall Clow
traits::char_type'. Tests for string_view, too git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297872 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23Implement LWG#2778: basic_string_view is missing constexpr.Marshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292823 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09Implement P0403R1 - 'Literal suffixes for basic_string_view'. Requires clang ↵Marshall Clow
4.0 (specifically, r290744) git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291457 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04[NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VISEric Fiselier
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05Add module definitions for string_viewEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted ↵Marshall Clow
last week in Issaquah git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286858 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27Move 'quoted' for string_view from <string_view> to <iomanip> (where the ↵Marshall Clow
other versions of 'quoted' live. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25Followon to r279744. Find the other exception types and make __throw_XXX ↵Marshall Clow
routines (and call them). Remove the generic __libcpp_throw routine, since no one uses it anymore. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279763 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-28Add a bunch of noexcepts to char_traits and string_view.Marshall Clow
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276955 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21Fix some string_view tests that were failing when exceptions were disabled. ↵Marshall Clow
Also comment out a _LIBCPP_ASSERT that gcc4.9 was complaining about. Will revisit that later. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276241 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21Implement std::string_view as described in http://wg21.link/P0254R1. ↵Marshall Clow
Reviewed as https://reviews.llvm.org/D21459 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276238 91177308-0d34-0410-b5e6-96231b3b80d8