Skip to content
Snippets Groups Projects
Commit 1398b183 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Steve Lhomme
Browse files

include: vlc_list.hpp: add C++ wrapper for vlc_list

vlc_list.h provides struct vlc_list which is mostly designed to be used
in C code to provide doubly-linked chained list, which is already
exposed in C++ in an unintrusive way through std::list<> and work is
still done in the standard[^1] to try to submit intrusive list support.

However, some part of the public libvlccore API is exposing objects with
vlc_list members, which enforce their usage in the C++ code without more
standard alternative option.

This MR adds a C++ wrapper around the vlc_list structure to be able to
loop through vlc_list without the C macros. It has some limitations to
avoid exploding the implementation and type complexity, in particular
when it comes to the list<T>::reverse_list type which doesn't support
operations (push_front, push_back, erase). However, the base list<T>
type will support those using the same iterators.

[^1]: https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0406r1.html



Refs #28507

Co-authored-by: default avatarPierre Lamot <pierre@videolabs.io>
parent fd1444e8
No related branches found
No related tags found
1 merge request!4897include: vlc_list.hpp: add C++ wrapper for vlc_list
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment