Skip to content

Fix std::string / std::regex ambiguity and update logger for modern spdlog#98

Merged
SarahWeiii merged 3 commits into
SarahWeiii:mainfrom
clintmorris229:fix-string-namespace-ambiguity
Apr 10, 2026
Merged

Fix std::string / std::regex ambiguity and update logger for modern spdlog#98
SarahWeiii merged 3 commits into
SarahWeiii:mainfrom
clintmorris229:fix-string-namespace-ambiguity

Conversation

@clintmorris229
Copy link
Copy Markdown
Contributor

@clintmorris229 clintmorris229 commented Apr 10, 2026

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.

  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.
@clintmorris229 clintmorris229 marked this pull request as ready for review April 10, 2026 19:27
@SarahWeiii SarahWeiii merged commit 8f17655 into SarahWeiii:main Apr 10, 2026
8 of 9 checks passed
@clintmorris229
Copy link
Copy Markdown
Contributor Author

@SarahWeiii Thanks for merging! Looking forward to this in the next release.

@clintmorris229
Copy link
Copy Markdown
Contributor Author

@SarahWeiii Is there a planned release date for this commit?

@SarahWeiii
Copy link
Copy Markdown
Owner

Hi I have been a bit busy these days, will try to release it within this week, after checking another pending PR.

@SarahWeiii
Copy link
Copy Markdown
Owner

Updated a new release.

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