Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Cannot call non-constexpr function in constexpr context (#2010)
Problem: - gcc-8 gives the following error when compiling this function on all standards: test/std-format-test.cc: In member function 'constexpr auto std::formatter<S>::parse(std::format_parse_context&)': test/std-format-test.cc:112:17: error: call to non-'constexpr' function 'int isdigit(int)' if (!isdigit(c) || (++iter, get_char()) != '}') ~~~~~~~^~~ Solution: - Write a `constexpr` version of `isdigit` for use in this function. Co-authored-by: Jonathan Gopel <[email protected]>
- Loading branch information