This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: A possible bug
- From: Ivo Doko <ivo dot doko at gmail dot com>
- To: Andrew Haley <aph at redhat dot com>, Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 07 Oct 2014 15:54:38 +0200
- Subject: Re: A possible bug
- Authentication-results: sourceware.org; auth=none
- References: <54337368 dot 4070407 at gmail dot com> <CAH6eHdRAzuo-dDSft17N04nmw=Ne2ydhp1_bxzReric2ce3j2A at mail dot gmail dot com> <5433B232 dot 6070401 at gmail dot com> <CAH6eHdRYTd77yqFWg2mWOFFdwNp9+8L087VNnBWnnz3zCkUn_w at mail dot gmail dot com> <5433D2D3 dot 4040300 at gmail dot com> <5433DBB1 dot 2040504 at redhat dot com>
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.