Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
d2dc156a
Commit
d2dc156a
authored
Apr 21, 2020
by
Tiago Peixoto
Browse files
mpl_nested_loop.hh: minor code-style changes
parent
3a03ce46
Pipeline
#609
passed with stage
in 498 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/graph/mpl_nested_loop.hh
View file @
d2dc156a
...
...
@@ -62,6 +62,7 @@ namespace mpl
// this is a functor wrapper that will perform an any_cast<> in each in an array
// of arguments according to the called types. If the cast is successful, the
// function will be called with those types, and true will be returned.
template
<
class
Action
,
std
::
size_t
N
>
struct
all_any_cast
{
...
...
@@ -78,17 +79,13 @@ struct all_any_cast
template
<
class
T
>
T
*
try_any_cast
(
boost
::
any
&
a
)
const
{
T
*
t
=
any_cast
<
T
>
(
&
a
);
if
(
t
)
{
T
*
t
=
any_cast
<
T
>
(
&
a
);
if
(
t
!=
nullptr
)
return
t
;
}
std
::
reference_wrapper
<
T
>
*
tr
=
any_cast
<
std
::
reference_wrapper
<
T
>>
(
&
a
);
if
(
tr
)
{
std
::
reference_wrapper
<
T
>*
tr
=
any_cast
<
std
::
reference_wrapper
<
T
>>
(
&
a
);
if
(
tr
!=
nullptr
)
return
&
(
tr
->
get
());
}
return
nullptr
;
}
...
...
Write
Preview
Supports
Markdown
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