Questions tagged [intrusive-containers]

50 questions
0
votes
2 answers

C++ How to avoid friend template functions with home-made intrusive lists

I need an intrusive, sorted, double-linked list. I do not want to use boost::intrusive, so I'm doing this myself and running into an issue For a doubly-linked list there are several operations, here is just one of them which will help to illustrate…
Badmanchild
  • 990
  • 9
  • 18
0
votes
3 answers

Design pattern to allow the efficient deletion of an element from multiple containers in C++

Say for example, an element is referenced from multiple maps, e.g. a map name to element, a map address to element and a map age to element. Now one looks up the element for example via name, and now wishes to delete it from all three maps? Several…
Cookie
  • 12,004
  • 13
  • 54
  • 83
0
votes
3 answers

C++ circular dependency with intrusive linked list

I've implemented this intrusive linked list: template struct LinkedListNode { Entry *next; Entry *prev; }; template Entry::*NodeMember> class LinkedList { public: void init (); bool…
0
votes
1 answer

member hook implementation for splay_multiset in Boost::Intrusive

I was implementing boost::intrusive for one of my project on visual C++ 2008 and i stumbled upon a problem. i am using splay hooks for splay_multiset containers. I have defined splay hook publically under MyClass (code below). #include…
Manish Shukla
  • 562
  • 6
  • 18
-2
votes
1 answer

Boost.Intrusive and fast_pool_allocator

If I say this, I get a strange compiler (gcc4.9, boost 1_58) error later on: When i go to access this IL: for(auto & odp : odpList[i]) //<-error here { /usr/local/include/boost/intrusive/pack_options.hpp|33|error: no class template named ‘pack’ in…
Ivan
  • 7,448
  • 14
  • 69
  • 134
1 2 3
4