The current output of a check assertion includes std::source_location::file_name:
|
auto check(bool pred, std::source_location loc) noexcept -> void { |
|
if (pred) return; |
|
trace(loc.file_name(), ":", loc.line(), ": ", loc.function_name(), ": check failed"); |
|
std::terminate(); |
|
} |
In certain implementations, this can expose the absolute path of the file being compiled, potentially revealing the directory structure of the developer's environment.
A better approach might be to keep only the file's base name or remove the path components leading up to the project's directory structure.
The current output of a check assertion includes
std::source_location::file_name:corofx/src/check.cpp
Lines 14 to 18 in 8e0d439
In certain implementations, this can expose the absolute path of the file being compiled, potentially revealing the directory structure of the developer's environment.
A better approach might be to keep only the file's base name or remove the path components leading up to the project's directory structure.