4 ms·
It's not using heuristics. It's how the code is actually written. An implementation of std::list<T> is going to contain multiple objects of type __node<T>. __
by sharth 14y ago
It's not using heuristics. It's how the code is actually written.
An implementation of std::list<T> is going to contain multiple objects of type __node<T>.
__node<T> would be defined as:
template <typename T> struct __node {
__node *prev;
__node *next;
T value;
};
(Note that this doesn't change what anyone else said though, T is a pointer in this particular case, so there's still another indirection)