Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: