This is an archive of the discontinued LLVM Phabricator instance.

Fix DensetSet::insert_as() for MSVC2015 (NFC)
ClosedPublic

Authored by mehdi_amini on Aug 26 2016, 10:30 PM.

Details

Summary

The latest MSVC update apparently resolve the call from the
const ref variant to itself, leading to an infinite
recursion. It is not clear to me why the r-value overload is
not selected. ValueT is a pointer type, and the functional-style
cast in the call insert_as(ValueT(V), LookupKey); should result
in a r-value ref.

If anyone understand...

Diff Detail

Repository
rL LLVM

Event Timeline

mehdi_amini retitled this revision from to Fix DensetSet::insert_as() for MSVC2015 (NFC).
mehdi_amini updated this object.
mehdi_amini added a subscriber: llvm-commits.
chandlerc accepted this revision.Aug 26 2016, 11:21 PM
chandlerc edited edge metadata.

Provided this fixes the issue users are seeing with certain host compilers, it seems a good approach.

Not sure if you want to leave a comment about intentionally avoiding calling from one overload to the other?

Either way, feel free to submit if this helps folks.

This revision is now accepted and ready to land.Aug 26 2016, 11:21 PM
This revision was automatically updated to reflect the committed changes.