Fix std::string / std::regex ambiguity and update logger for modern spdlog#98
Merged
SarahWeiii merged 3 commits intoApr 10, 2026
Merged
Conversation
wraps format strings in fmt::runtime() for modern spdlog (fmt v8+) to bypass C++20 consteval strictness, while falling back to a standard pass-through for older, legacy versions of spdlog.
Contributor
Author
|
@SarahWeiii Thanks for merging! Looking forward to this in the next release. |
Contributor
Author
|
@SarahWeiii Is there a planned release date for this commit? |
Owner
|
Hi I have been a bit busy these days, will try to release it within this week, after checking another pending PR. |
Owner
|
Updated a new release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses compilation errors when building CoACD with modern dependency versions (OpenVDB 11+, spdlog 1.15+) via Bazel. It resolves these namespace and format string issues while ensuring strict backwards compatibility with existing CMake setups and legacy dependencies.
Changes
Namespace Resolution: Added explicit std:: prefixes to string and regex in main.cpp and core library files to resolve an ambiguity collision with openvdb::string.
Logger Compatibility: Updated src/logger.h with a fallback macro (COACD_RUNTIME_FMT) to handle version differences in spdlog. Modern spdlog (pulled via Bazel) requires fmt::runtime() to process format strings, while older versions (via CMake/Unreal Engine environments) do not. This macro ensures the code compiles in modern Bazel environments without altering function signatures or breaking legacy CMake builds.