abseil / abseil/abseil-cpp

Feature Request: unique_function

オープン
#763 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
18.1k
フォーク
3.2k
平均マージ
20時間 36分
マージ済み PR(30日)
1

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。