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

Under new metaclass format, no way to __generate base classes #51

Open
drec357 opened this issue Nov 21, 2018 · 0 comments
Open

Under new metaclass format, no way to __generate base classes #51

drec357 opened this issue Nov 21, 2018 · 0 comments

Comments

@drec357
Copy link

drec357 commented Nov 21, 2018

I gather you are experimenting with defining metaclasses via a constexpr function, and relying on the user to __generate members via that function. I like it, it's more straightforward to do powerful manipulations, but the problem is there is nowhere to __generate base classes, and so the user-specified bases are being omitted from the outputted class instance.

//Given an "interface" metaclass definition:
template constexpr void interface(T source) { ... }
//...and an interface instance with a base class:
class(interface) Rectangle : public Shape { ... }
//...the following test will fail:
static_assert(std::is_base_of<Shape, Rectangle>::value, "Base class lost in meta-processing!");

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

1 participant