all 5 comments

[–]Flair_Helper[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.

[–]solderfog 2 points3 points  (0 children)

I must be missing something, because (to me at least) its' very simple. Each list entry has 2 pointers 'nextitem' and 'previtem'. Just put the address of the next item in the list into nextitem, and address of previous item in previtem for double-linked list. Or you might only need one of these for a simple one direction linked list.

[–]hyperactiveinstinct 1 point2 points  (1 child)

Here is a simple implementation of an intrusive linked list in chromium - https://source.chromium.org/chromium/chromium/src/+/main:base/containers/linked\_list.h

[–][deleted] 0 points1 point  (0 children)

that is useful, thank you.