[muscle] ahhh! what is wrong with the muscle::String class!

  • From: "David Svanberg" <ds@xxxxxxxxxxx>
  • To: "muscle mailing list" <muscle@xxxxxxxxxxxxx>
  • Date: Wed, 27 Aug 2003 11:40:03 +0200

Hello folks,

consider this little app:

#include <util/String.h>
#include <system/SetupSystem.h>
#include <string>

int main( int argc, char** argv )
  muscle::CompleteSetupSystem css;
  muscle::String terrain = "Singapore";
  std::string ove = terrain( );
  return 0;

What does happen is that I get a "Unrelated Pointer: Comparing two unrelated
pointers 0x12FE8C and 0x25A6CC8.  Pointers are not within the same buffer."
at line "std::string ove = terrain( );". This error comes from far way in
the Microsoft string implementation:

basic_string<char,struct std::char_traits<char>,class std::allocator<char>

c:\program files\microsoft visual studio .net\vc7\include\xstring::1241

What is wrong here?

David Svanberg
Software Engineer  Poseidon Simulation AS
Naeringsparken, P.O.Box 89, N-8376 Leknes, Norway
Tel:+47 760 54 330  Fax:+47 760 82 006
E-mail:ds@xxxxxxxxxxx  www.poseidon.no

POSEIDON - your maritime training partner

Other related posts: