[Dune] Standard library enhancements
Oliver Sander
sander at mi.fu-berlin.de
Tue Feb 13 13:58:16 CET 2007
Dear Dune!
The C++ standard library is in the process of being enhanced. Starting
with the 4.0 version, the gnu implementation of the STL ships various
helpful new classes in the tr1 namespace. These are mostly taken from the
boost library, and can be expected to become part of the next C++ standard
revision. Therefore they can be expected to be included in non-GNU compilers
as well.
The library additions contain several tools that we have implemented
ourselves in dune-common. Examples include a Tuple class, a fixed-
size array class and a whole bag of type traits for template meta-
programming. Since they are maintained by the GNU folks (with good
connections to the compiler builders), in the long run we can expect
them to be superior to our own code. However, for obvious portability
reasons we cannot expect them to be present on every machine.
Here's my proposal. We change the naming of those of our classes that
are reimplementations of tr1 classes to conform with those classes.
Then, a simple AutoTools switch allows to use the built-in classes
when available and use our own if not. I expect our own reimplementations
to be necessary for a long time (read: years), but still if present
you can get the benefit of built-in classes.
I have started the transition by introducing remove_const as a
replacement for RemoveConst. Having old and new side by side does
not create any problems, but expect RemoveConst to disappear eventually.
Unfortunately, I have not found a way to mark it deprecated. If
someone knows, please tell me.
happy hacking,
Oliver
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75217 *
* Institut für Mathematik II ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
More information about the Dune
mailing list