Skip to content

Error when returning Windows.Foundation.Numerics.Rational #1105

@jaigak

Description

@jaigak

When returning a WinRT structure from a method on a runtime class, I seem to get this error:

error C2679: binary '=': no operator found which takes a right-hand operand of type 'winrt::impl::struct_Windows_Foundation_Numerics_Rational' (or there is no acceptable conversion) (compiling source file Numerics.cpp)
message : could be 'winrt::Windows::Foundation::Numerics::Rational &winrt::Windows::Foundation::Numerics::Rational::operator =(winrt::Windows::Foundation::Numerics::Rational &&)' (compiling source file Numerics.cpp)
message : or 'winrt::Windows::Foundation::Numerics::Rational &winrt::Windows::Foundation::Numerics::Rational::operator =(const winrt::Windows::Foundation::Numerics::Rational &)' (compiling source file Numerics.cpp)
message : while trying to match the argument list '(winrt::Windows::Foundation::Numerics::Rational, winrt::impl::struct_Windows_Foundation_Numerics_Rational)' (compiling source file Numerics.cpp)

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