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

Add constructor to spdlog::source_loc using std::source_location #2979

Closed

Conversation

stephanlachnit
Copy link

Alternative to #2973, closes #1959.

Compared to #1959, this now only adds a constructor to spdlog::source_loc using std::source_location (if available), but does not change the type of line in the struct or use std::source_location::current() in the SPDLOG_LOGGER_CALL macro.

Motivation for this change is given in #2973 (comment).

@gabime
Copy link
Owner

gabime commented Jan 13, 2024

Thanks. However, Like I already mentioned, I prefer not to deal with std::source_location in branch 1.x.
As a side note, I think passing const ref might be less performant than passing by value as this is small constpexr struct.

@gabime gabime closed this Jan 13, 2024
@stephanlachnit stephanlachnit deleted the p-std-source-location branch January 14, 2024 09:50
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.

Example code how to use your library with the c++20 source_location
2 participants