On 2006-05-31 22:21,
mrbrightsidestolemymoney@googlemail.com wrote:[color=blue]
> Hi,
>
> I need to write out a 1d array of 2d arrays (the structures for each
> are custom, a 3d structure is defined but not suitable for my use for a
> number of reasons).
>
> Templated routines exist for writing out multi2d<T> and multi1d<T>,
> hence writing multi2d<multi1d<T>> is possible, although fails for some
> unknown reason. There is a multi3d<T> writer, but like I said...
>
> Is it possible to define my own write routine which will write out a
> multi2d<multi1d<T>> yet NOT have the compiler (g++) complain that there
> is an ambiguity introduced by the already existing multi2d<T> and
> multi1d<T> writers combined? I want to call it the same (i.e. write)
> and pass the same arguments, to keep a consistency --- this is a large
> project so any hacked solutions tend to get kicked out when the
> branches merge [even this solution might be too hacked!!].[/color]
I'm not exactly sure what you are getting at (getting late over here)
but if you want to make your own implementation of the template routines
mentioned above and be sure that your's are called you could place them
in a separate namespace and explicitly calling these. I believe that you
could then do something like
using my_space::multi2d;
using my_space::multi1d;
and you wouldn't need to prefix each call since this would tell the
compiler that it's your version you want.
Erik Wikström
--
"I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure
out how to use my telephone" -- Bjarne Stroustrup