Skip to content

Put friend keyword first #37

@Wizzard033

Description

@Wizzard033

I am currently trying to use Swig to bind TGUI to Lua. However, they make a statement that Swig does not recognize "non-conventional type declarations."[1] In SharedWidgetPtr.hpp, I have to change the friend keyword to be placed before the return type. If this is not done, I get that a syntax error is in your header file. I think swapping the location of the friend keyword is a really simple change. Thanks.

bool friend operator ==(const SharedWidgetPtr<T>& left, const U* right) // Error
friend bool operator ==(const SharedWidgetPtr<T>& left, const U* right) // OK

[1] http://www.swig.org/Doc3.0/SWIG.html#SWIG_nn8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions