[Development] QOptional
Marc Mutz
marc.mutz at kdab.com
Thu Aug 21 17:16:52 CEST 2014
On Thursday 21 August 2014 16:52:05 Thiago Macieira wrote:
> But I'd like QOptional<QString> o = QString() result in a null
> (disengaged) QOptional too.
Too clever for a general optional class, IMO:
QOptional<QString> qs = QString();
QOptional<std::string> ss = std::string();
qs will be disengaged and ss will be engaged. Hard to explain in the docs.
Impossible to anticipate for new users of the class. Death row for template
code.
--
Qt Developer Days 2014 - October 6 - 8 at BCC, Berlin
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
More information about the Development
mailing list