]> git.wh0rd.org - ICEs.git/blob - 411691/id_manager.i
more
[ICEs.git] / 411691 / id_manager.i
1 int foo(int *__mem);
2 template < typename _Tp > class new_allocator {
3 };
4
5 template < typename _CharT > struct char_traits;
6 template < typename _Tp > class allocator:public new_allocator < _Tp > {
7 };
8
9 template < typename _CharT, typename _Traits =
10 char_traits < _CharT >, typename _Alloc =
11 allocator < _CharT > >class basic_string;
12 typedef basic_string < char >string;
13 template < typename _CharT, typename _Traits,
14 typename _Alloc > class basic_string {
15 private:struct _Rep {
16 int _M_refcount;
17 void _M_dispose() {
18 if (this != &_S_empty_rep())
19 if (foo(&this->_M_refcount)) ;
20 }};
21 public: private:mutable _Alloc _M_dataplus;
22 _Rep *_M_rep() const {
23 } static _Rep & _S_empty_rep() {
24 }
25 public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(),
26 _Alloc()) {
27 }
28 ~basic_string() {
29 _M_rep()->_M_dispose();
30 }
31 };
32
33 template < class T > class intrusive_ptr {
34 public:~intrusive_ptr() {
35 T *px;
36 intrusive_ptr_release(px);
37 }
38 };
39
40 template < typename T > struct intrusive_base {
41 friend void intrusive_ptr_release(T * ptr) {
42 delete ptr;
43 }};
44 struct si:intrusive_base < si > {
45 intrusive_ptr < si > parent;
46 string id_1_1;
47 };
48 string normalize_id(string)
49 {
50 }
51
52 void add_id_to_section(string & id)
53 {
54 string id_part = id;
55 normalize_id(id);
56 intrusive_ptr < si > parent;
57 };