[Live-devel] Building with C++ version less than 20

Jörg Dommaschk j.dommaschk at instar.com
Fri Aug 25 02:42:07 PDT 2023


Hi,
thanks for the quick reply.

First, I need to correct the example code I gave earlier. The condition should look like this:
#if !defined NO_STD_LIB && __cplusplus >= 202002L

I should have tested it before sending, sorry about that.

About your actual reply:
How do you define __cplusplus on your systems, though? Because as you can see here: 
https://en.cppreference.com/w/cpp/atomic/atomic_flag
this test method really only exists since C++20. Note that it is not enough to redefine __cplusplus somewhere in your program code. Also I doubt that if suffices to set it as a environment variable. The only way I, at least, can enforce a different version is by using the appropriate compiler flag, e.g. -std=c++14

----- Original Message -----
From: "Ross Finlayson" <finlayson at live555.com>
To: "LIVE555 Streaming Media, development & use" <live-devel at us.live555.com>
Sent: Friday, August 25, 2023 1:56:55 PM
Subject: Re: [Live-devel] Building with C++ version less than 20

> On Aug 24, 2023, at 10:51 PM, Ross Finlayson <finlayson at live555.com> wrote:
> 
> I’m willing to update the code to do something like this; however the version number 202002L is the wrong threshold.  For example, the code compiles OK with __cplusplus defined as 201402L

And the code also compiles OK for me on a system with __cplusplus defined as 199711L

I suspect that perhaps the fact that you have an old, outdated version of the C++ standard library may a bug at your end, independent of your version of “__cplusplus"


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel



More information about the live-devel mailing list