This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A possible bug


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]