Re: [Development] static constexpr in exported classes needs out-of-line definitions

2024-01-17 Thread Thiago Macieira
On Wednesday, 17 January 2024 19:35:17 PST Thiago Macieira wrote: > This appears to be a GCC bug/shortcoming. Clang and MSVC apparently > automatically emit and export the variable for you: > https://mingw.godbolt.org/z/q4dYdosjh Reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113465 --

[Development] static constexpr in exported classes needs out-of-line definitions

2024-01-17 Thread Thiago Macieira
See http://bugreports.qt.io/browse/QTBUG-121135 for the issue and https://codereview.qt-project.org/c/qt/qtbase/+/531251 for the solution. TL;DR: if you define a static constexpr (which is implicitly inline) member variable in a class with export macro, you MUST add the definition of tha variabl