Commit Graph

9 Commits

Author SHA1 Message Date
Eric Fiselier
0e5ebbc77c Fix unused parameters and variables
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 23:37:52 +00:00
Eric Fiselier
77dabb302b Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant". Patch from Casey Carter
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 19:23:35 +00:00
Casey Carter
856947863f Cleanup nonportable behavior in tests for std::any
Fixes MS issues 63, 64, and 65.

test/std/utilities/any/any.class/any.cons/move.pass.cpp:
* "Moves are always destructive" is not a portable assumption; check with LIBCPP_ASSERT.

test/std/utilities/any/any.class/any.cons/value.pass.cpp:
* The standard does not forbid initializing std::any from any pointer-to-function type. Remove the non-conforming "DecayTag" test.

test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp:
* Self-swap is not specified to perform no moves; check with LIBCPP_ASSERT.

Differential Revision: https://reviews.llvm.org/D26007



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285234 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 20:18:13 +00:00
Eric Fiselier
4035b668e6 Make any_cast<void()>(nullptr) compile
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 11:56:38 +00:00
Eric Fiselier
846edfb837 Update issue status for LWG 2744
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284322 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 02:51:50 +00:00
Eric Fiselier
100a39d169 Update issue status for LWG 2768 and 2769
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 01:43:43 +00:00
Eric Fiselier
2c429bee79 Fix various issues in std::any and the related tests.
* Fix self-swap. Patch from Casey Carter.

* Remove workarounds and tests for types with deleted move constructors. This
  was originally added as part of a LWG proposed resolution that has since
  changed.

* Re-apply most recent PR for LWG 2769.

* Re-apply most recent PR for LWG 2754. Specifically fix the SFINAE checks to
  use the decayed type.

* Fix tests to allow moved-from std::any's to have a non-empty state. This is
  the behavior of MSVC's std::any.

* Various whitespace and test fixes.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283606 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-07 21:27:45 +00:00
Eric Fiselier
db4d7e96ca Improve constexpr tests for std::any
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@280777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 02:38:48 +00:00
Eric Fiselier
e739d54f86 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@278310 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-11 03:13:11 +00:00