VS2005 compiler error in swap() definition after including flat_map.hpp
Dear All, I encountered a strange problem recently. It's perfectly reproducable under VS2005 even with the latest boost 1_55 rc. Here's the minimal reproducable example: // ----- //#include <boost/container/flat_map.hpp> #include <boost/container/detail/config_begin.hpp> #include <boost/intrusive/detail/memory_util.hpp> #include <boost/container/detail/memory_util.hpp> void swap(); // ------ In VS2005 this innocent piece of code yields: // ------ error C2365: 'swap' : redefinition; previous definition was 'formerly unknown identifier' // ------ VS2010 and GCC 4.5.2 have no complaints. Looks like VS2005 compiler is entangled somehow by BOOST_INTRUSIVE_HAS_MEMBER magic. Actually, it's quite a headache that with VS2005 one can't introduce swap() after, say, flat_map is included. Should this incompatibility be regarded as a bug? Best regards, Fedor Trushkin
Looks like VS2005 compiler is entangled somehow by BOOST_INTRUSIVE_HAS_MEMBER magic. Actually, it's quite a headache that with VS2005 one can't introduce swap() after, say, flat_map is included.
Should this incompatibility be regarded as a bug?
Please, report it. I don't think Intrusive can do anything to fix this, but let's try. Best, Ion
participants (2)
-
Ion Gaztañaga
-
Фёдор Трушкин