[Development] Question about QCoreApplicationData::*_libpaths

Marc Mutz marc.mutz at kdab.com
Tue Jan 5 17:56:18 CET 2016


On Tuesday 05 January 2016 15:15:52 Mathias Hasselmann wrote:
> Am 05.01.2016 um 14:41 schrieb Thiago Macieira:
> > On Tuesday 05 January 2016 15:37:51 Marc Mutz wrote:
> >> On Tuesday 05 January 2016 12:56:55 Ulf Hermann wrote:
> >>> avoid paying the price of constructing a QStringList if they are
> >>> unused.
> >> 
> >> That's what I was wondering about: constructing a QStringList is just a
> >> copy of a pointer, and while not totally free, it is next to nothing
> >> compared to the additional heap allocation of a new'ed QStringList...
> > 
> > It's still a good enough trade-off, considering we'd need to keep a bool
> > elsewhere.
> > 
> >> (we need std::optional :)
> > 
> > Aye.
> 
> What speaks against shipping a copy of std(::experimental)::optional and
> using that one when the configure script notices std::optional not being
> available yet? How about letting qmake picking the right std::optional
> when configuring a project?

At least two things:

1. We'd need to rename the copy, and how, without requiring template aliases,
   would we then use one or the other (if we don't rename, we'll run afoul of
   the ODR)
2. The implementation may require features we don't require, yet.

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list