Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
7jjjjjjj
6mo ago
0 comments
Share
With destructive moves, you can end an object's lifetime whenever you want.
0 comments
default
newest
oldest
spacechild1
6mo ago
How would I use such a socket class as a member variable? How do I reopen the socket?
sgsjchs
6mo ago
Reopen by constructing and assigning a new socket.
spacechild1
6mo ago
So I essentially have to wrap it in something like std::optional. Well, that's certainly
one
way to write a socket class, but I'd say it's not idiomatic C++. (I have never seen a socket class being implemented like that.)
1 more reply
j
/
k
navigate · click thread line to collapse