]> git.wh0rd.org - ICEs.git/blob - 411691/id_manager.i.8
more
[ICEs.git] / 411691 / id_manager.i.8
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 typedef _Alloc allocator_type;
16 private:struct _Rep_base {
17 int _M_refcount;
18 };
19 struct _Rep:_Rep_base {
20 void _M_dispose(const _Alloc & __a) {
21 if (this != &_S_empty_rep()) {
22 if (foo(&this->_M_refcount)) ;
23 }
24 }};
25 struct _Alloc_hider:_Alloc {
26 };
27 public: private:mutable _Alloc_hider _M_dataplus;
28 _Rep *_M_rep() const {
29 } static _Rep & _S_empty_rep() {
30 }
31 public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(),
32 _Alloc()) {
33 }
34 ~basic_string() {
35 _M_rep()->_M_dispose(this->get_allocator());
36 }
37 allocator_type get_allocator() const {
38 }};
39 template < class T > class intrusive_ptr {
40 public:typedef T element_type;
41 ~intrusive_ptr() {
42 intrusive_ptr_release(px);
43 }
44 private:T * px;
45 };
46
47 template < typename T > struct intrusive_base {
48 friend void intrusive_ptr_release(T * ptr) {
49 delete ptr;
50 }};
51 struct si:intrusive_base < si > {
52 intrusive_ptr < si > parent;
53 string id_1_1;
54 };
55 string normalize_id(string)
56 {
57 }
58
59 void add_id_to_section(string & id)
60 {
61 string id_part = id;
62 normalize_id(id);
63 intrusive_ptr < si > parent;
64 };