|
Boost : |
Subject: Re: [boost] [optional] Warnings about uninitialized values
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-06-23 06:47:54
2014-06-23 10:49 GMT+02:00 Andrey Semashev <andrey.semashev_at_[hidden]>:
> On Monday 23 June 2014 12:16:17 you wrote:
> > On Monday 23 June 2014 08:32:59 Adam Romanek wrote:
> >
> > > It turns out that GCC provides a way to silence such warnings
> > > selectively via a #pragma [3]. However, I'm not sure this is the right
> > > way to go.
> >
> > Yes, but I'm hesitant to silence the warning since it may reveal the
> actual
> > problems. I'll have to do that though if there's no other solution.
>
> Unfortunately, a pragma doesn't work in my case - the warning is still
> generated even though I put the pragma before my code that triggers it.
> Wrapping boost::optional definition with it also doesn't work.
>
Does it help if you change:
weekday = date_time::Monday;
to
weekday = make_optional(date_time::Monday);
?
Regards,
&rzej
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk