
I have just tried to use Boost for the first time and it appears to
not take kindly to unnamed enums from another library I use and (once
those were named) some Microsoft SDK. I am using:
Windows XP SP3
Visual Studio 2008 SP1
Boost 1.41.0
More specifically, after adding '#include
// This forward declaration is required for the friend declaration // in iterator_core_access template
class iterator_facade;
I went through and named a each of the unnamed enums as the compiler referenced them until I got to an issue with shlwapi.h from a Microsoft SDK. Here's the complete compiler error list at that point: 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : error C2332: 'class' : missing tag name 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : error C2011: '<unnamed-tag>' : 'enum' type redefinition 1> c:\program files\microsoft sdks\windows\v6.0a\include\shlwapi.h(1550) : see declaration of '<unnamed-tag>' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : error C2143: syntax error : missing ',' before 'constant' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(479) : error C2332: 'class' : missing tag name 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(479) : error C2011: '<unnamed-tag>' : 'enum' type redefinition 1> c:\program files\microsoft sdks\windows\v6.0a\include\shlwapi.h(1550) : see declaration of '<unnamed-tag>' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(479) : error C2143: syntax error : missing ',' before 'constant' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(484) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(484) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(485) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(485) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(487) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(487) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(488) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(488) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(489) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(489) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(490) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(490) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(494) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(494) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(501) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(508) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(43) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(566) : error C2332: 'class' : missing tag name 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(566) : error C2011: '<unnamed-tag>' : 'enum' type redefinition 1> c:\program files\microsoft sdks\windows\v6.0a\include\shlwapi.h(1550) : see declaration of '<unnamed-tag>' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(566) : error C2143: syntax error : missing ',' before 'constant' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(567) : error C2988: unrecognizable template declaration/definition 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(567) : error C2059: syntax error : 'constant' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(567) : error C2065: 'V' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(567) : error C2065: 'TC' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(567) : error C2065: 'R' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(567) : error C2065: 'D' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(572) : error C2332: 'class' : missing tag name 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(572) : error C2011: '<unnamed-tag>' : 'enum' type redefinition 1> c:\program files\microsoft sdks\windows\v6.0a\include\shlwapi.h(1550) : see declaration of '<unnamed-tag>' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(573) : error C2065: 'V' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(573) : error C2065: 'TC' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(573) : error C2065: 'R' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(573) : error C2065: 'D' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(574) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(721) : error C3855: 'boost::iterator_facade': template parameter '__formal' is incompatible with the declaration 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(721) : error C2977: 'boost::iterator_facade' : too many template arguments 1> c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(601) : see declaration of 'boost::iterator_facade' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(724) : error C2332: 'class' : missing tag name 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(724) : error C2011: '<unnamed-tag>' : 'enum' type redefinition 1> c:\program files\microsoft sdks\windows\v6.0a\include\shlwapi.h(1550) : see declaration of '<unnamed-tag>' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(724) : error C2143: syntax error : missing ',' before 'constant' 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(725) : error C2065: 'V' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(725) : error C2065: 'R' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(725) : error C2065: 'TC' : undeclared identifier 1>c:\korvis\boost\include\boost\iterator\iterator_facade.hpp(726) : fatal error C1903: unable to recover from previous error(s); stopping compilation Am I correct that the unnamed enums are somehow causing the problem? Any help you can offer understanding or resolving this issue would be greatly appreciated. Thanks for your time, -kyle