Compile Error: 'min_element' is not member of 'std'

Issue #1115 resolved
Edwin Mai created an issue

While trying to build dolfin 2019.1.0 using spack I received an error for IntersectionConstruction.cpp that ‘min_element’ is not member of the C++ standard library. Adding the header #include<algorithm> would fix this issue, however would there be a work around without the requirement to change the source code as well?

System Spec:

  • CentOS 7.6
  • GCC 4.8.5

Comments (4)

  1. Stefan Brüns

    This is due to boost no longer including algorithm, sometime between boost 1.71 and boost 1.74.

  2. Khan Tran

    A similar thing happened with MeshFunction.h. I got “error: ‘count’ is not a member of ‘std’; did you mean ‘cout’?” Had to add #include<algorithm> to make it work.

  3. Log in to comment