Re: Peculiar bug when converting int's to std::strings using MSVC 2015
Seth <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 08-03-17 19:10, Arash Partow wrote:
> As before all the values are a 'mismatch'.
Oh. You mean not just the ones shown. I had assumed you listed only the
failing cases. Because that's the output of the program. So, to clarify
even more, do you mean, the following program fails too?
http://coliru.stacked-crooked.com/a/2715e11d1592fd07
#include <boost/spirit/include/karma.hpp>
inline std::string karma_int_to_string(int value) {
namespace k = boost::spirit::karma;
std::string str;
k::generate(back_inserter(str), k::int_, value);
return str;
}
int main() {
assert(std::to_string(42) == karma_int_to_string(42));
}
If so, there's obviously some kind of UB involved. But it's not very
clear to me what could cause it (barring MSVC bugs)
------------------------------------------------------------------------------
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
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general