KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.01k stars 244 forks source link

Adoption of C++17 #9916

Closed roigcarlo closed 2 years ago

roigcarlo commented 2 years ago

Dear @KratosMultiphysics/all

As some of you may have know some time ago we starting discussion the possibility of moving to C++17. After some preparation, we believe we finally are in a comfortable position to make the change and we tentatively want to make it official by July 1

We will create a branch with the proper changes in the configuration files, etc so we can se beforehand if there is any incompatibility. Note that, even if we did not support it officially, we have been running with C++17 standard in selected configurations of the CI builds for quite some time now, so we expect (hopefully) no major issues.

Note that C++17 should be compatible with the already supported versions of Visual Studio (2017+), GCC 8+, Clang 7+ and 19.0.1+

If you use older versions of the mentioned compilers we kindly ask you to update before July 1st so everything keeps working.

RiccardoRossi commented 2 years ago

note also that at least gcc 8 will be needed

loumalouomega commented 2 years ago

https://en.cppreference.com/w/cpp/compiler_support/17

Clang is not fully supported until 7. (for example, filesystem is supported in LLVM 7)

roigcarlo commented 2 years ago

ok updated, I missed the library part :P

matekelemen commented 2 years ago

A recent update got GCC 12.1.0 on my system, and I'm getting a lot of warnings about std::unary_function and std::binary_function that were deprecated in C++11. Here's where they're used:

No errors just yet, but they'll have to be replaced sooner or later since they were officially removed in C++17.

loumalouomega commented 2 years ago

Idem (I have the same issue with gcc 12)

El vie., 27 may. 2022 12:02, Máté Kelemen @.***> escribió:

A recent update got GCC 12.1.0 on my system, and I'm getting a lot of warnings about std::unary_function and std::binary_function that were deprecated in C++11. Here's where they're used:

  • kratos/utilities/body_distance_calculation_utils.h
  • kratos/containers/vector_map.h
  • kratos/containers/geometry_container.h
  • kratos/containers/set_identity_function.h
  • kratos/containers/pointer_vector_map.h
  • kratos/containers/pointer_vector_set.h
  • kratos/spaces/ublas_space.h
  • kratos/includes/model_part.h

No errors just yet, but they'll have to be replaced sooner or later since they were officially removed https://en.cppreference.com/w/cpp/utility/functional#Old_binders_and_adaptors in C++17.

— Reply to this email directly, view it on GitHub https://github.com/KratosMultiphysics/Kratos/issues/9916#issuecomment-1139469544, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYQZAF5KCUX3OUK4HRDSXLVMCMNNANCNFSM5WPYBPCA . You are receiving this because you are on a team that was mentioned.Message ID: @.***>

roigcarlo commented 2 years ago

@KratosMultiphysics/all As you may have noticed, all changes are already in place and our official version is C++17. Thx all!