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
d3a1cbca
Commit
d3a1cbca
authored
Feb 18, 2021
by
Simon Praetorius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue/fix_deprecation_warnings' into 'master'
Fix deprecation warnings See merge request
!89
parents
2db5ac9d
c2331663
Pipeline
#34022
passed with stage
in 1 minute and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
test/testtreecontainer.cc
test/testtreecontainer.cc
+19
-6
No files found.
test/testtreecontainer.cc
View file @
d3a1cbca
...
...
@@ -9,15 +9,28 @@
#include <dune/common/test/testsuite.hh>
struct
NameVisitor
:
public
Dune
::
TypeTree
::
TreeVisitor
,
public
Dune
::
TypeTree
::
DynamicTraversal
{
std
::
string
s
;
template
<
typename
T
,
typename
TreePath
>
void
pre
(
const
T
&
node
,
TreePath
)
{
s
+=
node
.
name
();
s
+=
"<"
;
}
template
<
typename
T
,
typename
TreePath
>
void
leaf
(
const
T
&
node
,
TreePath
)
{
s
+=
node
.
name
();
s
+=
","
;
}
template
<
typename
T
,
typename
TreePath
>
void
post
(
const
T
&
node
,
TreePath
)
{
s
+=
">"
;
}
};
template
<
class
Tree
>
std
::
string
treeName
(
const
Tree
&
tree
)
{
std
::
string
s
;
Dune
::
TypeTree
::
forEachNode
(
tree
,
[
&
](
auto
&&
node
,
auto
&&
path
){
s
+=
node
.
name
();
s
+=
"<"
;
},
[
&
](
auto
&&
node
,
auto
&&
path
){
s
+=
node
.
name
();
s
+=
","
;
},
[
&
](
auto
&&
node
,
auto
&&
path
){
s
+=
">"
;
});
return
s
;
NameVisitor
nameVisitor
;
Dune
::
TypeTree
::
applyToTree
(
tree
,
nameVisitor
);
return
nameVisitor
.
s
;
}
template
<
class
F
>
...
...
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