| | |
STL list question
![]() |
•
•
Join Date: Dec 2008
Posts: 2
Reputation:
Solved Threads: 0
If you recall in the implementation of list:
struct list_node_base {
list_node_base* next
list_node_base* prev
...
void hook(const list_node_base*);
....
};
I wanted to look under the hood of the hook function, but can't find it anywhere in the STL library or any reference to this method via Google for that matter. All that Google pulls up are copies of <list>, which, duh, I'm looking at...
If you know how how the hook method works and could even just pseudo code it for me I'd appreciate it.
Much thanks
struct list_node_base {
list_node_base* next
list_node_base* prev
...
void hook(const list_node_base*);
....
};
I wanted to look under the hood of the hook function, but can't find it anywhere in the STL library or any reference to this method via Google for that matter. All that Google pulls up are copies of <list>, which, duh, I'm looking at...
If you know how how the hook method works and could even just pseudo code it for me I'd appreciate it.
Much thanks
it's not STL, it's libstdc++, list.cc module:
http://www.cs.brown.edu/~jwicks/libs...cc-source.html
http://www.cs.brown.edu/~jwicks/libs...cc-source.html
C++ Syntax (Toggle Plain Text)
00123 void 00124 _List_node_base::hook(_List_node_base* const __position) 00125 { 00126 this->_M_next = __position; 00127 this->_M_prev = __position->_M_prev; 00128 __position->_M_prev->_M_next = this; 00129 __position->_M_prev = this; 00130 }
![]() |
Similar Threads
- c++ STL LIST function (C++)
- Basic question about linked lists (C++)
- vector question (C++)
- Problem accessing base class member function whilst iterating through STL list (C++)
- Linked List (C++)
- Linked List & Objects (C++)
- STL question concerning partial_sum? (C++)
Other Threads in the C++ Forum
- Previous Thread: Which function is better for launching external application?
- Next Thread: Don't Erase Contents of Text File
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ char class classes classified code coding compatible compile console conversion count date delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file filewrite forms fstream function functions game givemetehcodez graph gui homeworkhelp homeworkhelper homeworksolutions iamthwee icon if...else ifstream input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node object output play pointer problem program programming project python random read recursion reference rpg string strings struct symbol temperature template test text text-file toolkit tree url values variable vector video win32 windows winsock wordfrequency wxwidgets






