mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Move from boost::optional to std::optional

Open peterfpeterson opened this issue 6 months ago • 0 comments

Description of work

Since std::optional is part of C++17, move the easy parts of mantid to use it. This does not modify Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPairParser.h or the ISISReflectometryGUI code.

Framework/API/inc/MantidAPI/AlgorithmProperties.h was made to support both std::optional and boost::optional to handle the ISISReflectometryGUI not being moved.

Purpose of work

The preference for implementation (in order) is generally:

  1. compiler feature
  2. existing dependency / write in the repository
  3. new dependency

This is moving from boost to c++17

Refs #37875.

Further detail of work

To test:

This is a refactor and does not require anything other than the changes make sense and the tests continue to pass

This does not require release notes because it is an internal change to modernize the code.


Reviewer

Please comment on the points listed below (full description). Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

peterfpeterson avatar Aug 27 '24 17:08 peterfpeterson