[Dune] dune-grid r4390 - trunk/grid/alugrid/3d
Martin Nolte
nolte at mathematik.uni-freiburg.de
Wed Sep 17 13:48:47 CEST 2008
Hi Dune,
I don't see any advantage in this proposal. The world nullptr is just a
suggestion and might change in the future. This could mean that we always have
to provide a macro. Moreover, the casts would still have to be added, since
even (void*)0 does not cast into MyPointer* automatically.
I think we should wait at least until gcc incorporates such a keyword into
-std=c++0x. But even then, users will likely use older compilers and we have
to remain compatible with them, meaning we still might have to cast.
By the way: Calling a constructor like pair< A*, int >( nullptr, -1 ) is a bad
idea anyway because the argument types are template parameters.
Cheers,
Martin
Christian Engwer wrote:
> On Wed, Sep 17, 2008 at 11:04:20AM +0200, Oliver Sander wrote:
>> Hi Dune!
>> Apparently, the official C++0x solution for this problem is the use of
>> the new nullptr keyword. see
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
>>
>> Maybe we should anticipate that somehow.
>
> It would be easy to provide a
> #define nullptr 0
> if the nullptr keyword is not known to the compiler.
>
> Opinons?
>
> Cheers
> Christian
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
--
Martin Nolte <nolte at mathematik.uni-freiburg.de>
Universität Freiburg phone: +49-761-203-5642
Abteilung für angewandte Mathematik fax: +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany
More information about the Dune
mailing list