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

using std::string ignored with latest version #67

Open
peremato opened this issue Nov 18, 2024 · 0 comments
Open

using std::string ignored with latest version #67

peremato opened this issue Nov 18, 2024 · 0 comments

Comments

@peremato
Copy link
Contributor

Hi Philippe. I have tried with WrapIt.jl and I get the problem that the statement using std::string is ignored when generating the wrapper code. The following example does not generate the wrapper for the constructor nor the method str.

#include <string>

using std::string;
class MyClass {
public:
    MyClass(const string& str) : m_str(str) {}
    string str() const { return m_str; }
private:
    string m_str;
};

These are log messages with v=5

...
MyClass, arg 1 type: const string &
register_type(const string &), type of kind LValueReference.
find_base_type_definition_(): type0.kind = Invalid => failed
Calling get_min_required_args(MyClass) from get_min_required_args, cusor location: ./mystring.h:6:5
visit_function_arg_and_return_types(MyClass) -> min_args = 1
Info name mapping: no name customization for MyClass::MyClass, standard naming rules will be used.
Warning: missing definition of type  const string & to define wrapper for void MyClass::MyClass(const string &)
fromMainFiles(str) -> 1 (file defined in /Users/mato/Development/PYTHIA8.jl/test/mystring.h)
visiting ./mystring.h:7:12       cursor str of kind CXXMethod, type string () const, and access public, and type access invalid
visit_member_function(str)
is_method_deleted(str), cursor location: ./mystring.h:7:12
-> is not deleted
Info name mapping: no name customization for MyClass::str, standard naming rules will be used.
in_veto_list(string MyClass::str()) -> 0
str, return type: string
register_type(string), type of kind Elaborated.
find_base_type_definition_(): type0.kind = Invalid => failed
Calling get_min_required_args(str) from get_min_required_args, cusor location: ./mystring.h:7:12
visit_function_arg_and_return_types(str) -> min_args = 0
Info name mapping: no name customization for MyClass::str, standard naming rules will be used.
Warning: missing definition of type  string to define wrapper for string MyClass::str()
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