| | |
STL list question
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
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 beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






