|
Boost : |
From: Rob Stewart (stewart_at_[hidden])
Date: 2002-08-02 13:01:33
<200208011237.08625.gregod_at_[hidden]><200208021415.g72EFHO23964_at_[hidden]><OE58ueolj8Jecd92bXC00003baf_at_[hidden]>
<200208021724.g72HOGn21612_at_[hidden]>
<013a01c23a4a$71f9c360$1d00a8c0_at_pdimov2>
X-BeenThere: boost_at_[hidden]
X-Mailman-Version: 2.1b1
Precedence: bulk
Reply-To: boost_at_[hidden]
List-Help: <mailto:boost-request_at_[hidden]?subject=help>
List-Post: <mailto:boost_at_[hidden]>
List-Subscribe: <http://lists.boost.org/mailman/listinfo.cgi/boost>,
<mailto:boost-request_at_[hidden]?subject=subscribe>
List-Id: Boost mailing list <boost.lists.boost.org>
List-Unsubscribe: <http://lists.boost.org/mailman/listinfo.cgi/boost>,
<mailto:boost-request_at_[hidden]?subject=unsubscribe>
List-Archive: http://lists.boost.org/MailArchives/boost/
X-List-Received-Date: Fri, 02 Aug 2002 17:56:06 -0000
From: "Peter Dimov" <pdimov_at_[hidden]>
> From: "Rob Stewart" <stewart_at_[hidden]>
> > From: "William E. Kempf" <williamkempf_at_[hidden]>
> > >
> > > bool b();
> > >
> > > initializes b to false. So I'd think the default ctor should
> initialize
> > > the state to false.
> >
> > That doesn't invoke the default ctor. You'd have to do something like
> this:
> >
> > bool b(bool());
>
> bool b(); // function, no arguments, returns bool
>
> bool b(bool()); // function, one argument bool (*) (), returns bool
Ah, yes. I'd forgotten that.
> bool b = bool(); // value-initialized bool
That's what I should have said knowing that the initializer syntax is
problematic in this respect. Oh well.
> bool b((bool())); // ditto
See, "b((bool()))" is "something like" "b(bool())," like I said. I wasn't
confident that I had the right syntax, so I waffled with "something like." I'd
forgotten the magical incantations since I never do that, so I didn't want to
say anything more than "something like."
Thanks for the clarification.
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk