Howdy;

I'm wondering which compiler flags in VC++ 2003 and 2005 would inadvertently
disable COMDAT folding?

Reading one of Raymond Chen's blog posts, /Za definitely kills COMDAT
folding support.

The reason I ask is because we're replacing some old non-templated arrays
with templated array types in one of our larger projects, and we're getting
a huge increase in size via a Release build with the relevant
COMDAT-specific flags turned on.

Also: can COMDAT folding occur cross-library? Or is that only possible if
Whole Program Optimization and Global Optimizations are turned on?

Thanks!
Si