Skip to content

Structures that use IReference generated in alphabetical order instead of topological order #1049

@cosmin42

Description

@cosmin42

I modified a test to reproduce this issue
test_component.txt - please rename it .txt -> .idl , it is the correspondent to this file https://github.com/microsoft/cppwinrt/blob/master/test/test_component/test_component.idl

The problem:
The below structures cannot be built, the compiler yelds error C2139: 'winrt::test_component::B': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_trivially_destructible' (compiling source file Simple.cpp)

Swapping the names (A <-> B) solves the problem.

    struct B
    {
        Single a1;
        Windows.Foundation.IReference<Single> a2;
    };

    struct A
    {
        Windows.Foundation.IReference<B> a1;
    };

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