X-Git-Url: https://git.wh0rd.org/?p=ICEs.git;a=blobdiff_plain;f=411691%2Fid_manager.i;fp=411691%2Fid_manager.i;h=4d30f97be22f059bc943c406c03e872370937fc9;hp=0000000000000000000000000000000000000000;hb=bd3239d2bbe0de3a200b266503e3330b1e391489;hpb=dbff64cb4b7530861c2309c794efdd4e0cf47a23 diff --git a/411691/id_manager.i b/411691/id_manager.i new file mode 100644 index 0000000..4d30f97 --- /dev/null +++ b/411691/id_manager.i @@ -0,0 +1,57 @@ +int foo(int *__mem); +template < typename _Tp > class new_allocator { +}; + +template < typename _CharT > struct char_traits; +template < typename _Tp > class allocator:public new_allocator < _Tp > { +}; + +template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; +typedef basic_string < char >string; +template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + private:struct _Rep { + int _M_refcount; + void _M_dispose() { + if (this != &_S_empty_rep()) + if (foo(&this->_M_refcount)) ; + }}; + public: private:mutable _Alloc _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(); + } +}; + +template < class T > class intrusive_ptr { + public:~intrusive_ptr() { + T *px; + intrusive_ptr_release(px); + } +}; + +template < typename T > struct intrusive_base { + friend void intrusive_ptr_release(T * ptr) { + delete ptr; +}}; +struct si:intrusive_base < si > { + intrusive_ptr < si > parent; + string id_1_1; +}; +string normalize_id(string) +{ +} + +void add_id_to_section(string & id) +{ + string id_part = id; + normalize_id(id); + intrusive_ptr < si > parent; +};