[llvm-bugs] [Bug 42354] declaring a function with a computed typedef is confused as a data member by definition
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 21 11:45:06 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42354
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This program violates [temp.spec]/8:
"""
If a function declaration acquired its function type through a dependent type
(13.7.2.1) without using the syntactic form of a function declarator, the
program is ill-formed.
"""
The SHOW_ERROR case is ill-formed because it declares 'heck' with a dependent
type that is not non-dependently a function type. (Put another way, the
determination of whether a member-declaration declares a data member or a
member function is (permitted to be) made statically when processing the
template definition rather than when analyzing a particular instantiation, and
a declared member is only a member function if the non-dependent portion of the
type has a top-level function declarator.)
So I think this is not a bug.
--
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/20190621/3d3e2100/attachment.html>
More information about the llvm-bugs
mailing list