[Bug c++/59211] init_priority doesn't work with constant expressions
nyh at math dot technion.ac.il
gcc-bugzilla@gcc.gnu.org
Wed Nov 20 16:00:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59211
--- Comment #2 from Nadav Har'El <nyh at math dot technion.ac.il> ---
Amazing, this workaround indeed works :-) Thanks!
With the constexpr prio, indeed using prio+0 solved the problem.
For the enum class, prio::second, I can't use addition (because it isn't
implemented in this class), but a simple cast to int works!
__attribute__((init_priority((int)init_prio::second)))
More information about the Gcc-bugs
mailing list