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
6f4d69ad
Commit
6f4d69ad
authored
Jul 15, 2018
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify that we're moving the two superclasses independently, per review comments.
parent
14ad8a88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
capability.h
c++/src/capnp/capability.h
+6
-2
No files found.
c++/src/capnp/capability.h
View file @
6f4d69ad
...
...
@@ -744,8 +744,12 @@ template <typename T>
RemotePromise
<
T
>
RemotePromise
<
T
>::
reducePromise
(
kj
::
Promise
<
RemotePromise
>&&
promise
)
{
kj
::
Tuple
<
kj
::
Promise
<
Response
<
T
>>
,
kj
::
Promise
<
kj
::
Own
<
PipelineHook
>>>
splitPromise
=
promise
.
then
([](
RemotePromise
&&
inner
)
{
return
kj
::
tuple
(
kj
::
Promise
<
Response
<
T
>>
(
kj
::
mv
(
inner
)),
PipelineHook
::
from
(
kj
::
mv
(
inner
)));
// `inner` is multiply-inherited, and we want to move away each superclass separately.
// Let's create two references to make clear what we're doing (though this is not strictly
// necessary).
kj
::
Promise
<
Response
<
T
>>&
innerPromise
=
inner
;
typename
T
::
Pipeline
&
innerPipeline
=
inner
;
return
kj
::
tuple
(
kj
::
mv
(
innerPromise
),
PipelineHook
::
from
(
kj
::
mv
(
innerPipeline
)));
}).
split
();
return
RemotePromise
(
kj
::
mv
(
kj
::
get
<
0
>
(
splitPromise
)),
...
...
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