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

[BUG]: support wrapping template specializations #217

Open
virtuald opened this issue Oct 22, 2023 · 0 comments
Open

[BUG]: support wrapping template specializations #217

virtuald opened this issue Oct 22, 2023 · 0 comments

Comments

@virtuald
Copy link
Member

Problem description

Going to ignore these for now since it causes issues and it'll be annoying to address, but here's what needs to be done?

  • needs to include __classname.hpp
  • use bind___classname(m, name) as a member variable
  • from it's bind__classname_specialization needs to call the bind___classname methods in addition to doing whatever binding it needs to do
  • require 'rename' (generate an auto name in create-gen?)

The example below breaks by overwriting the original template class .hpp

Operating System

Linux

Installed Python Packages

No response

Reproducible example code

#pragma once

// basic template
template <typename T>
struct TBasic
{
    virtual ~TBasic() {}

    T getT() { return t; }
    virtual void setT(const T &t) { this->t = t; }

    T t;
};

// basic specialization
// - TODO: ignored for now since this is annoying
template <>
struct TBasic<int> {
    int add5() { return t + 5; }
};
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