BlueQuartzSoftware / simplnx

The backend algorithms and framework associated with DREAM3DNX, a data analysis program for materials science data analytics
http://www.dream3d.io/
Other
7 stars 9 forks source link

ENH: Update required standard to C++20 #1004

Closed JDuffeyBQ closed 1 month ago

nyoungbq commented 2 months ago

Some notes: Since this PR is mainly about getting compatibility up, I don't think these are necessary here I just wanted to mention them, since they are related to the topic of the PR.

JDuffeyBQ commented 2 months ago

Yeah I was waiting until this gets merged to do any improvements to keep this PR minimal.

For nonstd::span it actually detects if std::span is available and typedefs it if it is. So it will be using it for the compile but to minimize our dependencies we can remove it in the future.

The issue with std::string_view is that it is not guaranteed to be null terminated since it can represent an arbitrary slice of a string. Our StringLiteral is a null terminated string basically a std::string_view-like wrapper around a true string literal. This is useful for third party APIs that take char* where they assume it is null terminated.