S
Stefan Naewe
A simple test:
<---------------------------->
#include <string>
#include <iostream>
int main()
{
std::string h("Hello ");
*h.rbegin() = '\0';
std::string w=h+std::string(" World");
std::cout << w << std::endl;
return 0;
}
<---------------------------->
Output with different compilers:
MSVC6 :
"Hello 12"
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21):
"Hello World 12"
I know MSVC6 is severely borken but is it correct anyway ?
Thanks
Stefan
<---------------------------->
#include <string>
#include <iostream>
int main()
{
std::string h("Hello ");
*h.rbegin() = '\0';
std::string w=h+std::string(" World");
std::cout << w << std::endl;
return 0;
}
<---------------------------->
Output with different compilers:
MSVC6 :
"Hello 12"
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21):
"Hello World 12"
I know MSVC6 is severely borken but is it correct anyway ?
Thanks
Stefan