Skip to content

Bad template resolution for operator overloads #7325

@Fletterio

Description

@Fletterio

Here's a godbolt showcasing the problem: https://godbolt.org/z/1j1EPbfos

As you can see in it, the templated operator() fails to resolve correctly when I is Bar<SomeCondition> for the struct Foo<Bar<SomeCondition>>. It works if you provide an explicit, non-templated version where the argument is exactly Bar<SomeCondition>, as you can see by uncommenting the commented method. Also, the problem is explicitly with operators, as the method baz resolves just fine when I is Bar<SomeCondition>. This works as one would expect in CPP: https://godbolt.org/z/efrY14hW8

This issue affects both DXIL and SPIR-V targets

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashhlsl2021Pertaining to HLSL2021 features

    Type

    No type

    Projects

    Status

    Triaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions