#include <Core/Core.h> using namespace Upp; CONSOLE_APP_MAIN { VectorMap<String, unsigned int> test; test.Add("t1") = 2; try{ //Work correctly Cout() << test.Get("t1") << EOL; //Raise assertion in debug mode //Print 23 in release mode (CLANGX64) //Print 0 in release mode (MSVS19x64) Cout() << test.Get("t2") << EOL; }catch(Exc& e){ Cout() << e << EOL; }catch(...){ Cout() << "Catched" << EOL; } }
Report message to a moderator
I have this kind of code : #include <Core/Core.h> using namespace Upp; CONSOLE_APP_MAIN { VectorMap<String, unsigned int> test; test.Add("t1") = 2; try{ //Work correctly Cout() << test.Get("t1") << EOL; //Raise assertion in debug mode //Print 23 in release mode (CLANGX64) //Print 0 in release mode (MSVS19x64) Cout() << test.Get("t2") << EOL; }catch(Exc& e){ Cout() << e << EOL; }catch(...){ Cout() << "Catched" << EOL; } } For Strange reason, test.Get("t2") print 23 in release mode when using CLANGx64, why ?