On attempting to update an existing code base that builds under C++17, we’re 
now getting this build error:


live555/BasicUsageEnvironment/BasicTaskScheduler.cpp: In member function 
‘virtual void BasicTaskScheduler::SingleStep(unsigned int)’:
live555/BasicUsageEnvironment/BasicTaskScheduler.cpp:191:40: error: ‘struct 
std::atomic_flag’ has no member named ‘test’
  191 |       if (fTriggersAwaitingHandling[i].test()) {
      |                                        ^~~~
make[1]: *** [Makefile:4441: 
live555/BasicUsageEnvironment/lib_liblivemedia_la-BasicTaskScheduler.lo] Error 1


This is because std::atomic_flag.test() does not exist before C++20, per 
https://en.cppreference.com/w/cpp/atomic/atomic_flag

Changing our -std=gnu++17 flag to -std=gnu++20 does bypass the error, but it 
means the rest of our code base also has to now build under that version, a 
change we were avoiding taking on because $REASONS.

Was this change in minimum C++ version intentional?
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to