[llvm-bugs] [Bug 46663] undefined symbol when a static constexpr field is defined in the class body
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 9 14:45:25 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46663
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Prior to C++17, you need a separate out-of-line definition for the static data
member:
const float C::c;
See
https://en.cppreference.com/w/cpp/language/static#:~:text=definition%20at%20namespace%20scope
for more information.
--
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/20200709/fb1edd70/attachment-0001.html>
More information about the llvm-bugs
mailing list