Compiler version

Tomaz Canabrava tcanabrava at kde.org
Thu Jun 28 17:37:14 BST 2012


On Thu, Jun 28, 2012 at 1:09 PM, Rolf Eike Beer
<kde at opensource.sf-tec.de> wrote:
> Am Donnerstag, 28. Juni 2012, 10:20:42 schrieb Thiago Macieira:
>> On quinta-feira, 28 de junho de 2012 10.14.03, Ivan Cukic wrote:
>> > Well, nullptr is a compile time check, right (like explicit override)? So,
>> > you  compile your code with a compiler that supports it, making your code
>> > safe in that aspect, while someone could still compile the code with an
>> > older compiler.
>>
>> Qt 5 has Q_NULLPTR that expands to nullptr on C++11 and 0 otherwise.
>
> Is there any chance that these macros will find their way into Qt4? I don't
> mean that they should be used by Qt itself everywhere (or at all), but
> providing them would allow an easy forward-compatible way of introducing this
> stuff. That may not really help for KDE (or we need to require 4.8.3 or need to
> ship them ourself) but for other stuff out there this would be an improvement
> that you basically get for free.
>
> Eike

That'd be hard, since there's no Qt 4.9 planned, but a simple macro
that won't break stuff can be made on KDE api to define Q_NULLPTR (
implications? ) when it's doesn't exists.
Thiago, on C++ 0 and (void*) 0 are the same thing? I know that on C
they aren't, and I didn't found the information easily on the web.

Tomaz




More information about the kde-core-devel mailing list