On Aug 21, 2014, at 5:16 PM, Marc Mutz <[email protected]> wrote:

> 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.

Why would that be?
The optional got a QString value assigned. It shouldn’t care about more.

> 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.

I agree.

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin. Registergericht: Amtsgericht Charlottenburg, HRB 
144331 B 

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to