Naios / function2

Improved and configurable drop-in replacement to std::function that supports move only types, multiple overloads and more
http://naios.github.io/function2
Boost Software License 1.0
539 stars 47 forks source link

supports uses-allocator construction #61

Closed feverzsj closed 6 months ago

feverzsj commented 6 months ago

@Naios

uses-allocator construction

Seems all it needed is specializing std::uses_allocator<T, Alloc>.

Naios commented 6 months ago

Hi, yes seems like it. Could you provide the specialization through a PR?

A specialization for the class function in fu2::detail should be sufficient:

template <typename Config, bool IsThrowing, bool HasStrongExceptGuarantee,
          typename... Args>
class function<Config, property<IsThrowing, HasStrongExceptGuarantee, Args...>>
Naios commented 6 months ago

Fixed in https://github.com/Naios/function2/pull/62