Sorry for naive questions, is it OK to insert an empty set to another set using range function or it is an undefied behavior ?
Test run in https://ideone.com/RNGIFT seems fine, checking the reference saying If the container is empty, the returned iterator will be equal to end().
#include <iostream>
#include <set>
using namespace std;
int main() {
std::set<string> to_be_inserted;
std::set<string> res;
cout << "check everything is fine" << endl;
res.insert(to_be_inserted.begin(), to_be_inserted.end());
cout << "how about now ?" << endl;
return 0;
}