[libcxx-dev] LLVM libcxx "hash" clashes with custom define "hash"
Oliver Major via libcxx-dev
libcxx-dev at lists.llvm.org
Wed Jul 29 05:32:48 PDT 2020
I am new here and in fact not subscribed, I just have a question and don't
even know if I am at the right address.
We recently found a bug in our product code when building with NDK Clang
for Android and it is related to the LLVM libcxx. It is fairly easy to
reproduce and a quick internet search reveals that we are not the only ones
with this or a similar issue.
What we did, was
#define hash #
which let to a problem with libcxx/include/type_traits:417
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
of course. We obviously shouldn't let defines leak into the stdlib, so it
is our fault, we fixed it simply by renaming the define.
I didn't want to post it as a bug in the LLVM bugtracker, because I don't
even think it needs fixing on LLVM side. I just wanted to make aware that
this issue exists for some people and wanted to ask if there is a way to
publicly document this issue somewhere, so people having problems with this
can potentially find a solution on the internet.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libcxx-dev