[Dune-devel] [Dune-Commit] [Commit] dune-istl - dd52b1e: [cleanup] Replace dune_static_assert by C++11 static_assert.

Martin Nolte nolte at mathematik.uni-freiburg.de
Wed Feb 26 21:20:20 CET 2014


Hi all,

Christian is right: I do not think this move very wise in the core modules right 
now. Dropping the backwards our fallback implementations is one thing, enforcing 
the new standard is another. Depriving our users of the possibility to use their 
own fallback implementation will have an impact on the usability of officially 
unsupported compilers (icpc, xlc, Visual C++). I do doubt that this is a good idea.

On the other hand, I learn something new about C++11 every day. The new features 
do make our lives a lot easier (e.g., variadic template, auto, range-based for, 
constexpr, final, ...) and we should support their use whereever possible. Note 
that I did not mean to actually use them in the core modules themselves, if this 
endangers compatiblity. Using, e.g., DUNE_FINAL or DUNE_CONSTEXPR is fine, 
though. I also admit that I do like to write my grid traversals as

for( const Entity &entity : entities< 0 >( gridView ) ) { /* ... */ }

Such utilities can (and should) be provided without introducing incompatibility 
to older compilers, unless the user actually writes the above statement 
(somewhere in FlySpray I also provided a fallback implementation of a 
range-based for compatible with gcc-4.3+).

Back to the current (unfortunate) situation: The deed is already done and the 
effort would be to revert the patches. I think that we should only do this, if a 
majority of developers wants them reverted. My guess would be that most 
developers will use gcc-4.6+ or clang 3.3+, anyway.

Furthermore, I am surprised that such commits got into the master branch without 
any discussion so far. Not only should this be discussed prior to the changes 
(despite an announcement, FS#1435), but I would have expected immediate response 
to such a commit. However, the first response took more than 24 hours (yes, I 
did not respond either).

Finally, despite this overenthusiasm, I would like to thank Christoph for his 
work in cleaning up the master branches. Few people currently contribute this 
eagerly at all. It even takes some boldness to do such changes without opening a 
FlySpray, having weeks of discussion, and setting up a formal vote before you 
actually do anything. In the mean time, you might even forget about this 
proposal - especially if it is just about cleaning up.

Of course, this is just my 2 cents.

Best,

Martin


On 02/26/2014 05:35 PM, Christian Engwer wrote:
> Dear all,
>
>>      [cleanup] Replace dune_static_assert by C++11 static_assert.
>
> do we actually want to do this at the moment? We decided to drop the
> backwards compatibility code, but leaving the Dune:: / dune_ calls
> allows users with an older compiler to add (and maintain) backwards
> compatibility for their branch. As I recall, Martin was very much in
> favour of this solution.
>
> Christian
>
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel
>

-- 
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the Dune-devel mailing list