From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kenneth Porter" To: "c++-embedded@cygnus.com" Subject: template bloat Date: Tue, 25 Aug 1998 17:50:00 -0000 Message-id: <199808260051.UAA01586@mail1.ispnews.com> X-SW-Source: 1998/msg00029.html Many of us, I'm sure, avoid templates because they often generate identical code differentiated only by parameter types, but not by the final binary. This usually happens where the template parameter is a pointer and the template doesn't dereference the pointer. For example, an STL container of pointers will suffer from this effect. It would be nice if the tool chain could identify these situations and merge templates that are binary-equivalent. One way to do this is to assign a checksum to every routine in the compiler and have the linker look for routines with the same checksum. These can then be further examined to see if the code is identical and can then be merged. For debugging, the feature could be disabled for all routines that don't share common source (ie. non-templates). Ken mailto:shiva@well.com http://www.well.com/user/shiva/ http://www.e-scrub.com/cgi-bin/wpoison/wpoison.cgi (Death to Spam!)