Doc VC linker bug.

This commit is contained in:
Glenn Maynard
2003-09-28 07:13:36 +00:00
parent a471fb9fa5
commit dffed727a6
+14 -1
View File
@@ -14,4 +14,17 @@ written.
Avoid accessing other singleton classes from singleton destructors. That Avoid accessing other singleton classes from singleton destructors. That
introduces dependencies on the order of destruction, and can cause problems introduces dependencies on the order of destruction, and can cause problems
if one of the singletons throws an exception. if one of the singletons throws an exception.
This kills VC:
template<class T> static void YY( T opt ) { }
enum { A } a;
enum { A1 } b;
void XX() { YY(a); YY(b); }
foo.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '?YY@@YAXW4__unnamed@@@Z'
It mangles the template incorrectly. Solution: don't use anonymous
enums as template parameters; give them a name.