Skip to content

Conversation

WinterSolstice8
Copy link

I'm using this library in a project that makes heavy use of linters/clang format etc and not using qualified std::move was causing compilation errors specifically in clang.

I made this change to accommodate for that

@bombela
Copy link
Owner

bombela commented Apr 14, 2025

The reason for using move unqualified is because it is std::move on C++11 and onward. But it is template <typename T> T &move(T &v) { return v; } on C++98. Which somewhat behaves a bit like std::move thanks to copy elision.

See what is being imported/set before/after C++11: https://github.com/bombela/backward-cpp/blob/master/backward.hpp#L414

@lahwaacz
Copy link
Contributor

However, the build system requires C++11: https://github.com/bombela/backward-cpp/blob/master/CMakeLists.txt#L65

@bombela
Copy link
Owner

bombela commented Apr 15, 2025 via email

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.

3 participants