mono/CppSharp

Method with std::function parameter is not generated

dcsoft4 opened this issue · 1 comments

Brief Description

Creating a C# wrapper for this CPP class fails to generate the async_read method.

namespace foo
{
    enum class ErrorCode : int
    {
        Success = 0,
        IncompleteTransfer = 1,
        BufferTooBig = 2,
        Disconnect = 3,
    };

    /// A Buffer holds a single message to be written or being read.
    using Buffer = std::vector<uint8_t>;

    using ReadCompletionHandler = std::function<void(ErrorCode, const Buffer &)>;

    class Bar
    {
    public:
        void async_read(const ReadCompletionHandler &handler);

    private:
        Buffer _buffer;
    };
}

OS: Windows 11 22H2
CppSharp version: 1.1.5.3168

Used settings

Target: MSVC

Other settings

Stack trace or incompilable generated code

It runs without error but the Foo.cs output doesn't have the method.
Full Visual Studio solution and output is in the next comment.