Marshall Clow
f3e0e3acda
Move the test for zero-length into the char_traits (from string_view). Add tests to char_traits specializations
...
llvm-svn: 228981
2015-02-12 23:34:52 +00:00
Marshall Clow
8037b8ec6e
Fixed a problem that UBSAN found, where we were calling memcmp(null, p, 0) - which is undefined behavior
...
llvm-svn: 228952
2015-02-12 19:58:06 +00:00
Eric Fiselier
cc2e1ab69c
Add pragma system header to some experimental headers and add newlines to files.
...
llvm-svn: 228712
2015-02-10 17:32:49 +00:00
Eric Fiselier
861d0ea2aa
Fix more issues exposed by -pedantic-errors in c++03 mode
...
llvm-svn: 228711
2015-02-10 17:20:18 +00:00
Eric Fiselier
7bffc89cb9
[libcxx] Add <experimental/system_error>
...
Summary:
This patch just adds the variable templates in <experimental/system_error>.
see: https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#syserror
Reviewers: jroelofs, danalbert, K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: chandlerc, cfe-commits
Differential Revision: http://reviews.llvm.org/D7353
llvm-svn: 227973
2015-02-03 16:03:24 +00:00
Eric Fiselier
2f746d4c94
[libcxx] Add <experimental/chrono>
...
Summary:
This patch adds <experimental/chrono> which only contains a single variable template.
See: https://rawgit.com/cplusplus/fundamentals-ts/v1/fundamentals-ts.html#time
Reviewers: jroelofs, danalbert, K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7352
llvm-svn: 227860
2015-02-02 21:05:47 +00:00
Eric Fiselier
5459af15f9
[libcxx] Add <experimental/type_traits> for LFTS
...
Summary:
This adds the <experimental/type_traits> (minus invocation traits). Mostly just the `_v` traits.
Reviewers: K-ballo, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5742
llvm-svn: 224626
2014-12-19 22:21:44 +00:00
Marshall Clow
e61fba3b70
Add all the relational operators to std::experimental::optional. Also update bad_optional_access to match the Library Fundamentals draft standard. This is not all of the upcoming changes to optional, though.
...
llvm-svn: 223775
2014-12-09 14:49:17 +00:00
Marshall Clow
eb63c5e28c
Replaced checking in string_view::remove_suffix/remove_prefix by _LIBCPP_ASSERT, since this is technically undefined behavior. Fixes PR#21496
...
llvm-svn: 221717
2014-11-11 22:07:10 +00:00
Marshall Clow
8ba95b7b4d
Mark string_view::to_string as const. Fixes PR21428
...
llvm-svn: 221101
2014-11-02 15:35:32 +00:00
Marshall Clow
aedfb87089
Change the comment on the closing #endif to match the condition on the corresponding #ifdef. Thanks to K-ballo for the catch. No functionality change.
...
llvm-svn: 220647
2014-10-26 20:29:38 +00:00
Eric Fiselier
c1bd9197eb
NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove 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
2014-08-10 23:53:08 +00:00
Eric Fiselier
04c39ece80
NFC. Remove trailing whitespace and tabs.
...
llvm-svn: 215326
2014-08-10 20:56:31 +00:00
Eric Fiselier
aa873af53d
[libcxx] expose experimental::erased_type for all standard versions.
...
Summary: The polymorphic allocator implementation would greatly benefit by defining virtual functions in the dynlib instead of inline. In order to do that some types are going to have to be available outside of c++1y. This is the first step.
Reviewers: mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4554
llvm-svn: 213889
2014-07-24 19:17:38 +00:00
Marshall Clow
8116e1d1c3
Update the synopsis and comments with the results of LWG #2255 . No code to back it up at the moment; just comments
...
llvm-svn: 213768
2014-07-23 16:58:25 +00:00
Eric Fiselier
531d8b2bc4
[libcxx] Add <experimental/utility> header for LFTS.
...
Summary:
This patch adds the `<experimental/utility>` header as specified in the latest draft of the library fundamentals TS.
`<experimental/utility>` only contains `class erased_type`.
This patch also updates the documentation to list the `erased_type` class as "initial implementation complete".
Test Plan:
Three test cases where added:
1. Test that `_LIBCPP_VERSION` is defined.
2. Test that `<utility>` has been included.
3. Test that `erased_type` is in the correct namespace and is constexpr default constructible.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4510
llvm-svn: 213226
2014-07-17 05:31:31 +00:00
Marshall Clow
926731b1e5
string_view enhancements. Move to the correct namespace. Better constexpr 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
2014-07-08 22:38:11 +00:00
Marshall Clow
35af19ab1f
Minor cleanup for string_view; mostly from suggestions by Richard Smith. Also, make the tests pass under c++03
...
llvm-svn: 212185
2014-07-02 15:45:57 +00:00
Marshall Clow
2f4bfdecb3
Formatting improvements in the <string_view> synopsis suggested by RSmith. No functionality change.
...
llvm-svn: 211191
2014-06-18 17:44:04 +00:00
Marshall Clow
5aa8fa250d
Implement string_view from the library fundamentals TS (n4023). Also works in C++11 and 03, with reduced functionality (mostly in the area of constexpr)
...
llvm-svn: 210659
2014-06-11 16:44:55 +00:00
Richard Smith
ff0aff3caf
Use __builtin_operator_new/__builtin_operator_delete when available. This
...
allows allocations and deallocations to be optimized out.
llvm-svn: 210211
2014-06-04 19:54:15 +00:00
Marshall Clow
dfdac03c8f
Move <optional> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
...
llvm-svn: 194867
2013-11-15 22:42:10 +00:00
Marshall Clow
21fee96f69
Move <dynarray> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
...
llvm-svn: 194614
2013-11-13 22:44:48 +00:00