Feature Request: unique_function
Abierto
- Lenguaje dominante
- C++
- Estrellas
- 18.1k
- Forks
- 3.2k
- Merge medio
- 20 h 36 min
- PR fusionados (30 d)
- 1
Descripción
In absl, we already have `absl::bind_front`, which can bind move only objects (`std::unique_ptr` ... ) as parameters, but the `std::function` is limited to be only copy constructable, and thus we can't cast the result of `absl::bind_front(xxx, std::move(some_unique_ptr))` to it.
A move-only function (let's call it `unique_function`) may solve this.
Something like `fu2::unique_function` (https://github.com/Naios/function2 ), and chromium's `OnceCallback` ([https://chromium.googlesource.com/chromium/src.git/+/master/docs/callback.md#oncecallback_and-repeatingcallback]()), would be really nice to have.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.