[Interest] Why QString and not std::string?
Till Oliver Knoll
till.oliver.knoll at gmail.com
Fri Jun 15 17:06:36 CEST 2012
2012/6/15 Paul Miller <paul at fxtech.com>:
>>> ...
>>> QString::number(x)
>>
>> static_cast<ostringstream*>(&(ostringstream()<< x ) )->str();
>
> I just threw up a little in my mouth.
>
> I'll take QString::number(x), thank you.
Hehe, thanks for the chuckle, I was just about to write a similar story ;)
In fact, I'll prefer anytime the Qt equivalent to any << c++11<cast
foo>(_std_api).STL_there_is<<42_because&(it'\\s_easier_to_read (same
goes for boost - sorry), even if I loose 10% of performance, but gain
just 11% of readability and ease of use!
Cheers, Oliver
More information about the Interest
mailing list