[llvm-bugs] [Bug 26927] constexpr __FUNCTION__, __func__, and __PRETTY_FUNCTION__
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 1 14:46:09 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=26927
Tyker <Tyker1 at outlook.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Tyker1 at outlook.com
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Tyker <Tyker1 at outlook.com> ---
the problem is not that __PRETTY_FUNCTION__ can't be used in constant
expressions, but that __PRETTY_FUNCTION__ is an array of char and not const
char*.
void func() {
static constexpr auto p = __PRETTY_FUNCTION__;
}
works fine.
https://godbolt.org/z/bEW6JS
--
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/20191001/08351e93/attachment.html>
More information about the llvm-bugs
mailing list