You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two errors in compilation, namely line 68 and line 248. I see that the compilation error on line 68 has been corrected, and the compilation error on line 248 has not been changed.
Statement error after if (itr == _data.end()).
template<typename Char>
inlineauto basic_environment_impl<Char>::get(const string_type &id) -> string_type
{
if (id.size() >= _data.size()) //ok, so it's impossible id is in there.returnstring_type(_data.data());
if (std::equal(id.begin(), id.end(), _data.begin()) && (_data[id.size()] == equal_sign<Char>()))
returnstring_type(_data.data()); //null-char is handled by the string.
std::vector<Char> seq = {'\0'}; //using a vector, because strings might cause problems with nullchars
seq.insert(seq.end(), id.begin(), id.end());
seq.push_back('=');
auto itr = std::search(_data.begin(), _data.end(), seq.begin(), seq.end());
if (itr == _data.end()) //not found// The original statement is: return "";// I changed it locally to: return string_type{};return string_type{};
itr += seq.size(); //advance to the value behind the '='; the std::string will take care of finding the null-char.returnstring_type(&*itr);
}
The text was updated successfully, but these errors were encountered:
There are two errors in compilation, namely line 68 and line 248. I see that the compilation error on line 68 has been corrected, and the compilation error on line 248 has not been changed.
Statement error after
if (itr == _data.end())
.The text was updated successfully, but these errors were encountered: