struct domaincontroller {
std::string domain;
std::string server;
- domaincontroller(const std::string &d, const std::string & s) :
- domain(d), server(s)
- {}
-#if __cplusplus >= 201103L
- // disable move constructor to work around centos-6 clang bug
- // this is not a performance-critical functionality anyway
- domaincontroller (const domaincontroller &d) :
- domain(d.domain), server(d.server)
- {}
- domaincontroller (domaincontroller &&) = delete;
- domaincontroller()
- {}
- domaincontroller& operator = (const domaincontroller &d)
- {
- domain=d.domain;
- server=d.server;
- return *this;
- }
-#endif
};
typedef std::vector<domaincontroller> domaincontrollers_t;
domaincontrollers_t domaincontrollers;
std::cerr << "Error: can't understand domain controller specification '"
<< arg << "'. Ignoring" << std::endl;
}
- domaincontroller dc(arg.substr(0,pos), arg.substr(pos+1));
+ domaincontroller dc;
+ dc.domain = arg.substr(0,pos);
+ dc.server = arg.substr(pos+1);
if (dc.domain.length() == 0 || dc.server.length() == 0) {
std::cerr << "Error: invalid domain specification in '" << arg <<
"'. Ignoring." << std::endl;