Peculiar bug when converting int's to std::strings using MSVC 2015

Arash Partow <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <CACS6Y7LKjCR89-nXPMfwCqQVnFO2+Kc83msUwZYgfBjEMO84Og@mail.gmail.com>
Hello all,

I've got the following bit of code, it compiles under all compilers
I've tried (gcc, clang, msvc (10,15,17), intel).

https://gist.github.com/anonymous/e9a7eafbbddf3cc8289f7346329126ab

The problem seems to only occur under msvc2105 Update3 release build.
All other compilers/versions and debug/release builds all give a
correct result.

Here are the first few outputs:

cmd> spirit.exe
ERROR s1:-4254967296    s2:-40000000
ERROR s1:-4254967297    s2:-39999999
ERROR s1:-4254967298    s2:-39999998
ERROR s1:-4254967299    s2:-39999997
ERROR s1:-4254967300    s2:-39999996
ERROR s1:-4254967301    s2:-39999995

I was wondering if anyone else can replicate this on an MSVC 2015 u3
release build? Or is there something wrong in the code - I've been
using that particular conversion routine for several years now.



Regards,
Arash


.

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.