में आईटेटर लिस्ट कॉर्रूप्टेड वीएस2005 एसपी 1 में डीबग कॉन्फ़िगरेशन में संकलित नीचे दिए गए कोड में "आईटेटर लिस्ट कॉर्रूटेड" नोटिस के साथ दो संदेश दिखाए गए हैं।एसटीडी :: स्ट्रिंग कन्स्ट्रक्टर
कोड स्निपेट
#define _SECURE_SCL 0
#define _HAS_ITERATOR_DEBUGGING 0
#include <sstream>
#include <string>
int main()
{
std::stringstream stream;
stream << "123" << std::endl;
std::string str = stream.str();
std::string::const_iterator itFirst = str.begin();
int position = str.find('2');
std::string::const_iterator itSecond = itFirst + position;
std::string tempStr(itFirst,itSecond); ///< errors are here
return 0;
}
यह संकलक या मानक पुस्तकालय में एक बग है?
वीएस 2008 में भी मेरे साथ होता है। चित्त आकर्षण करनेवाला। – avakar
gcc के खिलाफ परीक्षण के लिए codepad.org का उपयोग करने पर विचार करें: http://codepad.org/mXXYxf99 यह निश्चित रूप से एक विंडोज़/विजुअल स्टूडियो बग है। कृपया इसकी रिपोर्ट करें। –