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

common: add message to deprecated macros #340

Merged
merged 3 commits into from
Sep 21, 2022

Conversation

edoardolombardi
Copy link
Member

Added new macro to define functions as deprecated with message as input argument.

With this new macros BITPIT_DEPRECATED_FOR (one for each supported compiler as the original ones) is possibile to pass a message to indicate wich method has to be used instead.

Currently compiled and tested only for GNUC case.

src/common/compiler.hpp Outdated Show resolved Hide resolved
src/common/compiler.hpp Outdated Show resolved Hide resolved
@andrea-iob
Copy link
Member

Could you please also add "define BITPIT_DEPRECATED_FOR(func, replacement) func" in the else branch? This will allow unsupported compilers to still compile bitpit even if we don't explicitly define a deprecated macro for them.

@andrea-iob
Copy link
Member

Since we are changing this part of the code, I changed the message displayed when deprecated macros are not implemented ad fixed the indentation.

@andrea-iob andrea-iob merged commit a7ceb2c into master Sep 21, 2022
@andrea-iob andrea-iob deleted the common.add.message.to.deprecated branch September 21, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants