Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation if std::format_string is not known #584

Merged

Conversation

R2RT
Copy link
Contributor

@R2RT R2RT commented Sep 25, 2023

Problem:

  • std::format_string was retroactively exposed in C++20 by P2508R1

Some STL implementations may not have it implemented (e.g. one shipped with MSVC cl.exe 19.34.31935).

Solution:

  • Check feature test flag __cpp_lib_format >= 202207L, use std::string_view when too old.
  • Alternatively, we could require __cpp_lib_format >= 202207L to enable BOOST_UT_HAS_FORMAT

@R2RT R2RT force-pushed the fix/std-format-string-not-defined branch from 736192f to 609b95f Compare September 25, 2023 07:04
@kris-jusiak kris-jusiak merged commit 837807e into boost-ext:master Sep 25, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants