Closed JohanneMontano closed 3 months ago
The code is correct, non-virtual dispatch is what's wanted there. But I'll add a workaround to stop the earning. Making it a qualified call will make it clear it's non-virtual:
basic_pstreambuf::sync();
Isn't this #7 which was already fixed by 92e3207716804454690ab937c7bbbfb9e51c8b1c ?
It looks like you're using an old version of the code.
Thank you, I'll try and pull a new version of the code and will close this issue if that works.
I've just checked and I have pulled the code from Release version 1.0.3 in SourceForge. Is this fix in that version?
No, you'll have to get the code from Git. You can just download the https://github.com/jwakely/pstreams/blob/master/pstream.h file.
I suppose I should do a 1.0.4 release...
Hi, it looks like https://github.com/jwakely/pstreams/archive/refs/tags/RELEASE_1_0_3.tar.gz contains the fix so I'll just pull from that. I was a bit confused since I assumed that the version for this release was similar to the latest SourceForge one, but this works perfectly for me.
Yeah, it should be the same ... I'm a bit confused what's happened with the tags on github, they don't seem to match the releases. I'll look into it.
I figured out what happened, it was messy.
I made a new release which should be consistent everywhere. Maybe I should just stop putting releases on sourceforge and then there's a single source of truth.
We have started pulling from the git releases so removing sf wont affect us but I think doing what's simplest and easiest for you is the best course of action :)) Thanks again!!!
Hello,
I have written the wrapper function below
calling the function yields the following clang tidy static analyser warning (as an error)
I made clang tidy happy by making
pipe
a static variable, which is not really ideal in my humble opinion. I have another bit of code that uses pstreams in a similar way but it is in a class as a private member variable (and I have not encountered this problem in that implementation) so my guess is that this problem is life time / scope related. Are there any proper fixes I can implement on my side?Thank you very much in advance!!