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

RTL_CONSTANT_STRING doesn't work on C++ #48

Open
namazso opened this issue Oct 12, 2024 · 0 comments
Open

RTL_CONSTANT_STRING doesn't work on C++ #48

namazso opened this issue Oct 12, 2024 · 0 comments

Comments

@namazso
Copy link
Contributor

namazso commented Oct 12, 2024

It would be great if this macro was usable in C++. I always have to undefine and redefine it with this:

#define RTL_CONSTANT_STRING(s)                                                                       \
  {                                                                                                  \
    sizeof(s) - sizeof((s)[0]),                                                                      \
      sizeof(s),                                                                                     \
      (std::add_pointer_t<std::remove_const_t<std::remove_pointer_t<std::decay_t<decltype(s)>>>>)(s) \
  }

It'd be great if equivalent functionality could be implemented in phnt by testing for __cplusplus

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

No branches or pull requests

1 participant