Mercurial > code
changeset 465:55b3ec952c53
Socket: add overload with nullptr
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 04 Nov 2015 20:32:34 +0100 |
parents | 61a6f3518c55 |
children | a126c10d9321 |
files | C++/modules/Socket/Sockets.h |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/C++/modules/Socket/Sockets.h Wed Nov 04 20:27:17 2015 +0100 +++ b/C++/modules/Socket/Sockets.h Wed Nov 04 20:32:34 2015 +0100 @@ -647,6 +647,14 @@ } /** + * Create an invalid socket. Can be used when you cannot instanciate the socket immediately. + */ + explicit inline Socket(std::nullptr_t) noexcept + : m_handle{Invalid} + { + } + + /** * Copy constructor deleted. */ Socket(const Socket &) = delete;