summaryrefslogtreecommitdiff
path: root/louloulibs/network
diff options
context:
space:
mode:
Diffstat (limited to 'louloulibs/network')
-rw-r--r--louloulibs/network/tcp_server_socket.hpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/louloulibs/network/tcp_server_socket.hpp b/louloulibs/network/tcp_server_socket.hpp
index 663ae5b..44d474c 100644
--- a/louloulibs/network/tcp_server_socket.hpp
+++ b/louloulibs/network/tcp_server_socket.hpp
@@ -14,8 +14,6 @@
#include <cstring>
#include <cassert>
-using namespace std::string_literals;
-
template <typename RemoteSocketType>
class TcpSocketServer: public SocketHandler
{
@@ -24,11 +22,11 @@ class TcpSocketServer: public SocketHandler
SocketHandler(poller, -1)
{
if ((this->socket = ::socket(AF_INET6, SOCK_STREAM, 0)) == -1)
- throw std::runtime_error("Could not create socket: "s + std::strerror(errno));
+ throw std::runtime_error(std::string{"Could not create socket: "} + std::strerror(errno));
int opt = 1;
if (::setsockopt(this->socket, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1)
- throw std::runtime_error("Failed to set socket option: "s + std::strerror(errno));
+ throw std::runtime_error(std::string{"Failed to set socket option: "} + std::strerror(errno));
struct sockaddr_in6 addr{};
addr.sin6_family = AF_INET6;