Data Structures | Namespaces

IntrusiveDList.h File Reference

Intrusive double linked list container. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  IntrusiveDList< T, N, P >
 Intrusive doubly linked list container. More...
class  IntrusiveDList< T, N, P >::iterator
 STL style iterator for access to elements. More...

Namespaces

namespace  std

Detailed Description

Intrusive double linked list container.

This provide support for a doubly linked list container for an arbitrary class that uses the class directly and not wrapped. It requires the class to provide the list pointers.

Note:
This is a header only library.
Due to bugs in either the C++ standard or gcc (or both), the link members must be declared in the class used for the list. If they are declared in a super class you will get "could not convert template argument" errors, even though it should work. This is because &T::m is of type S::* if S is a super class of T and m is declared in S. My view is that if I write "&T::m" I want a "T::*" and the compiler shouldn't go rummaging through the class hierarchy for some other type. For MSVC you can static_cast the template arguments as a workaround, but not in gcc.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file IntrusiveDList.h.