O
Old Wolf
Is this undefined behaviour:
#include <string>
#include <vector>
#include <algorithm>
int main()
{
std::string s;
char buf[20];
std::copy(s.begin(), s.end(), buf);
}
Same question again for std::vector<char> instead of std::string.
Do I have to go s.empty() before every time I go s.begin(), in
case begin() is undefined?
#include <string>
#include <vector>
#include <algorithm>
int main()
{
std::string s;
char buf[20];
std::copy(s.begin(), s.end(), buf);
}
Same question again for std::vector<char> instead of std::string.
Do I have to go s.empty() before every time I go s.begin(), in
case begin() is undefined?