--- Begin Message ---
Hello, 

I have recently built live555 from the latest version and was greeted with a 
compilation error, namely: 

BasicTaskScheduler.cpp:191:40: error: 'struct std::atomic_flag' has no member 
named 'test' 

This happens because that member test of std::atomic_flag has only been added 
with C++20. That is a bit unfortunate, since there are projects out there that 
use an older standard and updating is not always trivial, especially when cross 
compiling is involved. Of course this issue can be quickly resolved by building 
live555 with NO_STD_LIB defined, but I think a more "automatic" solution would 
be nice. 

Ideally that whole atomic logic would be implemented simply without using C++20 
exclusive features. But if this is not possible, then maybe we could at least 
check for the version. So something like 

#ifndef NO_STD_LIB && __cplusplus >= 202002L 
//code using std::atomic_flag 
#else 
//the old logic 
#endif 

Maybe there could even be a warning/info during configuration/build informing 
the user that their C++ version is too low, something like "your C++ version is 
x, so you will only get the old, potentially buggy logic, please consider 
updating to C++20". 

Thanks and regards 
Jay 

--- End Message ---
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to