[Development] Question about QCoreApplicationData::*_libpaths

Milian Wolff milian.wolff at kdab.com
Thu Jan 21 21:09:20 CET 2016


On Donnerstag, 21. Januar 2016 07:25:21 CET André Somers wrote:
> Op 21/01/2016 om 05:35 schreef Thiago Macieira:
> > On Thursday 21 January 2016 05:27:50 Kevin Kofler wrote:
> >> Thiago Macieira wrote:
> >>> The copy constructor is called once, then the move constructor. If
> >>> value_type's move constructor is not noexcept, then it may throw after
> >>> the
> >>> container resized.
> >> 
> >> Throwing an exception in a move constructor is really, really horrible. I
> >> can see why a copy constructor would throw (out of memory, failure to
> >> duplicate some other resource), but a move?
> > 
> > Indeed.
> > 
> > But the class in question may not have a move constructor. In the absence
> > of one, the copy constructor gets called.
> 
> I generally don't care. If I can't copy anymore due to running out of
> memory, I'm pretty much done anyway. No reliable way to recover from
> that. Might as well terminate the program.

Right, _you_ don't care. But as a library one cannot usually make such claims. 
People may want to use it in conditions where they _do_ care, and for good 
reason. It would be a shame if C++ would not be applicable for such scenarios 
just because some people didn't care enough.

Cheers

-- 
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5903 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160121/681df1df/attachment.bin>


More information about the Development mailing list