Skip to content

Should CS_OUT std::string work? #263

Open
@tomspilman

Description

@tomspilman

I just tried to do this...

void MyFunction(CS_OUT std::string &outString);

... it results in the following binding with an error:

public void MyFunction(out Std.String outString)
{
   var arg0 = new Std.String();
   Internal.MyFunction_0(arg0); // ERROR: cannot convert from 'Std.String' to 'System.IntPtr'
   outString = arg0;
}

That seems like it should be supported.

Is the bug in the the Std.String implementation not having a System.IntPtr cast?

Second question... why not have it generate the function with string instead and only use Std.String for the conversion? Like this...

public void MyFunction(out string outString)
{
   var arg0 = new Std.String();
   Internal.MyFunction_0(arg0);
   outString = arg0;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions