Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include <algorithm> for std::max #5828

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

AMDmi3
Copy link
Contributor

@AMDmi3 AMDmi3 commented Apr 23, 2024

No description provided.

@impaktor
Copy link
Member

This silences a warning, or fixes the build on some OS?

@AMDmi3
Copy link
Contributor Author

AMDmi3 commented Apr 24, 2024

This fixes build on FreeBSD (clang + libc++)

In file included from /work/usr/ports/games/pioneer/work/pioneer-20240314/src/BaseSphere.cpp:4:
In file included from /work/usr/ports/games/pioneer/work/pioneer-20240314/src/BaseSphere.h:7:
In file included from /work/usr/ports/games/pioneer/work/pioneer-20240314/src/Camera.h:10:
In file included from /work/usr/ports/games/pioneer/work/pioneer-20240314/src/graphics/Frustum.h:7:
In file included from /work/usr/ports/games/pioneer/work/pioneer-20240314/src/Plane.h:9:
/work/usr/ports/games/pioneer/work/pioneer-20240314/src/vector3.h:314:13: error: no member named 'max' in namespace 'std'; did you mean 'fmax'?
        using std::max; // support max(T) overloads
              ~~~~~^~~
                   fmax
/usr/include/c++/v1/cmath:434:9: note: 'fmax' declared here
using ::fmax _LIBCPP_USING_IF_EXISTS;
        ^

@Web-eWorks Web-eWorks merged commit d4ce2a4 into pioneerspacesim:master Apr 27, 2024
5 checks passed
@AMDmi3 AMDmi3 deleted the include-algorithm branch April 27, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants