https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118798

            Bug ID: 118798
           Summary: Ambiguous mangling of NTTP pointers to polymorphic
                    objects
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marco.rubini08 at gmail dot com
  Target Milestone: ---

See the code in https://godbolt.org/z/hcrzPorK3
Copy pasted for convenience:
```
struct A {};
struct B : A {};

template<A const* a>
int foo() { return 1; }

template<B const* b>
int foo() { return 2; }

extern B b;

constexpr A const* getb() {
    return &b;
}

auto g = foo<getb()>;
auto h = foo<&b>;

```
  • [Bug c++/118798] New: Ambiguo... marco.rubini08 at gmail dot com via Gcc-bugs

Reply via email to