GNU nano Файл test cpp include cstdio include string include deque str

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
GNU nano 2.3.1 Файл: test.cpp
#include <cstdio>
#include <string>
#include <deque>
struct Test {
std::string s;
};
struct Test2 {
std::deque<Test> const &ref;
Test2(std::deque<Test> const &_ref)
: ref{_ref}
{
}
};
int main() {
std::deque<Test> x = { {"some"} };
Test2 y(x);
printf("x@%p\nr@%p\n", &x, &y.ref);
return 0;
}