linksplatform / linksplatform/Delegates
Call methods in derived class
Open
Nobody has claimed this yet.
bug
good first issue
- Dominant language
- C++
- Stars
- 4
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Use static_cast to resolve this problem
https://github.com/linksplatform/Delegates/blob/77ae748e3ac057d15122bed761126097901f05ea/cpp/Platform.Delegates/Platform.Delegates.Delegate.h#L35-L36
struct base
{
void foo() { std::cout << "foo"; }
};
struct derived : public base {};
auto object = std::make_shared<derived>();
auto delegate = Platform::Delegates::Delegate((std::shared_ptr<base>)object, &derived::foo);
delegate();
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with cpp/Platform.Delegates/Platform.Delegates.Delegate.h at lines 35-36 and reproduce the provided base/derived example. Inspect how the delegate handles the member-function pointer; done means the example compiles and delegate() invokes derived::foo as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100