hi all, I don't know if this is the right place to report bug, if it's not please forgive me. I was trying to use boost/shared_ptr.hpp class, so I defined BOOST_NO_EXCEPTIONS because my compiler doesn't support C++ exceptions, but I receive this error: ..\..\boost_1_29_0\boost/detail/shared_count.hpp(122) : error C2039: 'use_count_is_zero' : is not a member of 'boost' ..\..\boost_1_29_0\boost/detail/shared_count.hpp(122) : error C2065: 'use_count_is_zero' : undeclared identifier in detail, here's an excerpt from shared_count.hpp, where the compiler gives the error: void add_ref() { #ifdef BOOST_HAS_THREADS mutex_type::scoped_lock lock(mtx_); #endif if(use_count_ == 0 && weak_count_ != 0) boost::throw_exception(boost::use_count_is_zero()); ++use_count_; ++weak_count_; } use_count_is_zero is not defined because it's defined, in the same file, as: #ifndef BOOST_NO_EXCEPTIONS class use_count_is_zero: public std::exception { public: virtual char const * what() const throw() { return "boost::use_count_is_zero"; } }; #endif is there a way to make it work? -- Simone
Simone Finotti wrote:
hi all, I don't know if this is the right place to report bug, if it's not please forgive me. I was trying to use boost/shared_ptr.hpp class, so I defined BOOST_NO_EXCEPTIONS because my compiler doesn't support C++ exceptions, but I receive this error:
..\..\boost_1_29_0\boost/detail/shared_count.hpp(122) : error C2039: 'use_count_is_zero' : is not a member of 'boost' ..\..\boost_1_29_0\boost/detail/shared_count.hpp(122) : error C2065: 'use_count_is_zero' : undeclared identifier [...] use_count_is_zero is not defined because it's defined, in the same file, as:
#ifndef BOOST_NO_EXCEPTIONS
class use_count_is_zero: public std::exception { public:
virtual char const * what() const throw() { return "boost::use_count_is_zero"; } };
#endif
I don't see these #ifdefs in shared_count.hpp 1.29, or any other version, for that matter?
participants (2)
-
Peter Dimov
-
Simone Finotti