id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 532,multi_index/detail/unbounded.hpp causes problems in MSVC PCH,dsmtoday,joaquintides,"{{{ MSVC 7.1 I integrated a multi_index into my project and have been very happy with it. However, compile times for my class went from milliseconds to five seconds. And since this class is a cornerstone of my project, this time got added to each compile. To try and speed things up, I put this particular class's header file in my precompiled header system. Well, that worked great, everything compiles fast, but when it links, there are two static objects defined in every object file, causing conflicts, so it doesn't link. The errors are the same this guy got. http://lists.boost.org/boost-users/2004/07/7151.php What I tried and what works for me, but I'm not sure is an acceptable long-term solution, was to #define out two lines which to my eyes appear to define static objects. Why this is only a problem for pre-compiled headers, I don't know. Anyway, here is what I did to unbounded.hpp #if !defined(_MSC_VER) namespace{ detail::unbounded_type unbounded_obj=detail::unbounded_type(); detail::unbounded_type& unbounded=unbounded_obj; } /* unnamed */ #endif }}}",Bugs,closed,,multi_index,None,,None,,