static validation of closed overrider sets
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by reading the BOOST_OPENMETHOD interface and the project’s compile-time dispatch and ambiguity-checking code; the issue provides no file or test names. Determine how a declared set of overriders could be checked for missing or ambiguous virtual tuples while allowing later specializations, then add coverage for those cases. Done means the compile-time guarantee works for the declared set and the documented limitation for later specializations is clear.
由索引模型根據 Issue 內容生成。
描述
Inspired by https://github.com/Boumg/mini-openmethod.
Many reasonable applications of open-methods require only semi-openness, i.e. the ability to add polymorphic behavior to existing class hierarchies, without the need to specialize existing methods. In that case, the method could optionally specify a set of overriders, which would be checked at compile time for missing or ambiguous virtual tuples. The mechanism could naturally extend BOOST_OPENMETHOD:
BOOST_OPENMETHOD(
poke, (virtual_ptr<Animal>, std::ostream& os), void,
[](virtual_ptr<Cat>, std::ostream& os) {
os << "hiss";
},
[](virtual_ptr<Dog>, std::ostream& os) {
os << "bark";
}
);
User would retain the ability to add specializations afterwards, but then the compile time guarantee would be off.
- 主要語言
- C++
- 星號
- 14
- 分支
- 7
- 平均合併
- 3 天 3 小時
- 30 天內合併 PR
- 15
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
boostorg/openmethod 的其他 Issue
-
enhancement
難度 5/5 一週以上 新手友好度 20/100
boostorg/openmethod#70 ·
維護者通常 1 天內回覆
-
support member functions as overriders可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉enhancement explore
難度 5/5 一週以上 新手友好度 25/100
boostorg/openmethod#53 ·
維護者通常 1 天內回覆
-
enhancement
難度 5/5 一週以上 新手友好度 15/100
boostorg/openmethod#11 ·
維護者通常 1 天內回覆
查看 boostorg/openmethod 的全部 Issue
相似的 Issue
-
agent:WSL code-review linux pri:medium refactoring
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
kind/enhancement
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 82/100
psi29a/d2decomped#691 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
CachyOS/packageinstaller#144 ·
維護者通常 1 天內回覆
-
(S1 - Need confirmation)
難度 2/5 1-3 小時 新手友好度 62/100
CleverRaven/Cataclysm-DDA#89715 ·
維護者通常 1 天內回覆