Closed Manu343726 closed 3 years ago
We don't define any special macros to identify this work; I wouldn't say there's a recommended way to detect this either. I'm curious what your exact use case would be?
That said, __has_include
seems reasonable, e.g.:
https://cppx.godbolt.org/z/vfM3nb
vs
https://cppx.godbolt.org/z/8x8bh8
I plan to write a backend for my tinyrefl library (https://github.com/Manu343726/tinyrefl) using your clang fork, to see how it would look like to integrate an std reflection metadata API and get rid of external parsing.
The check is required to see whether the backend is available and raise the proper diagnostic to the user if it's missing
Okay good to know, thanks for your interest, and please feel free to leave feedback with us about your experience. :)
Also a friendly reminder, please keep in mind things here are too a work in progress, and subject to change as things progress in the standardization process.
I'm going to go ahead and close this, as I think __has_include
will satisfy your needs.
I think __has_include() will do the job perfectly, thanks for your time.
Hi, I was wondering what would be the value of
__clang__
macro for this compiler so I can check if I'm running through it, or if there's some other recommended mechanism, like doing__has_include(experimental/meta)
. Thank you,