This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Remove non-variadic overloads of allocator_traits::construct.
ClosedPublic

Authored by zoecarver on May 16 2020, 2:10 PM.

Details

Summary

Libcxx only supports compilers with variadics. We can safely remove all "fake" variadic overloads of allocator_traits::construct.

This also provides the correct behavior if anything other than exactly one argument is supplied to allocator_traits::construct in C++03 mode.

Diff Detail

Event Timeline

zoecarver created this revision.May 16 2020, 2:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2020, 2:10 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
zoecarver edited the summary of this revision. (Show Details)May 16 2020, 2:11 PM
ldionne requested changes to this revision.May 19 2020, 6:04 AM
ldionne added inline comments.
libcxx/include/memory
1421

Is there any reason why this can't be shared with the non-C++03 implementation above?

This revision now requires changes to proceed.May 19 2020, 6:04 AM
zoecarver marked an inline comment as done.May 19 2020, 5:29 PM
zoecarver added inline comments.
libcxx/include/memory
1421

No reason. I'll replace the current implementation with this one.

zoecarver updated this revision to Diff 265098.May 19 2020, 5:32 PM
  • Rebase off master
  • Unify __has_construct implementation
ldionne accepted this revision.May 20 2020, 2:46 PM

LGTM if this passes in both pre and post C++11.

This revision is now accepted and ready to land.May 20 2020, 2:46 PM
This revision was automatically updated to reflect the committed changes.