]> git.wh0rd.org - ICEs.git/blobdiff - 411691/id_manager.i
more
[ICEs.git] / 411691 / id_manager.i
diff --git a/411691/id_manager.i b/411691/id_manager.i
new file mode 100644 (file)
index 0000000..4d30f97
--- /dev/null
@@ -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;
+};