Marshall Clow
3820ac3106
Add missing include that caused a test failure on Windows. Thanks to STL for the patch. No functional change.
...
llvm-svn: 279453
2016-08-22 18:45:31 +00:00
Marshall Clow
d4e8659dfc
make the associative containers do the right thing for propogate_on_container_assignment. Fixes bug #29001 . Tests are only for <map> right now - more complete tests will come when we revamp our allocator testing structure.
...
llvm-svn: 279008
2016-08-17 23:24:02 +00:00
Marshall Clow
2a10c960fa
Support allocators with explicit conversion constructors. Fixes bug #29000
...
llvm-svn: 278904
2016-08-17 05:58:40 +00:00
Adhemerval Zanella
ced7928069
libcxx: Fix path.compare.pass expected result
...
The expected 'filesystem::path::compare' result states that for different
path only result sign contains the information about passed arguments
(not its integer value). This is due it uses the output of other compare
functions (basic_string_view and char_traits) without further handling and
char_traits uses memcmp for final buffer comparison.
However for GLIBC on AArch64 the code:
int ret = memcmp ("b/a/c", "a/b/c", 1);
Results in '64' where for x86_64 it results in '1'.
This patch fixes the expected 'filesystem::path::compare' by normalizing
all the results before assert comparison.
llvm-svn: 278745
2016-08-15 21:24:50 +00:00
Marshall Clow
82b16766e6
Remove test for the sign of a NaN - doesn't work on MIPS, not strictly legal. Fixes bug 28936
...
llvm-svn: 278387
2016-08-11 18:46:24 +00:00
Saleem Abdulrasool
f5b8d8249e
test: relax the FS test a slight bit to be more reliable
...
Some filesystems track atime always. This relaxes the test to accept either a
filesystem which does not accurately track atime or does track the atime
accurately. This allows the test to pass on filesystems mounted with
`strictatime` on Linux or on macOS.
llvm-svn: 278357
2016-08-11 16:58:12 +00:00
Eric Fiselier
f5feedfa8b
Unbreak C++03 build.
...
llvm-svn: 278323
2016-08-11 08:15:35 +00:00
Eric Fiselier
a3e11a5b15
Refactor test archetypes implementation.
...
llvm-svn: 278319
2016-08-11 07:04:14 +00:00
Eric Fiselier
324506b9f3
[libcxx] Add std::any
...
Summary:
This patch adds std::any by moving/adapting <experimental/any>.
This patch also implements the std::any parts of p0032r3 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0032r3.pdf )
and LWG 2509 (http://cplusplus.github.io/LWG/lwg-defects.html#2509 ).
I plan to push it in a day or two if there are no comments.
Reviewers: mclow.lists, EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22733
llvm-svn: 278310
2016-08-11 03:13:11 +00:00
Eric Fiselier
45b7b44867
Implement LWG 2148: Make non-enum default hash specialization well-formed
...
Summary:
This patch removes the static_assert for non-enum types in the primary hash template. Instead non-enum types create a hash<T> specialization that is not constructible nor callable.
See also:
* http://cplusplus.github.io/LWG/lwg-active.html#2543
* https://llvm.org/bugs/show_bug.cgi?id=28917
Reviewers: mclow.lists, EricWF
Subscribers: mehdi_amini, cfe-commits
Differential Revision: https://reviews.llvm.org/D23331
llvm-svn: 278300
2016-08-10 22:45:26 +00:00
Marshall Clow
7725546a32
std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927.
...
llvm-svn: 278282
2016-08-10 20:04:46 +00:00
Matthias Braun
852f990ecb
test/hard_link_count(): Fix test on darwin
...
The hard link count that stat reports are different between normal hfs and the
case sensitive variant. Accept both.
llvm-svn: 278191
2016-08-10 01:02:28 +00:00
Hubert Tong
2fdf202493
[libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor
...
Summary:
The synopsis in C++11 subclause 28.8 [re.regex] has:
```
basic_regex(const charT* p, size_t len,
flag_type f = regex_constants::ECMAScript);
```
The default argument is added to libc++ by this change.
Reviewers: mclow.lists, rsmith, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22702
Reapplies r277966.
Patch by Jason Liu!
llvm-svn: 277968
2016-08-07 22:26:04 +00:00
Hubert Tong
faf3149df6
Revert r277966. Forgot patch attribution.
...
llvm-svn: 277967
2016-08-07 22:23:24 +00:00
Hubert Tong
614c406f9e
[libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor
...
Summary:
The synopsis in C++11 subclause 28.8 [re.regex] has:
```
basic_regex(const charT* p, size_t len,
flag_type f = regex_constants::ECMAScript);
```
The default argument is added to libc++ by this change.
Reviewers: mclow.lists, rsmith, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22702
llvm-svn: 277966
2016-08-07 22:18:33 +00:00
Eric Fiselier
296d9c79f5
Fix compile error due to mismatched iterator types. Patch from STL@microsoft.com
...
llvm-svn: 277574
2016-08-03 05:50:03 +00:00
Eric Fiselier
9b32bfb651
Fix an MSVC x64 compiler warning. Patch from STL@microsoft.com
...
llvm-svn: 277573
2016-08-03 05:48:09 +00:00
Hubert Tong
ac98d59802
[libcxx] basic_regex: add traits_type, string_type
...
Summary:
In the synopsis in C++11 subclause 28.8 [re.regex], `basic_regex` is
specified to have member typedefs `traits_type` and `string_type`. This
change adds them to libc++.
Reviewers: mclow.lists, rsmith, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D22698
Patch by Jason Liu!
llvm-svn: 277526
2016-08-02 21:34:48 +00:00
Marshall Clow
19b4035f29
Implement LCM and GCD for C++17. Same code as for Library Fundamentals TS.
...
llvm-svn: 276751
2016-07-26 14:29:45 +00:00
Marshall Clow
ab581e79aa
Implement LCM and GCD for Library Fundamentals. Reviewed as https://reviews.llvm.org/D21343 .
...
llvm-svn: 276750
2016-07-26 14:28:34 +00:00
Eric Fiselier
e26aada915
Remove use of C++1z static assert in C++11 test
...
llvm-svn: 276608
2016-07-25 04:56:32 +00:00
Eric Fiselier
4927c29577
Implement the std::pair parts of "Improving pair and tuple". Completes N4387.
...
llvm-svn: 276605
2016-07-25 04:32:07 +00:00
Eric Fiselier
aedcbf898b
Recommit r276548 - Make pair/tuples assignment operators SFINAE properly.
...
I think I've solved issues with is_assignable and references to incomplete
types. The updated patch adds tests for this case.
llvm-svn: 276603
2016-07-25 02:36:42 +00:00
Eric Fiselier
79586dca74
Make std::is_assignable tolerate references to incomplete types.
...
llvm-svn: 276599
2016-07-25 02:08:55 +00:00
Eric Fiselier
189f88ca35
Revert r276548 - Make pair/tuples assignment operators SFINAE properly.
...
This is a breaking change. The SFINAE required is instantiated the second
the class is instantiated, and this can cause hard SFINAE errors
when applied to references to incomplete types. Ex.
struct IncompleteType;
extern IncompleteType it;
std::tuple<IncompleteType&> t(it); // SFINAE will blow up.
llvm-svn: 276598
2016-07-25 01:45:07 +00:00
Eric Fiselier
93b8e51ebb
Make dtor_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
...
llvm-svn: 276595
2016-07-25 00:50:32 +00:00
Eric Fiselier
4e91ea50a0
Don't SFINAE pair's copy assignment operator in C++03 mode.
...
In C++03 mode evaluating the SFINAE can cause a hard error due to
access control violations. This is a problem because the SFINAE
is evaluated as soon as the class is instantiated, and not later.
llvm-svn: 276594
2016-07-25 00:48:36 +00:00
Eric Fiselier
141b2881d7
Mark bucket_count() assertions as non-portable. Patch from STL@microsoft.com
...
llvm-svn: 276593
2016-07-25 00:26:41 +00:00
Eric Fiselier
249b03effb
Make move_assign_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
...
llvm-svn: 276591
2016-07-25 00:18:12 +00:00
Eric Fiselier
2cd516e049
Make swap_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com.
...
See D21820 for more information (https://reviews.llvm.org/D21820 ).
llvm-svn: 276590
2016-07-25 00:15:29 +00:00
Eric Fiselier
b8937d6454
Work around MSVC's non-standard ABI for enums. Patch from STL@microsoft.com
...
llvm-svn: 276589
2016-07-25 00:02:23 +00:00
Eric Fiselier
44b4f6b85c
Fix a non-standard allocator in vector tests. Patch from STL@microsoft.com
...
llvm-svn: 276588
2016-07-24 23:49:42 +00:00
Eric Fiselier
8c48ebd412
Fix unique_ptr.runtime tests for null inputs. Patch from STL@microsoft.com
...
llvm-svn: 276587
2016-07-24 23:48:26 +00:00
Eric Fiselier
1662951974
Fix portability issues in <random> tests. Patch from STL@microsoft.com
...
llvm-svn: 276585
2016-07-24 23:36:18 +00:00
Eric Fiselier
307e4216b2
Mark bucket() assertions as non-portable. Patch from STL@microsoft.com
...
llvm-svn: 276584
2016-07-24 23:34:18 +00:00
Eric Fiselier
1b3eb43252
Fix MSVC unreferenced parameter warning. Patch from STL@microsoft.com
...
llvm-svn: 276583
2016-07-24 23:32:48 +00:00
Eric Fiselier
f950b85122
Make move_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
...
llvm-svn: 276581
2016-07-24 23:19:51 +00:00
Eric Fiselier
e028cd8af8
Make bucket_count() greater-equal assertions portable. Patch from STL@microsoft.com
...
llvm-svn: 276580
2016-07-24 23:16:37 +00:00
Eric Fiselier
ee410aca06
Mark bucket_size() assertions as non-portible. Patch from STL@microsoft.com
...
llvm-svn: 276578
2016-07-24 23:13:36 +00:00
Eric Fiselier
19244b67bc
Guard libc++ specific tests SFINAE on std::bind's call operator. Patch from STL@microsoft.com
...
llvm-svn: 276576
2016-07-24 23:08:21 +00:00
Eric Fiselier
904a5d7007
Make pair/tuples assignment operators SFINAE properly.
...
llvm-svn: 276548
2016-07-24 05:51:11 +00:00
Eric Fiselier
2e99ae4f97
Fix memory leak in test.
...
llvm-svn: 276547
2016-07-24 04:41:44 +00:00
Eric Fiselier
790df14543
Implement LWG 2393. Check for LValue-callability.
...
llvm-svn: 276546
2016-07-24 04:16:40 +00:00
Eric Fiselier
63c69ef49c
Implement LWG2328. Rvalue stream extraction should perfect forward.
...
llvm-svn: 276545
2016-07-24 04:07:22 +00:00
Eric Fiselier
e4d9c316d2
Implement P0040r3: Extending memory management tools
...
llvm-svn: 276544
2016-07-24 03:51:39 +00:00
Eric Fiselier
58ad17df0f
Implement the in_place tags from p0032r3.
...
That paper also has changes to any/optional but those will
be implemented later.
llvm-svn: 276537
2016-07-23 22:19:19 +00:00
Eric Fiselier
0fdab5eb69
Implement P0392r0. Integrate filesystem::path and string_view.
...
llvm-svn: 276511
2016-07-23 03:10:56 +00:00
Marshall Clow
f067d20c6d
Again, w/o the tabs
...
llvm-svn: 276273
2016-07-21 13:19:36 +00:00
Marshall Clow
ef68f26b28
Another fix to appease the no-exception bots.
...
llvm-svn: 276272
2016-07-21 13:18:50 +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