[Dune] Standard library enhancements

Andreas Dedner dedner at mathematik.uni-freiburg.de
Wed Feb 14 08:57:48 CET 2007


I think it is at least possible to mark a whole header file
as deprecated by adding for example something in the form
#warning "Use .. instead"
for some of the things you suggest to change this might work
Of course it would be nice to have a warning which can be
removed from the compiler output, e.g.
#ifndef NOGNUHEADER
#warning "Use ... instead"
#endif


Oliver Sander wrote:
> 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)   *
> ************************************************************************
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune




More information about the Dune mailing list