Aleph-w
7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
test_format.cc
Go to the documentation of this file.
1
#include <cstddef>
2
#include <tuple>
3
4
struct
Observer
5
{
6
template
<
typename
Lattice>
7
void
on_step_end
(std::size_t,
const
Lattice &)
8
{}
9
};
10
11
class
Test
{
12
std::tuple<Observer, Observer>
obs_
;
13
public
:
14
template
<
typename
Lattice>
15
void
on_step_end
(std::size_t step,
const
Lattice &frame)
16
{
17
std::apply( [&](
auto
&...o)
18
{
19
(o.on_step_end(step, frame), ...);
20
},
21
obs_
);
22
}
23
};
24
25
int
main
()
26
{
27
return
0;
28
}
Test
Definition
test_format.cc:11
Test::on_step_end
void on_step_end(std::size_t step, const Lattice &frame)
Definition
test_format.cc:15
Test::obs_
std::tuple< Observer, Observer > obs_
Definition
test_format.cc:12
Observer
Definition
test_format.cc:5
Observer::on_step_end
void on_step_end(std::size_t, const Lattice &)
Definition
test_format.cc:7
main
int main()
Definition
test_format.cc:25
Examples
test_format.cc
Generated by
1.9.8