Skip to content

fix: add missing vector include - #7228

Merged
pajlada merged 1 commit into
Chatterino:masterfrom
kostadinsh:clang-23
Sep 4, 2026
Merged

pajlada merged 1 commit into
Chatterino:masterfrom
kostadinsh:clang-23

Conversation

@kostadinsh

@kostadinsh kostadinsh commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

WebSocketPool.hpp and VectorMessageSink.hpp use std::vector, but don't include <vector> which causes a build failure with libc++ 23 since it's dropping a lot of transitive includes.

In file included from src/controllers/plugins/api/WebSocket.cpp:5:
In file included from src/controllers/plugins/api/WebSocket.hpp:8:
src/common/websockets/WebSocketPool.hpp:76:5: error: no template named 'vector' in namespace 'std'; did you mean 'QVector'?
   76 |     std::vector<std::pair<std::string, std::string>> headers;
      |     ^~~~~~~~~~~
      |     QVector
/usr/include/qt6/QtCore/qcontainerfwd.h:40:22: note: 'QVector' declared here
   40 | template<typename T> using QVector = QList<T>;
      |                     

In file included from src/util/VectorMessageSink.cpp:5:
src/util/VectorMessageSink.hpp:34:16: error: no template named 'vector' in namespace 'std'
   34 |     const std::vector<MessagePtr> &messages() const;
      |           ~~~~~^
src/util/VectorMessageSink.hpp:35:10: error: no template named 'vector' in namespace 'std'
   35 |     std::vector<MessagePtr> takeMessages() &&;
      |     ~~~~~^
src/util/VectorMessageSink.hpp:38:10: error: no template named 'vector' in namespace 'std'
   38 |     std::vector<MessagePtr> messages_;
      |     ~~~~~^

See also: https://discourse.llvm.org/t/rfc-remove-unused-transitive-includes-from-the-libc-headers/90157

Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>

@pajlada pajlada left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@pajlada
pajlada enabled auto-merge (squash) September 4, 2026 10:47
@pajlada
pajlada merged commit 2141712 into Chatterino:master Sep 4, 2026
18 checks passed
@Wissididom

Copy link
Copy Markdown
Contributor

Thank you! As a first-time contributor, you are now eligible to be listed in the About page in Chatterino.

If you want this, you can open a new PR where you modify the resources/contributors.txt file and add yourself to the list. Read the comments at the top for instructions.

babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
`WebSocketPool.hpp` and `VectorMessageSink.hpp` use `std::vector`, but
don't include `<vector>` which causes a build failure with libc++ 23
since it's dropping a lot of transitive includes.

Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
Signed-off-by: Kostadin Shishmanov <kostadinshishmanov@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants