Skip to content

TaskManager: make timed_emits comparator const for GCC 16+ - #30

Open
SAY-5 wants to merge 1 commit into
deniskropp:masterfrom
SAY-5:fix-taskmanager-const-comparator
Open

TaskManager: make timed_emits comparator const for GCC 16+#30
SAY-5 wants to merge 1 commit into
deniskropp:masterfrom
SAY-5:fix-taskmanager-const-comparator

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 26, 2026

Copy link
Copy Markdown

Fixes #29.

The TaskManager::operator() used as the comparator for std::set<Task*,TaskManager> timed_emits was not const-qualified. GCC 16 / recent libstdc++ statically asserts that a container's comparator is invocable through a const reference, so the build fails with "comparison object must be invocable with arguments of key_type".

Adding const to operator() satisfies the requirement and does not change behaviour (the operator only reads ts_emit).

Signed-off-by: Sai Asish Y <say.apm35@gmail.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.

TaskManager comparator needs 'const' for GCC 16+ compatibility

1 participant