X Tutup
Skip to content

Include <algorithm> for std::max#5828

Merged
sturnclaw merged 1 commit intopioneerspacesim:masterfrom
AMDmi3:include-algorithm
Apr 27, 2024
Merged

Include <algorithm> for std::max#5828
sturnclaw merged 1 commit intopioneerspacesim:masterfrom
AMDmi3:include-algorithm

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;
        ^

@sturnclaw sturnclaw merged commit d4ce2a4 into pioneerspacesim:master Apr 27, 2024
@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

X Tutup