Skip to content

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

Draft because depends on !4896 (merged).

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 standard1 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::reverse_list type which doesn't support operations (push_front, push_back, erase). However, the base list type will support those using the same iterators.

Refs #28507 (closed)

Co-authored-by: Pierre Lamot pierre@videolabs.io

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

Merge request reports

Loading