intrusive_ptr.hpp recursively including itself?

Hello, I am using boost version 1.34. I installed prebuilt libraries and have not modified them in any way. When I try to compile the following program: #include <iostream> #include "boost/signals.hpp" void my_first_slot() { std::cout << "void my_first_slot()\n"; } class my_second_slot { public: void operator()() const { std::cout <<"void my_second_slot::operator()() const\n"; } }; int main() { boost::signal<void ()> sig; sig.connect(&my_first_slot); sig.connect(my_second_slot()); std::cout << "Emitting a signal...\n"; sig(); } I get the error: Error 1 fatal error C1014: too many include files : depth = 1024 d:\program files (x86)\boost\boost_1_34_0\boost\intrusive_ptr.hpp 1 Upon inspection I found that the intrusive_ptr.hpp is including itself. http://www.nabble.com/file/p16075513/intrusive_ptr.hpp intrusive_ptr.hpp The header of the file is as follows: #include <boost/detail/lightweight_test.hpp> #include <boost/intrusive_ptr.hpp> #include <boost/detail/atomic_count.hpp> #include <boost/config.hpp> #include <algorithm> #include <functional> When I try to use include guards it doesn't work either. I tried to find the answer in google but it seems I'm the only one having this problem. What is wrong here? Thanks. -- View this message in context: http://www.nabble.com/intrusive_ptr.hpp-recursively-including-itself--tp1607... Sent from the Boost - Users mailing list archive at Nabble.com.

Upon inspection I found that the intrusive_ptr.hpp is including itself. http://www.nabble.com/file/p16075513/intrusive_ptr.hpp intrusive_ptr.hpp
The header of the file is as follows:
#include <boost/detail/lightweight_test.hpp> #include <boost/intrusive_ptr.hpp> #include <boost/detail/atomic_count.hpp> #include <boost/config.hpp> #include <algorithm> #include <functional>
That file seems to actually be intrusive_ptr_test.cpp (from the boost\libs\smart_ptr\test directory), and not the real intrusive_ptr.hpp from the boost directory. Is your install messed up somehow?

Hello Richard! Thanks for the reply. Strange. I was able to fix the problem by upgrading to the latest version 1.34.1. But how the contents of the two files got switched is still a mystery. No one uses my computer except me so its not a prank. Until I am the one who switched the contents of the files intrusive_ptr.hpp with intrusive_ptr_test.cpp in my sleep, I have no clue how it happened! Richard Webb wrote:
Upon inspection I found that the intrusive_ptr.hpp is including itself. http://www.nabble.com/file/p16075513/intrusive_ptr.hpp intrusive_ptr.hpp
The header of the file is as follows:
#include <boost/detail/lightweight_test.hpp> #include <boost/intrusive_ptr.hpp> #include <boost/detail/atomic_count.hpp> #include <boost/config.hpp> #include <algorithm> #include <functional>
That file seems to actually be intrusive_ptr_test.cpp (from the boost\libs\smart_ptr\test directory), and not the real intrusive_ptr.hpp from the boost directory. Is your install messed up somehow?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- View this message in context: http://www.nabble.com/intrusive_ptr.hpp-recursively-including-itself--tp1607... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (2)
-
framebuffer
-
Richard Webb