Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
staging
dune-typetree
Commits
88800e96
Commit
88800e96
authored
Apr 10, 2020
by
Carsten Gräser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace usage of Dune::Std:: by corresponding std:: stuff
parent
e6262297
Pipeline
#26210
passed with stage
in 1 minute and 32 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
dune/typetree/powernode.hh
dune/typetree/powernode.hh
+2
-2
dune/typetree/traversal.hh
dune/typetree/traversal.hh
+4
-7
No files found.
dune/typetree/powernode.hh
View file @
88800e96
...
...
@@ -346,7 +346,7 @@ namespace Dune {
template
<
typename
...
Children
,
std
::
enable_if_t
<
Dune
::
S
td
::
conjunction
<
std
::
is_same
<
ChildType
,
std
::
decay_t
<
Children
>
>
...
>::
value
s
td
::
conjunction
<
std
::
is_same
<
ChildType
,
std
::
decay_t
<
Children
>
>
...
>::
value
,
int
>
=
0
>
PowerNode
(
Children
&&
...
children
)
{
...
...
@@ -356,7 +356,7 @@ namespace Dune {
template
<
typename
...
Children
,
std
::
enable_if_t
<
Dune
::
S
td
::
conjunction
<
std
::
is_same
<
ChildType
,
Children
>...
>::
value
s
td
::
conjunction
<
std
::
is_same
<
ChildType
,
Children
>...
>::
value
,
int
>
=
0
>
PowerNode
(
std
::
shared_ptr
<
Children
>
...
children
)
{
...
...
dune/typetree/traversal.hh
View file @
88800e96
...
...
@@ -4,12 +4,9 @@
#ifndef DUNE_TYPETREE_TRAVERSAL_HH
#define DUNE_TYPETREE_TRAVERSAL_HH
#if HAVE_RVALUE_REFERENCES
#include <utility>
#endif
#include <dune/common/std/type_traits.hh>
#include <dune/common/std/utility.hh>
#include <dune/common/std/type_traits.hh>
#include <dune/common/hybridutilities.hh>
...
...
@@ -58,14 +55,14 @@ namespace Dune {
template
<
class
Tree
,
TreePathType
::
Type
pathType
,
class
Prefix
,
std
::
size_t
...
indices
,
std
::
enable_if_t
<
(
Tree
::
isComposite
or
(
Tree
::
isPower
and
(
pathType
!=
TreePathType
::
dynamic
))),
int
>
=
0
>
constexpr
auto
leafTreePathTuple
(
Prefix
prefix
,
S
td
::
index_sequence
<
indices
...
>
)
constexpr
auto
leafTreePathTuple
(
Prefix
prefix
,
s
td
::
index_sequence
<
indices
...
>
)
{
return
std
::
tuple_cat
(
Detail
::
leafTreePathTuple
<
TypeTree
::
Child
<
Tree
,
indices
>
,
pathType
>
(
Dune
::
TypeTree
::
push_back
(
prefix
,
Dune
::
index_constant
<
indices
>
{}))...);
}
template
<
class
Tree
,
TreePathType
::
Type
pathType
,
class
Prefix
,
std
::
size_t
...
indices
,
std
::
enable_if_t
<
(
Tree
::
isPower
and
(
pathType
==
TreePathType
::
dynamic
)),
int
>
=
0
>
constexpr
auto
leafTreePathTuple
(
Prefix
prefix
,
S
td
::
index_sequence
<
indices
...
>
)
constexpr
auto
leafTreePathTuple
(
Prefix
prefix
,
s
td
::
index_sequence
<
indices
...
>
)
{
return
std
::
tuple_cat
(
Detail
::
leafTreePathTuple
<
TypeTree
::
Child
<
Tree
,
indices
>
,
pathType
>
(
Dune
::
TypeTree
::
push_back
(
prefix
,
indices
))...);
}
...
...
@@ -74,7 +71,7 @@ namespace Dune {
std
::
enable_if_t
<
not
Tree
::
isLeaf
,
int
>
>
constexpr
auto
leafTreePathTuple
(
Prefix
prefix
)
{
return
Detail
::
leafTreePathTuple
<
Tree
,
pathType
>
(
prefix
,
Dune
::
S
td
::
make_index_sequence
<
Tree
::
degree
()
>
{});
return
Detail
::
leafTreePathTuple
<
Tree
,
pathType
>
(
prefix
,
s
td
::
make_index_sequence
<
Tree
::
degree
()
>
{});
}
/* The signature is the same as for the public applyToTree
...
...
@@ -159,7 +156,7 @@ namespace Dune {
// visit all children using a static loop, and
// finally visit the tree with the post function.
preFunc
(
id
(
tree
),
treePath
);
auto
indices
=
Dune
::
S
td
::
make_index_sequence
<
TreeType
::
degree
()
>
{};
auto
indices
=
s
td
::
make_index_sequence
<
TreeType
::
degree
()
>
{};
Dune
::
Hybrid
::
forEach
(
indices
,
[
&
](
auto
i
)
{
auto
childTreePath
=
Dune
::
TypeTree
::
push_back
(
treePath
,
i
);
forEachNode
(
id
(
tree
).
child
(
i
),
childTreePath
,
preFunc
,
leafFunc
,
postFunc
);
...
...
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