We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cff05bb commit 857636fCopy full SHA for 857636f
1 file changed
src/scn/impl.h
@@ -2002,7 +2002,14 @@ auto extract_code_point_into(Range range)
2002
if (SCN_LIKELY(real_len + 1 == len)) {
2003
string_type result;
2004
result.resize(len);
2005
- std::copy_n(range.begin(), len, result.begin());
+ auto it2 = range.begin();
2006
+ for (auto& c : result) {
2007
+ c = *it2;
2008
+ if (it2 != it) {
2009
+ ++it2;
2010
+ }
2011
2012
+ //std::copy_n(range.begin(), len, result.begin());
2013
return {it, std::move(result)};
2014
}
2015
return {it, string_type(range.begin(), it)};
0 commit comments