Skip to content

Value types do not generate a default constructor #1777

@Saalvage

Description

@Saalvage

The following code:

CS_VALUE_TYPE class DLL_API value_type {
public:
    std::string string_member;
};

does not generate a default constructor on the C# side of things, meaning it is impossible to initialize the object correctly and causing uninitialized memory reads after a write.

See #1730 for usecase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions