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