Commit Graph

14 Commits

Author SHA1 Message Date
Eric Fiselier 9ffacf3d16 Fix more unreserved names
llvm-svn: 304383
2017-06-01 02:29:37 +00:00
Eric Fiselier a016efb1dc [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows
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
2017-05-31 22:07:49 +00:00
Eric Fiselier 5b8ab693ab Remove non-standard basic_string_view::clear() member.
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
2017-05-12 03:35:53 +00:00
Marshall Clow 4069c2bc48 Implement LWG#2761: 'basic_string should require that charT match traits::char_type'. Tests for string_view, too
llvm-svn: 297872
2017-03-15 18:41:11 +00:00
Marshall Clow cddeb751a1 Implement LWG#2778: basic_string_view is missing constexpr.
llvm-svn: 292823
2017-01-23 19:53:28 +00:00
Marshall Clow 8fd58a6be8 Implement P0403R1 - 'Literal suffixes for basic_string_view'. Requires clang 4.0 (specifically, r290744)
llvm-svn: 291457
2017-01-09 18:07:34 +00:00
Eric Fiselier e2f2d1edef [NFC] Rename _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS
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
2017-01-04 23:56:00 +00:00
Eric Fiselier ca648c9787 Add module definitions for string_view
llvm-svn: 288733
2016-12-05 23:53:23 +00:00
Marshall Clow 1c7fe126ee Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted last week in Issaquah
llvm-svn: 286858
2016-11-14 18:22:19 +00:00
Marshall Clow d4cd37faca Move 'quoted' for string_view from <string_view> to <iomanip> (where the other versions of 'quoted' live. No functional change.
llvm-svn: 285300
2016-10-27 15:10:07 +00:00
Marshall Clow 0fc8cec796 Followon to r279744. Find the other exception types and make __throw_XXX routines (and call them). Remove the generic __libcpp_throw routine, since no one uses it anymore.
llvm-svn: 279763
2016-08-25 17:47:09 +00:00
Marshall Clow aa849bc2f2 Add a bunch of noexcepts to char_traits and string_view.
llvm-svn: 276955
2016-07-28 04:52:02 +00:00
Marshall Clow 187db16996 Fix some string_view tests that were failing when exceptions were disabled. Also comment out a _LIBCPP_ASSERT that gcc4.9 was complaining about. Will revisit that later.
llvm-svn: 276241
2016-07-21 06:24:04 +00:00
Marshall Clow 053d81ceeb Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459
llvm-svn: 276238
2016-07-21 05:31:24 +00:00