This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Make __compressed_pair fully constexpr
ClosedPublic

Authored by philnik on Dec 13 2021, 5:15 PM.

Details

Summary

Make __compressed_pair fully constexpr

Diff Detail

Event Timeline

philnik requested review of this revision.Dec 13 2021, 5:15 PM
philnik created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2021, 5:15 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik updated this revision to Diff 394094.Dec 13 2021, 5:17 PM

Added spaces

nilayvaish accepted this revision.Dec 13 2021, 5:58 PM
ldionne accepted this revision.Dec 14 2021, 6:36 AM
This revision is now accepted and ready to land.Dec 14 2021, 6:36 AM
This revision was automatically updated to reflect the committed changes.
libcxx/include/__memory/compressed_pair.h
61–62

Consider linebreaking before the return type, now that these lines are so long. Ditto below.

168–169

Here and below I'd prefer to leave the whitespace alone. But no big deal either way.

_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
void swap(__compressed_pair& __x)
  _NOEXCEPT_(__is_nothrow_swappable<_T1>::value &&
             __is_nothrow_swappable<_T2>::value)