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
ae6b4452
Commit
ae6b4452
authored
Apr 26, 2017
by
Harris Hancock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around a fresh MSVC ICE
parent
63f1921d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
common.h
c++/src/kj/parse/common.h
+6
-2
No files found.
c++/src/kj/parse/common.h
View file @
ae6b4452
...
...
@@ -298,11 +298,15 @@ public:
explicit
constexpr
Sequence_
(
T
&&
firstSubParser
,
U
&&
...
rest
)
:
first
(
kj
::
fwd
<
T
>
(
firstSubParser
)),
rest
(
kj
::
fwd
<
U
>
(
rest
)...)
{}
// TODO(msvc): MSVC ICEs on the return types of operator() and parseNext() unless SubParsers is
// wrapped in `decltype(instance<SubParsers>())`. This is similar to the workaround in
// KJ_CONTEXT().
template
<
typename
Input
>
auto
operator
()(
Input
&
input
)
const
->
Maybe
<
decltype
(
tuple
(
instance
<
OutputType
<
FirstSubParser
,
Input
>>
(),
instance
<
OutputType
<
SubParsers
,
Input
>>
()...))
>
{
instance
<
OutputType
<
decltype
(
instance
<
SubParsers
>
())
,
Input
>>
()...))
>
{
return
parseNext
(
input
);
}
...
...
@@ -311,7 +315,7 @@ public:
Maybe
<
decltype
(
tuple
(
kj
::
fwd
<
InitialParams
>
(
initialParams
)...,
instance
<
OutputType
<
FirstSubParser
,
Input
>>
(),
instance
<
OutputType
<
SubParsers
,
Input
>>
()...))
>
{
instance
<
OutputType
<
decltype
(
instance
<
SubParsers
>
())
,
Input
>>
()...))
>
{
KJ_IF_MAYBE
(
firstResult
,
first
(
input
))
{
return
rest
.
parseNext
(
input
,
kj
::
fwd
<
InitialParams
>
(
initialParams
)...,
kj
::
mv
(
*
firstResult
));
...
...
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