mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
Implement LWG2556: Wide contract for future::share()
llvm-svn: 292992
This commit is contained in:
parent
73edb6d0cc
commit
3cd9e94241
@ -156,7 +156,7 @@ public:
|
||||
~future();
|
||||
future& operator=(const future& rhs) = delete;
|
||||
future& operator=(future&&) noexcept;
|
||||
shared_future<R> share();
|
||||
shared_future<R> share() noecept;
|
||||
|
||||
// retrieving the value
|
||||
R get();
|
||||
@ -183,7 +183,7 @@ public:
|
||||
~future();
|
||||
future& operator=(const future& rhs) = delete;
|
||||
future& operator=(future&&) noexcept;
|
||||
shared_future<R&> share();
|
||||
shared_future<R&> share() noexcept;
|
||||
|
||||
// retrieving the value
|
||||
R& get();
|
||||
@ -210,7 +210,7 @@ public:
|
||||
~future();
|
||||
future& operator=(const future& rhs) = delete;
|
||||
future& operator=(future&&) noexcept;
|
||||
shared_future<void> share();
|
||||
shared_future<void> share() noexcept;
|
||||
|
||||
// retrieving the value
|
||||
void get();
|
||||
@ -1119,7 +1119,7 @@ public:
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
~future();
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
shared_future<_Rp> share();
|
||||
shared_future<_Rp> share() _NOEXCEPT;
|
||||
|
||||
// retrieving the value
|
||||
_Rp get();
|
||||
@ -1222,7 +1222,7 @@ public:
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
~future();
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
shared_future<_Rp&> share();
|
||||
shared_future<_Rp&> share() _NOEXCEPT;
|
||||
|
||||
// retrieving the value
|
||||
_Rp& get();
|
||||
@ -1320,7 +1320,7 @@ public:
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
~future();
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
shared_future<void> share();
|
||||
shared_future<void> share() _NOEXCEPT;
|
||||
|
||||
// retrieving the value
|
||||
void get();
|
||||
@ -2580,7 +2580,7 @@ swap(shared_future<_Rp>& __x, shared_future<_Rp>& __y) _NOEXCEPT
|
||||
template <class _Rp>
|
||||
inline
|
||||
shared_future<_Rp>
|
||||
future<_Rp>::share()
|
||||
future<_Rp>::share() _NOEXCEPT
|
||||
{
|
||||
return shared_future<_Rp>(_VSTD::move(*this));
|
||||
}
|
||||
@ -2588,7 +2588,7 @@ future<_Rp>::share()
|
||||
template <class _Rp>
|
||||
inline
|
||||
shared_future<_Rp&>
|
||||
future<_Rp&>::share()
|
||||
future<_Rp&>::share() _NOEXCEPT
|
||||
{
|
||||
return shared_future<_Rp&>(_VSTD::move(*this));
|
||||
}
|
||||
@ -2597,7 +2597,7 @@ future<_Rp&>::share()
|
||||
|
||||
inline
|
||||
shared_future<void>
|
||||
future<void>::share()
|
||||
future<void>::share() _NOEXCEPT
|
||||
{
|
||||
return shared_future<void>(_VSTD::move(*this));
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ int main()
|
||||
typedef int T;
|
||||
std::promise<T> p;
|
||||
std::future<T> f0 = p.get_future();
|
||||
static_assert( noexcept(f0.share()), "");
|
||||
std::shared_future<T> f = std::move(f0.share());
|
||||
assert(!f0.valid());
|
||||
assert(f.valid());
|
||||
@ -32,6 +33,7 @@ int main()
|
||||
{
|
||||
typedef int T;
|
||||
std::future<T> f0;
|
||||
static_assert( noexcept(f0.share()), "");
|
||||
std::shared_future<T> f = std::move(f0.share());
|
||||
assert(!f0.valid());
|
||||
assert(!f.valid());
|
||||
@ -40,6 +42,7 @@ int main()
|
||||
typedef int& T;
|
||||
std::promise<T> p;
|
||||
std::future<T> f0 = p.get_future();
|
||||
static_assert( noexcept(f0.share()), "");
|
||||
std::shared_future<T> f = std::move(f0.share());
|
||||
assert(!f0.valid());
|
||||
assert(f.valid());
|
||||
@ -47,6 +50,7 @@ int main()
|
||||
{
|
||||
typedef int& T;
|
||||
std::future<T> f0;
|
||||
static_assert( noexcept(f0.share()), "");
|
||||
std::shared_future<T> f = std::move(f0.share());
|
||||
assert(!f0.valid());
|
||||
assert(!f.valid());
|
||||
@ -55,6 +59,7 @@ int main()
|
||||
typedef void T;
|
||||
std::promise<T> p;
|
||||
std::future<T> f0 = p.get_future();
|
||||
static_assert( noexcept(f0.share()), "");
|
||||
std::shared_future<T> f = std::move(f0.share());
|
||||
assert(!f0.valid());
|
||||
assert(f.valid());
|
||||
@ -62,6 +67,7 @@ int main()
|
||||
{
|
||||
typedef void T;
|
||||
std::future<T> f0;
|
||||
static_assert( noexcept(f0.share()), "");
|
||||
std::shared_future<T> f = std::move(f0.share());
|
||||
assert(!f0.valid());
|
||||
assert(!f.valid());
|
||||
|
@ -356,7 +356,7 @@
|
||||
<tr><td><a href="http://wg21.link/LWG2540">2540</a></td><td>unordered_multimap::insert hint iterator</td><td>Issaquah</td><td>Complete</td></tr>
|
||||
<tr><td><a href="http://wg21.link/LWG2543">2543</a></td><td>LWG 2148 (hash support for enum types) seems under-specified</td><td>Issaquah</td><td>Complete</td></tr>
|
||||
<tr><td><a href="http://wg21.link/LWG2544">2544</a></td><td>istreambuf_iterator(basic_streambuf<charT, traits>* s) effects unclear when s is 0</td><td>Issaquah</td><td>Complete</td></tr>
|
||||
<tr><td><a href="http://wg21.link/LWG2556">2556</a></td><td>Wide contract for future::share()</td><td>Issaquah</td><td>Patch ready</td></tr>
|
||||
<tr><td><a href="http://wg21.link/LWG2556">2556</a></td><td>Wide contract for future::share()</td><td>Issaquah</td><td>Complete</td></tr>
|
||||
<tr><td><a href="http://wg21.link/LWG2562">2562</a></td><td>Consistent total ordering of pointers by comparison functors</td><td>Issaquah</td><td></td></tr>
|
||||
<tr><td><a href="http://wg21.link/LWG2567">2567</a></td><td>Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits</td><td>Issaquah</td><td>Complete</td></tr>
|
||||
<tr><td><a href="http://wg21.link/LWG2568">2568</a></td><td>[fund.ts.v2] Specification of logical operator traits uses BaseCharacteristic, which is defined only for UnaryTypeTraits and BinaryTypeTraits</td><td>Issaquah</td><td></td></tr>
|
||||
|
Loading…
Reference in New Issue
Block a user