chriskohlhoff / asio-tr2

C++ TR2 proposal based on Asio
17 stars 5 forks source link

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

Open jwakely opened 8 years ago

jwakely commented 8 years ago

[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())).

chriskohlhoff commented 8 years ago

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