Marshall Clow
071aded6ee
Fixed a typo in the synopsis (noecept -> noexcept). Thanks to Kim for the catch
...
llvm-svn: 293079
2017-01-25 20:14:03 +00:00
Marshall Clow
3cd9e94241
Implement LWG2556: Wide contract for future::share()
...
llvm-svn: 292992
2017-01-24 23:28:25 +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
82ad195ad5
Avoid unused warning in __throw_future_error w/o exceptions enabled
...
llvm-svn: 290479
2016-12-24 01:56:25 +00:00
Marshall Clow
065b3af096
Implement P0516: 'Clarify That shared_future’s Copy Operations have Wide Contracts' which was adopted last week in Issaquah
...
llvm-svn: 286877
2016-11-14 19:58:05 +00:00
Marshall Clow
87f2f1687e
Implement P0510 'Make future_error Constructible' adopted in Issaquah
...
llvm-svn: 286864
2016-11-14 18:56:24 +00:00
Marshall Clow
d437fa5c8c
Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855 .
...
llvm-svn: 279744
2016-08-25 15:09:01 +00:00
Eric Fiselier
eb5cfb02d6
Cleanup non-standard tests as reported by STL@microsoft.com. NFC.
...
This patch addresses the following issues in the test suite:
1. Move "std::bad_array_length" test from std/ to libcxx/ test directory
since the feature is not a part of the standard.
2. Rename "futures.tas" test directory to "futures.task" since that is the
correct stable name.
3. Move tests for "packaged_task<T>::result_type" from std/ to libcxx/
test directory since the typedef is a libc++ extension.
llvm-svn: 271430
2016-06-01 21:05:53 +00:00
Eric Fiselier
5362bbb02a
Mark LWG issue 2276 as complete. Add _LIBCPP_ASSERTS for it
...
llvm-svn: 271247
2016-05-31 01:50:55 +00:00
Marshall Clow
0e1c6c7ed1
Add a couple of _LIBCPP_ASSERT calls. No functional change.
...
llvm-svn: 269663
2016-05-16 16:55:32 +00:00
Evgeniy Stepanov
906c872db9
Cleanup: move visibility/linkage attributes to the first declaration.
...
This change moves visibility attributes from out-of-class method
definitions to in-class declaration. This is needed for a switch to
attribute((internal_linkage)) (see http://reviews.llvm.org/D13925 )
which can only appear on the first declaration.
This change does not touch istream/ostream/streambuf. They are
handled separately in http://reviews.llvm.org/D14409 .
llvm-svn: 252385
2015-11-07 01:22:13 +00:00
Eric Fiselier
2d6c0e79f7
[libcxx] Attempt to fix __throw_future_error in C++03
...
Summary:
Hi Marshall,
Could you please test this patch and see if you run into the same linker errors we talked about?
I can't reproduce on linux or OS X.
Hopefully you can't find any problems and we can fix the C++03 bot.
Reviewers: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D13337
llvm-svn: 249192
2015-10-02 21:25:15 +00:00
Marshall Clow
a0daa7394e
Make a helper routine __throw_future_error, and encapsulate the #ifdef _LIBCPP_NO_EXCEPTIONS there, instead of duplicating it throughout the code. No functionality change
...
llvm-svn: 246772
2015-09-03 15:11:32 +00:00
Marshall Clow
e3ab564e4d
K-ballo pointed out that I missed one of the specializations of packaged_task when I committed r241068. Thanks for the catch.
...
llvm-svn: 241095
2015-06-30 18:28:35 +00:00
Marshall Clow
660dcd9168
Implement LWG#2407: 'packaged_task(allocator_arg_t, const Allocator&, F&&) should neither be constrained nor explicit'
...
llvm-svn: 241068
2015-06-30 14:16:49 +00:00
Eric Fiselier
b3ec43d78a
Fix PR23293 - Do not unlock shared state before notifying consumers.
...
Within the shared state methods do not unlock the lock guards manually. This
could cause a race condition where the shared state is destroyed before the
method is complete.
llvm-svn: 239577
2015-06-12 00:41:34 +00:00
Eric Fiselier
6fe361c1ef
Remove use of _[A-Z] identifiers and poison them to detect usage
...
llvm-svn: 228353
2015-02-05 23:01:40 +00:00
Eric Fiselier
83fb578e4e
Add support for "fancy" pointers to promise and packaged_task.
...
Summary:
This patch is very closely related to D4859. Please see http://reviews.llvm.org/D4859 for more information.
This patch adds support for "fancy" pointers and allocators to promise and packaged_task. The changes made to support this are exactly the same as in D4859.
Test Plan: "fancy" pointer tests were added to each constructor affected by the change.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4862
llvm-svn: 220471
2014-10-23 06:24:45 +00:00
Jonathan Roelofs
afe6794bc2
Address some post-commit review comments on r217261
...
llvm-svn: 217276
2014-09-05 20:28:44 +00:00
Jonathan Roelofs
b3fcc67f8f
Allow libc++ to be built on systems without POSIX threads
...
If you're crazy enough to want this sort of thing, then add
-D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and
--param=additiona_features=libcpp-has-no-threads to your lit commnad line.
http://reviews.llvm.org/D3969
llvm-svn: 217271
2014-09-05 19:45:05 +00:00
Marshall Clow
886c6a645f
Fix PR19819
...
llvm-svn: 205709
2014-04-07 13:32:26 +00:00
Marshall Clow
99c096472d
Better inline marking for __does_policy_contain. Thanks to Chongyu Zhu for the catch
...
llvm-svn: 193963
2013-11-03 22:06:53 +00:00
Marshall Clow
222d1c7f13
Mark __does_policy_contain as 'inline'. Thanks to Chongyu Zhu for the catch
...
llvm-svn: 193962
2013-11-03 20:07:47 +00:00
Marshall Clow
b1915875d0
Fix LWG Issue 2078. Make std::async(policy,...) try multiple policies until one succeeds.
...
llvm-svn: 193960
2013-11-03 15:43:35 +00:00
Marshall Clow
9f21325ac7
Patch from GM to make more implicit bools explicit since we can't stop MSVC warning about this in headers and to warn is the MSVC default. No functionality change.
...
llvm-svn: 192548
2013-10-13 01:02:45 +00:00
Marshall Clow
d58daf9433
LWG Issue 2097: packaged_task constructors should be constrained
...
llvm-svn: 192544
2013-10-12 22:49:17 +00:00
Howard Hinnant
f13cf89df2
Apply LWG 2021. This is only a documentation change. Also bringing c++1y status page up to date.
...
llvm-svn: 191141
2013-09-21 18:17:23 +00:00
Howard Hinnant
3b2d7ee18c
Marshall Clow: LWG Issue 2056: future_errc enums start with value 0 (invalid value for broken_promise).
...
llvm-svn: 190756
2013-09-14 18:20:10 +00:00
Howard Hinnant
f0544c2086
Nico Rieck: this patch series fixes visibility issues on Windows as explained in < http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html >.
...
llvm-svn: 188192
2013-08-12 18:38:34 +00:00
Howard Hinnant
8c9742051d
My previous reorganization of addressof broke -std=c++03. Thanks much to Arnold Schwaighofer for catching this. This patch also catches a few more missing addressof in <future>, thanks go to Zhihao Yuan for catching these.
...
llvm-svn: 187997
2013-08-08 18:38:55 +00:00
Howard Hinnant
3fc9ef22b3
Constrain launch ~ operator to defined bits.
...
llvm-svn: 185452
2013-07-02 18:01:41 +00:00
Howard Hinnant
1836462545
Add operators to make launch a bitmask type. Searched all of the standard, and libc++ to see if this error occurred elsewhere and didn't see any other place. This fixes http://llvm.org/bugs/show_bug.cgi?id=16207
...
llvm-svn: 185265
2013-06-29 18:38:17 +00:00
Howard Hinnant
6e41256f68
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
llvm-svn: 176593
2013-03-06 23:30:19 +00:00
Howard Hinnant
8d3e797444
Donated anonymously: This enables GCC 4.8.0 to build libc++.
...
llvm-svn: 173060
2013-01-21 17:26:55 +00:00
Howard Hinnant
2153d69672
Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934 .
...
llvm-svn: 172456
2013-01-14 20:01:24 +00:00
Howard Hinnant
54d333a601
Rename uses of _ and __ because these are getting stepped on by macros from other system code.
...
llvm-svn: 167038
2012-10-30 19:06:59 +00:00
Argyrios Kyrtzidis
88db3171dd
Don't neglect to "return *this".
...
llvm-svn: 165860
2012-10-13 02:03:45 +00:00
Howard Hinnant
aeb85680fb
Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you send me a patch to CREDITS.TXT?
...
llvm-svn: 163862
2012-09-14 00:39:16 +00:00
Howard Hinnant
9d772d17b3
Apple LWG 2067: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3318.html#2067 . This is the only actionable change that has been made to the C++ draft since C++11. In general it has not been decided exactly how libc++ will track changes made to C++11. New features and design changes will probably be #ifdef'd, especially if they are not backwards compatible. Defects and 'dumb mistakes' are more likely to just be put in. Decisions on telling one from the other will be made on a case by case basis.
...
llvm-svn: 160608
2012-07-21 19:34:12 +00:00
Howard Hinnant
a4820bc4d5
noexcept applied to <future>.
...
llvm-svn: 160607
2012-07-21 17:46:55 +00:00
Howard Hinnant
a960edd203
Fix memory corruption bug found and fixed by Andrew C. Morrow.
...
llvm-svn: 157476
2012-05-25 15:55:46 +00:00
Howard Hinnant
75689c1018
Fix http://llvm.org/bugs/show_bug.cgi?id=11428 . Fix provided by Alberto Ganesh Barbati
...
llvm-svn: 145698
2011-12-02 19:36:40 +00:00
Howard Hinnant
c003db1fca
Further macro protection by replacing _[A-Z] with _[A-Z]p
...
llvm-svn: 145410
2011-11-29 18:15:50 +00:00
Howard Hinnant
073458b1ab
Windows support by Ruben Van Boxem.
...
llvm-svn: 142235
2011-10-17 20:05:10 +00:00
Howard Hinnant
88410049fa
http://llvm.org/bugs/show_bug.cgi?id=10346
...
llvm-svn: 135045
2011-07-13 16:00:50 +00:00
Howard Hinnant
11af28bdbd
Fixing up some ABI issues
...
llvm-svn: 134639
2011-07-07 21:03:52 +00:00
Howard Hinnant
ce48a1137d
_STD -> _VSTD to avoid macro clash on windows
...
llvm-svn: 134190
2011-06-30 21:18:19 +00:00
Howard Hinnant
ce53420e37
Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools.
...
llvm-svn: 133008
2011-06-14 19:58:17 +00:00
Howard Hinnant
3739fe79e5
noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default|
...
llvm-svn: 132261
2011-05-28 14:41:13 +00:00
Howard Hinnant
ec0810e1c8
I had a giant misunderstanding of what 'synchronizes with' meant in [futures.async]/p5. This invalidated the current design of async in <future>. This is a new design, based on my new understanding, which has been confirmed on the lwg mailing list. The summary is that ~future() (and ~shared_future()) will block when they are created from within async, and the thread hasn't finished yet. As part of this work I created two new type traits: __invokable<F, Args...>::value and __invoke_of<F, Args...>::type. These are what result_of<F(Args...)> wanted to be when it grew up, but never will be. __invoke_of is carefully crafted so that it can serve as its own enable_if (type doesn't exist if the signature isn't invokable). All of this work is C++11 only.
...
llvm-svn: 131639
2011-05-19 15:05:04 +00:00