Ben Hutchings wrote:
Walter Fettich wrote:
Hello
I'm having a problem when using shared pointers in Embedded Visual C++ .Net STLPort.
When trying to compile I always get the error 'bad_alloc' : is not a member of 'stlp_std' in the file boost/detail/shared_count.hpp
Do you know of any solution or what I can do to fix it?
STLport works very poorly on WinCE. I have done some work to integrate it with the WinCE 4 (aka WinCE .NET) C++ library but have not yet completed that.
I can tell you you will probably need to change the line: # ifndef _STLP_WINCE in stlport/new.h to be: # if !defined(_STLP_WINCE) || _WIN32_WCE+0 >= 400
The macro BOOST_NO_EXCEPTIONS is defined.
Oh, in that case never mind the above.
Is it a problem in STLPort or Boost? <snip>
It is a problem with your configuration. Exceptions are a standard C++ feature and many Boost libraries require them. You could probably change shared_ptr to work without them, but the alternative would be to abort() the program and that's probably not satisfactory.
shared_ptr supports BOOST_NO_EXCEPTIONS via