M
mathieu
Hi there
I am trying to provide a lookup from two 'int's into a char array,
something like this:
template <int g, int e> struct Lookup;
template <> struct Lookup<0,0> {
// some typedef + enums definitions
static const char A;
};
const char Lookup<0,0>::A = "BLA";
// continue with Lookup<0,1> ; Lookup<0,2> ...
Since the initialization is done in the .h file, it gets included
multiple times, and at link time I am getting duplicate symbols.
Is there another way to initialize static data members ? Or could
someone let me know of any work around ?
Thanks for suggestion,
-Mathieu
Ps: Full source code is here:
http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Source/DataDictionary/gdcmTagToType.h?view=markup
I am trying to provide a lookup from two 'int's into a char array,
something like this:
template <int g, int e> struct Lookup;
template <> struct Lookup<0,0> {
// some typedef + enums definitions
static const char A;
};
const char Lookup<0,0>::A = "BLA";
// continue with Lookup<0,1> ; Lookup<0,2> ...
Since the initialization is done in the .h file, it gets included
multiple times, and at link time I am getting duplicate symbols.
Is there another way to initialize static data members ? Or could
someone let me know of any work around ?
Thanks for suggestion,
-Mathieu
Ps: Full source code is here:
http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Source/DataDictionary/gdcmTagToType.h?view=markup