Server(const Server &s);
Server &operator=(const Server &s);
- Server(Server &&s) { *this = move(s); };
- Server &operator=(Server &&s) {
+ Server(Server &&s) noexcept {
+ *this = move(s);
+ };
+ Server &operator=(Server &&s) noexcept {
binary = exchange(s.binary, "false");
args = exchange(s.args, {});
pid = exchange(s.pid, 0);
bool signal(int signo = SIGTERM);
bool check();
- bool isListening();
+ bool isListening() const;
bool ensureListening();
bool wait(int flags = 0);
optional<string> handleArg(vector<char *> &arr, const string &arg, const arg_func_t &next_arg);
};
-inline ostream &operator<<(ostream &out, const socket_or_port_t sop) {
+inline ostream &operator<<(ostream &out, const socket_or_port_t &sop) {
if (holds_alternative<string>(sop)) {
out << get<string>(sop);
} else {