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

Richard Smith <richard-l...@metafoo.co.uk> changed:

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

--- Comment #1 from Richard Smith <richard-l...@metafoo.co.uk> ---
GCC bug. The code is valid.

Apparently GCC is confused by the 'auto', and rejects the mismatch of types
'const A::B' vs 'const auto', rather than checking the types match after
deduction.

MSVC appears to have the same bug as GCC.

ICC also appears to have the same bug. It also has a bug where it doesn't allow
'constexpr' to be added in the definition.


Simpler testcase:

extern int a;
auto a = 0;

This is incorrectly rejected by MSVC and GCC. But ICC accepts this one. *shrug*

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to