☰
Debian Codegraph
@
13.04.01-1
/
/
yo
/
stl
/
examples
/
sharedarray.cc
☽
☼
yo/stl/examples/sharedarray.cc
code
plain
raw
GPL-2+
1994-2025 by Frank B. Brokken, University of Groningen.
debian/copyright
1
#include <memory>
2
#include <iostream>
3
4
using namespace std;
5
6
//code
7
struct Type
8
{
9
~Type()
10
{
11
cout << "destr\n"; // show the object's destruction
12
}
13
};
14
15
int main()
16
{
17
shared_ptr<Type[]> sp{ new Type[3] };
18
sp[0] = sp[1];
19
}
20
//=