asio-tr2 icon indicating copy to clipboard operation
asio-tr2 copied to clipboard

[async.use.future.cons] use_future_t doesn't allow its allocator to throw

Open jwakely opened this issue 9 years ago • 1 comments

[async.use.future.cons] says the default constructor is noexcept, but allocators are allowed to throw in their default ctor (see LWG 2455).

Currently if the allocator throws it would terminate, so if that's not acceptable then you could add a Requires saying the allocator constructor must not throw, or follow LWG 2455 and make it noexcept(noexcept(allocator_type())).

jwakely avatar Oct 06 '15 13:10 jwakely

Applied suggested noexcept(...) fix in b6d224df87d6ad4f887fc6202dd5ecc19b96497f.

chriskohlhoff avatar Oct 06 '15 20:10 chriskohlhoff