Skip to content

improve conversion from header file name to macro #518

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yudi-matsuzake
Copy link

Suppose we are in the file my-header.hpp. This snippet would expand the once macro to #define MY-HEADER_H which is not an ideal expansion because the MY-HEADER_H is not a valid macro definition and my file should be _HPP (for c++) and not _H. With this modification, this snippet will expand:

  • my-header.hpp -> MY_HEADER_HPP
  • my_header.h -> MY_HEADER_H
  • my.header.hxx -> MY_HEADER_HXX

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.

1 participant