Commit f6341d8d by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/51617 ([C++0x] async(f) isn't.)

	PR libstdc++/51617
	* include/std/future (async): Change default policy to launch::async.

From-SVN: r222793
parent 417402b8
2015-05-02 Jonathan Wakely <jwakely@redhat.com> 2015-05-02 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/51617
* include/std/future (async): Change default policy to launch::async.
* include/experimental/any (any::_Storage): Fix alignment of buffer. * include/experimental/any (any::_Storage): Fix alignment of buffer.
(any::_Internal): Check alignment of type. (any::_Internal): Check alignment of type.
* testsuite/experimental/any/cons/aligned.cc: New. * testsuite/experimental/any/cons/aligned.cc: New.
......
...@@ -1704,7 +1704,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1704,7 +1704,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ {
typedef typename result_of<_Fn(_Args...)>::type result_type; typedef typename result_of<_Fn(_Args...)>::type result_type;
std::shared_ptr<__future_base::_State_base> __state; std::shared_ptr<__future_base::_State_base> __state;
if ((__policy & (launch::async|launch::deferred)) == launch::async) if ((__policy & launch::async) == launch::async)
{ {
__state = __future_base::_S_make_async_state(std::__bind_simple( __state = __future_base::_S_make_async_state(std::__bind_simple(
std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)); std::forward<_Fn>(__fn), std::forward<_Args>(__args)...));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment