Skip to content

Bug: avoidable ICE on MSVC v142 and C++20 #1515

@kazssym

Description

@kazssym

Version

No response

Summary

It is known that an ICE occurs here on MSVC v142 with /std:c++20. I found it can be easily avoided by storing those error objects in temporary variables before calling to_abi().

It is not a critical issue any longer but I am reporting it here for the record.

return hresult_out_of_bounds(to_hstring(e.what())).to_abi();

Reproducible example

#include <winrt/base.h>

Expected behavior

No response

Actual behavior

ICE in the header.

Additional comments

No response

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