Skip to content

Conversation

@vadz
Copy link
Contributor

@vadz vadz commented Jun 29, 2025

The use of "final" differed between ansicolor_sink and wincolor_sink, resulting in the code inheriting from std{err,out}_color_sink classes, which are defined as one or the other on different platforms, being able to override most of the functions under non-Windows platforms, but not under Windows.

This seems gratuitously inconsistent, so just remove all "final" keywords from both classes, especially because there doesn't seem any good reason to use it and the other sink classes don't use it (with the exception of base_sink, which is special).

This also incidentally fixes using "final override" in most places but "override final" in wincolor_sink.h.

Fixes #3429.

The use of "final" differed between ansicolor_sink and wincolor_sink,
resulting in the code inheriting from std{err,out}_color_sink classes,
which are defined as one or the other on different platforms, being able
to override most of the functions under non-Windows platforms, but not
under Windows.

This seems gratuitously inconsistent, so just remove all "final"
keywords from both classes, especially because there doesn't seem any
good reason to use it and the other sink classes don't use it (with the
exception of base_sink, which is special).

This also incidentally fixes using "final override" in most places but
"override final" in wincolor_sink.h.

Fixes gabime#3429.
@gabime gabime merged commit 287333e into gabime:v1.x Jun 30, 2025
17 of 18 checks passed
@gabime
Copy link
Owner

gabime commented Jun 30, 2025

Thanks @vadz

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.

wincolor_sink::log() shouldn't be final

2 participants