Pressio / pressio

core C++ library
Other
45 stars 7 forks source link

Update code to reflect minimum C++ version is 17 #684

Open cwschilly opened 3 weeks ago

cwschilly commented 3 weeks ago

Some blocks, such as this one in rom/impl/galerkin_steady_system_default.hpp, are guarded by #ifdef PRESSIO_ENABLE_CXX17:

#ifdef PRESSIO_ENABLE_CXX17
    fomSystem_.get().residualAndJacobianAction(fomState_, fomResidual_, phi,
                           std::optional<fom_jac_action_result_type *>(&fomJacAction_));
#else
    fomSystem_.get().residualAndJacobianAction(fomState_, fomResidual_, phi, &fomJacAction_);
#endif

Since we now require 17 as the minimum C++ version, we can simplify these sections.