$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [optional] Warnings about uninitialized values
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-06-23 07:47:52
On Monday 23 June 2014 12:47:54 Andrzej Krzemienski wrote:
> 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);
>
>
> ?
Yes, looks like it does. It's rather tedious since every such assignment has
to be changed.