-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (34 loc) · 663 Bytes
/
main.cpp
File metadata and controls
39 lines (34 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <iostream>
#include "Property.h"
#include "const_mutable_helper.h"
#include "test.h"
using namespace tower120::utils;
struct In{
int x;
int y;
};
class Data{
In m_i;
public:
auto i(){
return Property(
[&]() -> In {
return {
m_i.x * 10,
m_i.y * -10
};
},
[&](const auto& i){
m_i = i;
}
);
}
};
int main() {
Data data;
data.i() = In{10,20};
std::cout << data.i()->x << " : " << data.i()->y << std::endl;
const_mutable_helper::main();
test::main();
return 0;
}