A possible bug

Ivo Doko ivo.doko@gmail.com
Tue Oct 7 13:55:00 GMT 2014


On 2014-10-07 14:24, Jonathan Wakely wrote:
 > Provide an out-of-class definition.

I've defined other functions (operator>> and operator<<) outside the 
class, but others are tiny, easily inlinable functions for which it 
seems silly to do so.

 > Please read 
https://gcc.gnu.org/wiki/VerboseDiagnostics#missing_static_const_definition
 > more carefully, all the way to the end of that section. Also try
 > reading the http://www.stroustrup.com/bs_faq2.html#in-class page it
 > links to.

I have read both, as well as
https://gcc.gnu.org/onlinedocs/gcc/Static-Definitions.html

The static variables *are* defined (not just declared) - inside the 
class body. The issue was that I was passing them by reference to 
function xorshift_engine::shift, which has been fixed.

But anyway...

On 2014-10-07 14:25, Andrew Haley wrote:
> But really, we are well outside the scope of gcc-help now.

Agreed.



More information about the Gcc-help mailing list