static validation of closed overrider sets
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C++
- Stars
- 14
- Forks
- 7
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 15
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/openmethod
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
boostorg/openmethod#70 ·
Maintainers usually reply within 1 day
-
support member functions as overridersPossibly taken A pull request linked to this issue is open or already merged. Openenhancement explore
Difficulty 5/5 Over a week Newbie friendliness 25/100
boostorg/openmethod#53 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
boostorg/openmethod#11 ·
Maintainers usually reply within 1 day
All issues in boostorg/openmethod
Similar issues
-
agent:WSL code-review linux pri:medium refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
psi29a/d2decomped#691 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CachyOS/packageinstaller#144 ·
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CleverRaven/Cataclysm-DDA#89715 ·
Maintainers usually reply within 1 day