id summary reporter owner description type status milestone component version severity resolution keywords cc 3465 MSVC fails to compile intrusive when in DLL interface wim@… Ion Gaztañaga "This program: #include class __declspec(dllexport) A : public boost::intrusive::list_base_hook<> { }; Yields this error on MSVC 2005 (similar on MSVC 2008), when compiling to a DLL: 1>C:\...\boost/intrusive/detail/generic_hook.hpp(191) : error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE' 1> with 1> [ 1> x=false 1> ] 1> C:\...\boost/intrusive/detail/generic_hook.hpp(190) : while compiling class template member function 'void boost::intrusive::detail::generic_hook::unlink(void)' 1> with 1> [ 1> GetNodeAlgorithms=boost::intrusive::get_list_node_algo, 1> Tag=boost::intrusive::default_tag, 1> LinkMode=safe_link, 1> HookType=1 1> ] 1> C:\...\boost/intrusive/list_hook.hpp(94) : see reference to class template instantiation 'boost::intrusive::detail::generic_hook' being compiled 1> with 1> [ 1> GetNodeAlgorithms=boost::intrusive::get_list_node_algo, 1> Tag=boost::intrusive::default_tag, 1> LinkMode=safe_link, 1> HookType=1 1> ] 1> .\main.cpp(5) : see reference to class template instantiation 'boost::intrusive::list_base_hook<>' being compiled If the dllexport is removed, the program compiles fine. When the unlink() method is commented out in generic_hook.hpp, the program compiles fine. We discovered this because our library compiles as a static library, but not as a DLL. I wanted to work around this by using auto_unlink hooks instead of safe_link hooks, but then I get this error when I create a list: 1>C:\...\boost/intrusive/list.hpp(125) : error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE', which is a similar problem. I could not find a clean way to disable static assertions, or another workaround to allow compilation without modifications to boost. Any suggestions? I currently resorted to adding this hack in files that include intrusive headers: #if defined(WIN32) && defined(wt_EXPORTS) namespace boost { template struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; } #endif " Bugs closed Boost 1.41.0 intrusive Boost 1.44.0 Problem wontfix