summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/tuple
Commit message (Collapse)AuthorAgeFilesLines
* Move test into test/std subdirectory.Eric Fiselier2014-12-2061-3852/+0
| | | | llvm-svn: 224658
* Flush out test cases for tuples constructor SFINAEEric Fiselier2014-11-182-23/+132
| | | | llvm-svn: 222278
* [libcxx] Delay evaluation of __make_tuple_types to prevent blowing the max ↵Eric Fiselier2014-10-282-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | template instantiation depth. Fixes Bug #18345 Summary: http://llvm.org/bugs/show_bug.cgi?id=18345 Tuple's constructor and assignment operators for "tuple-like" types evaluates __make_tuple_types unnecessarily. In the case of a large array this can blow the template instantiation depth. Ex: ``` #include <array> #include <tuple> #include <memory> typedef std::array<int, 1256> array_t; typedef std::tuple<array_t> tuple_t; int main() { array_t a; tuple_t t(a); // broken t = a; // broken // make_shared uses tuple behind the scenes. This bug breaks this code. std::make_shared<array_t>(a); } ``` To prevent this from happening we delay the instantiation of `__make_tuple_types` until after we perform the length check. Currently `__make_tuple_types` is instantiated at the same time that the length check . Test Plan: Two tests have been added. One for the "tuple-like" constructors and another for the "tuple-like" assignment operator. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: K-ballo, cfe-commits Differential Revision: http://reviews.llvm.org/D4467 llvm-svn: 220769
* LWG #2212 (not yet adopted) mandates that tuple_size/tuple_element are ↵Marshall Clow2014-10-212-0/+101
| | | | | | available if <array> or <utility> are included (not just <tuple>). We already do this. Add some tests to make sure that this remains true. llvm-svn: 220295
* Fixes PR21157 'tuple: non-default constructible tuple hard failure' Thanks ↵Marshall Clow2014-10-153-0/+56
| | | | | | to Louis Dionne for the bug report and the patch. llvm-svn: 219785
* Fix for PR 19616: 'tuple_cat of nested tuples fails in noexcept ↵Marshall Clow2014-10-071-0/+14
| | | | | | specification'. Thanks to Louis Dionne for the fix. llvm-svn: 219243
* D4451: Fix copy/move issues casude by __tuple_leafs's converting constructorEric Fiselier2014-07-243-1/+72
| | | | llvm-svn: 213888
* Fix bug #18350. Add tests for tuples of all the smart pointers (except auto_ptr)Marshall Clow2014-04-261-0/+35
| | | | llvm-svn: 207307
* Default the copy and move constructors for __tuple_leaf. This fixes bugs ↵Marshall Clow2014-04-211-0/+35
| | | | | | 18853 and 19118. Add a test case for that. llvm-svn: 206829
* Implement LWG Paper n3887: Consistent Metafunction Aliases. This adds ↵Marshall Clow2014-03-031-0/+7
| | | | | | std::tuple_element_t<> as an alias for tuple_element<>::type. Clean up the synopsis for tuple_element in <utility> as well. llvm-svn: 202673
* Implement LWG issue 2301: Mark std::tie as constexprMarshall Clow2014-02-251-0/+9
| | | | llvm-svn: 202158
* Add license headers to a bunch of libc++ files that were missing them. No ↵Marshall Clow2014-01-163-0/+27
| | | | | | functionality change. Fixes 18291. Thanks to Nico for the bug report and the patch. llvm-svn: 199400
* Found two identical files named 'allocators.h' in the libcxx test suite. ↵Marshall Clow2013-12-0210-183/+9
| | | | | | Moved one to /support, removed the other, and iupdated all the includes. No functionality change llvm-svn: 196127
* Found two identical files named 'DefaultOnly.h' in the libcxx test suite. ↵Marshall Clow2013-12-023-28/+2
| | | | | | Moved one to /support, removed the other, and iupdated all the includes. No functionality change llvm-svn: 196118
* Implement LWG issue 2275 'forward_as_tuple should be constexpr'Marshall Clow2013-10-051-0/+12
| | | | llvm-svn: 192038
* War on tabsHoward Hinnant2013-08-074-10/+10
| | | | llvm-svn: 187906
* Make tuple's constructor and std::get<>(tuple) constexpr. Final stage of ↵Marshall Clow2013-07-2212-1/+204
| | | | | | fixing bug #16599. Thanks to Howard for the review and updates. llvm-svn: 186834
* Implement n3584 - Addressing Tuples by TypeMarshall Clow2013-07-135-0/+152
| | | | llvm-svn: 186237
* Accidentally disallowed explicit tuple conversions when all elements of the ↵Howard Hinnant2013-04-141-0/+9
| | | | | | tuple can be explicitly converted. llvm-svn: 179467
* Give tuple a constexpr default constructor.Howard Hinnant2012-07-061-0/+14
| | | | llvm-svn: 159857
* I believe tuple is still under development in the standard. Daniel Krugler ↵Howard Hinnant2012-04-012-4/+25
| | | | | | is/will be making convincing arguments that a modified form of LWG 2051 (currently NAD Future) is easily acheivable and desirable. He has demonstrated that a tuple<T...> where all of the T are implicitly convertible from U... should have a tuple constructor that is also implicit, instead of explicit. This would support the use cases in LWG 2051 while not undermining T... with explicit conversions from U.... This check-in is an experimental implementation of Daniel's work. I believe this work to be mature enough to warrant inclusion into libc++. If anyone sees real-world problems that this check in causes, please let me know and I will revert it, and provide the feedback to the LWG. llvm-svn: 153855
* tuple was accidentally lacking a valid copy assignment operator. It went ↵Howard Hinnant2012-02-152-2/+2
| | | | | | undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921 llvm-svn: 150613
* LWG 1385 [FCD] tuple_cat should be a single variadic signature ↵Howard Hinnant2010-12-111-15/+90
| | | | | | (http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#1385). This issue is only in Ready status, meaning it is not official, but probably will be this March in Madrid. It was tentatively accepted in Batavia with the previso that Bill and I didn't have any problems implementing it. This is my part of that agreement. llvm-svn: 121619
* LWG 1191Howard Hinnant2010-11-171-0/+30
| | | | llvm-svn: 119545
* LWG 1118Howard Hinnant2010-11-172-41/+31
| | | | llvm-svn: 119541
* license changeHoward Hinnant2010-11-1646-92/+92
| | | | llvm-svn: 119395
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-042-4/+4
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-2210-18/+12
| | | | llvm-svn: 111767
* GB 85, GB 87Howard Hinnant2010-08-191-33/+0
| | | | llvm-svn: 111546
* US 98, US 99Howard Hinnant2010-08-192-21/+72
| | | | llvm-svn: 111542
* [util.smartptr.hash]Howard Hinnant2010-06-031-0/+21
| | | | llvm-svn: 105393
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-1146-46/+46
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-1151-0/+2983
llvm-svn: 103490
OpenPOWER on IntegriCloud