Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
6afedf8c
Commit
6afedf8c
authored
Mar 13, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add AutoCloseFd::operator=
parent
1e94279e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
io.h
c++/src/kj/io.h
+12
-0
No files found.
c++/src/kj/io.h
View file @
6afedf8c
...
...
@@ -240,6 +240,18 @@ public:
KJ_DISALLOW_COPY
(
AutoCloseFd
);
~
AutoCloseFd
()
noexcept
(
false
);
inline
AutoCloseFd
&
operator
=
(
AutoCloseFd
&&
other
)
{
AutoCloseFd
old
(
kj
::
mv
(
*
this
));
fd
=
other
.
fd
;
other
.
fd
=
-
1
;
return
*
this
;
}
inline
AutoCloseFd
&
operator
=
(
decltype
(
nullptr
))
{
AutoCloseFd
old
(
kj
::
mv
(
*
this
));
return
*
this
;
}
inline
operator
int
()
{
return
fd
;
}
inline
int
get
()
{
return
fd
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment