[Bug c++/78470] static class member cannot be reference by algorithm functions with -O0 option

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 22 13:55:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78470

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |trippels at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Yes, this is expected. You can either use -std=c++1z.
Otherwise, if a constexpr static data member is odr-used, a definition at
namespace scope is required.


More information about the Gcc-bugs mailing list