Markus.Blatt at ipvs.uni-stuttgart.de
Wed Aug 1 10:46:20 CEST 2007
On Tue, Jul 31, 2007 at 09:16:50PM +0200, Andreas Dedner wrote:
> I would like to know what the status
> concerning the tuples is at the moment
> and what it is supposed to be in the future.
The interface will stay like this now as this will become the
future C++ standard.
> Dune-fem relies on common/tuples quite
> strongly in a few places and the last big
> change in tuples already cost me a lot of effort.
I am sorry for that.
> At the moment there seems to be three different
> versions used simultaniously:
> the dune version
> the tr1 version
> and the std version
> Question: are tr1 and std equivalent in all respects?
They now all have the same interface (except of the helper classes,
like Pair in Dune, but those should not be used).
> I just want to be sure that when I change our code
> to tr1 that I will not have to change it again when std
> becomes available on my machine.
> The problem with the tr1 version compared to the dune
> \version is that Pair is not available anymore.
> Also the common/utility.hh file will not compile
> at the moment (uses Pair).
Pair is a helper class now and should not be used in your code.
One should rather use tuple. I know this means handinf quite a lot of
template parameters :-(
Concerning common/utility.hh. Unfortunately there was test for that
and therefore I thought all the changes would not break anything
If you provide a test case, I would volunteer to adapt it to the new
interface. This could then serve as template for the changes you might
need in your code.
> Should Pair just be replaced by std::pair?
No, the semantics are quite different! Use tuple directly
> Wish you all a nice "Vorlesungsfreie Zeit"
More information about the Dune