[llvm-bugs] [Bug 44677] Concept diagnostics in combination with inheritance are applied at the wrong place/time

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 11 16:15:14 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=44677

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
The diagnostics here are correct. Line 12:

  using DBi = Derived<Bi>; // Should be an error

... is valid. The compiler is not permitted to instantiate Derived<Bi> here,
because a complete type is not required. So there's no way to know that this
instantiation would end up being ill-formed. Derived<Bi> is only instantiated
on line 16:

  DBi dbi; // note - should be error

... because this line requires DBi to be a complete type. So that's why the
note points here.

If you want better diagnostics here, you can require the template parameter of
Derived to be Integral too: https://godbolt.org/z/f7zhqz

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201011/a8da362c/attachment.html>


More information about the llvm-bugs mailing list