Discussion:
[Audacity-devel] Mac build was broken by uses of std::copy_if and std::any_of
Paul Licameli
2017-05-01 21:49:54 UTC
Permalink
I have fixed it.

Remember that we do not yet have a complete implementation of the C++11
standard library on all platforms, although we can rely on most C++11
language features.

PRL
David Bailes
2017-05-02 09:44:45 UTC
Permalink
Post by Paul Licameli
I have fixed it.
Remember that we do not yet have a complete implementation of the C++11
standard library on all platforms, although we can rely on most C++11
language features.
as I've said in another post, thanks for fixing this. Could you supply a
link to the documentation of the standard library that is being used for
mac builds? I did check the linux build, but couldn't check the Mac build.

David.
Post by Paul Licameli
PRL
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Paul Licameli
2017-05-02 12:50:24 UTC
Permalink
Assume that the standard library available on Mac is the standard library
as described in the pre-2011 standard.

If in doubt, it is easy to Google the name of the function and find it at
en.cppreference.com. For instance here, the right column of the summary
table at top plainly shows that copy_if is not available.

http://en.cppreference.com/w/cpp/algorithm/copy

There are a few things from C++11 we don't want to be without, such as
unique_ptr, and in MemoryX.h we supply our own definition. I want to keep
these things to a minimum.

However there are some classes that used to be in the optional
sub-namespace std::tr1, and later moved into std by the new standard, such
as shared_ptr. We do have that namespace on Mac, though we may not have
all the member functions of those classes that the C++11 standard now
stipulates. I think these were mostly the work of the Boost project.

So you can also see in MemoryX.h that we simply write a using declaration
that injects the names we want into std.

Again, keeping changes to namespace std to a minimum, I write using
declarations as needed for each name, rather than simply write using
namespace std::tr1;

If there is something in std::tr1 you would like to use, you can follow the
example.

PRL
Post by David Bailes
Post by Paul Licameli
I have fixed it.
Remember that we do not yet have a complete implementation of the C++11
standard library on all platforms, although we can rely on most C++11
language features.
as I've said in another post, thanks for fixing this. Could you supply a
link to the documentation of the standard library that is being used for
mac builds? I did check the linux build, but couldn't check the Mac build.
David.
Post by Paul Licameli
PRL
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
audacity-devel mailing list
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Loading...