Re: what to do with template classes in template unsupported compiler ?

From: Alf P. Steinbach (alfps_at_start.no)
Date: 05/17/04


Date: Mon, 17 May 2004 10:09:03 GMT


* shlomiw@il.ibm.com (Shlomi) schriebt:
>
> I've wrote quite a big code which bases on a considerable large amount
> of template classes. (uses many different kinds of each template
> class).
>
> Now, without prior knowledge of mine, it turns out that this code
> should
> be compiled with compiler which doesn't support templates ! (OUCH!)
>
> after my face got back to its normal color, we've started of thinking
> what are our options:
> 1. rewrite the template classes such that there'll be a unique class
> to each of them (think about all the relations between the different
> kinds - it's like a cartesian product of each function which recieve
> other template class argument...) one big head-ache.
> 2. write a parser which will do the work. (and hope)
> 3. search for a tool which does that or something similar.
> 4. maybe use a C++ to C translator.
> 5. write a template supported compiler for the specific platform
> (mmm.. guess not)
> 6. ask in comp.lang.c++ google groups for ideas... (anyone?)
>
> help would be very appreciated.

This is sort of off-topic, but it seems most probable that you have
been intentionally screwed by management. In that case there is nothing
you can do; if by heroic effort you manage to make the code compatible with
current requirements new unsurmountable requirements will pop up. If, OTOH.,
although very unlikely, that is not the case: the cost of a compiler that does
support templates is negligible, namely zero for most platforms.

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


Relevant Pages

  • template codegeneration issues
    ... The template classes contain ... The values of non-static const members is changed in run-time. ... template classes seem to similarly "overlap" in memory:( ...
    (microsoft.public.dotnet.languages.vc)
  • template and container, looking for advice
    ... I'm having some problems inserting some template classes into containers. ... and make sure that template parameter T is derived from BaseT but it is not ...
    (comp.lang.cpp)
  • Re: Issue With Template Instantiation under VxWorks PSC ARINC 653 v2.1, gcc3.3.2
    ... With regular vxworks we don't have problems with TAO and all its templates. ... We've got an application that relies heavily on template classes, ... I haven't yet tried to compile with - ...
    (comp.os.vxworks)
  • Re: [C++] Transfer Member Function Templates to the *.cpp file?
    ... > explicit declaration with regards to template classes, ... > before I learned how to explicitly declare template classes... ... a.c.l.l.c-c++ FAQ: http://www.comeaucomputing.com/learn/faq ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Porting to 5.0, bad libraries
    ... I just went back and created a new platform. ... "Custom Device" and selected, MFC, ... I see where the platform template selection is critical to this, ...
    (microsoft.public.windowsce.platbuilder)