Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use optional static polymorphism instead of direct inheritance from interface #75

Open
Konard opened this issue Aug 14, 2022 · 7 comments

Comments

@Konard
Copy link
Member

Konard commented Aug 14, 2022

template <typename TElement> class ArrayMemory<TElement> : public IArrayMemory<TElement>

9519D724-7DAB-4E4F-9B4D-20B2EB432D38
This is only an example, we should use new style in all code files.

@uselessgoddess
Copy link
Member

Why is static polymorphism here?

@Konard
Copy link
Member Author

Konard commented Aug 14, 2022

@uselessgoddess because we already use it in other repositories.

@uselessgoddess
Copy link
Member

Ok, bro

@uselessgoddess
Copy link
Member

Can I see link to small example of usage it

@uselessgoddess
Copy link
Member

But... dynamic polymorphism it is:

DynType = x

but not:

DynType<Generic1, Generic2, ...> = x

@Konard
Copy link
Member Author

Konard commented Aug 14, 2022

Dynamic polymorphism is

Doublets::ILinks<LinksOptionsType> storage = UnitedMemoryLinks<…>;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants