boostorg / boostorg/boost

Intrusive list iterator declaration for incomplete type does not compile (std::list and boost::container::list do)...

Open
#1,087 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
8.6k
Forks
1.9k
Avg merge
39m
Merged PRs (30d)
2

Description

Hello,

I just want to ask if there is a way to make this code compile:

```cpp
// example.hpp
#include
#include
#include

class LL;

class O
{
std::list::iterator stlIt;
boost::container::list::iterator boostIt;
// uncommenting this line the code does not compile...
// boost::intrusive::list::iterator boostIntrusiveIt;
};

class OL
{
O member;
};

class L
{
OL member;
};

class LL
{
L member;
boost::intrusive::list_member_hook> listHook_;
};
```

g++ 15.2.0 (Boost 1.88)...

The normal list iterators seem to be OK,
but the intrusive one is not...

*What about SCARY iterators ( https://www.boost.org/doc/libs/1_70_0/doc/html/intrusive/boost_intrusive_iterators.html ) ?
**How fast is this: s_iterator_to ??

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.