hb_identity returns rvalue-reference if input is rvalue. That, can leak
the reference and cause in bad access to temporaries after they are
destructed. This is unfortunately unfixable given the desired
transparency of hb_identity :(. Just don't use it with hb_map().
Let's see if fixes MSVC fail. Though, the error doesn't make sense to me.
hb-blob.cc
c:\projects\harfbuzz\src\hb-algs.hh(166): error C2440: 'return': cannot convert from 'unsigned int' to 'unsigned int &&' [C:\projects\harfbuzz\build\harfbuzz.vcxproj]
c:\projects\harfbuzz\src\hb-algs.hh(166): note: You cannot bind an lvalue to an rvalue reference
c:\projects\harfbuzz\src\hb-algs.hh(174): note: see reference to function template instantiation 'T &&<unnamed-type-hb_min>::impl<T,unsigned int&>(T &&,T2) const' being compiled
with
[
T=unsigned int,
T2=unsigned int &
]