[PATCH] D48669: [pair] Mark constructors as conditionally noexcept

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 27 13:18:58 PDT 2018


ldionne created this revision.
ldionne added reviewers: mclow.lists, EricWF.
Herald added subscribers: llvm-commits, christof.

std::tuple marks its constructors as noexcept when the corresponding
memberwise constructors are noexcept too -- this commit improves std::pair
so that it behaves the same.

Note:
I did not add support in the explicit and non-explicit `pair(_Tuple&& __p)`
constructors because those are non-standard extensions, and supporting them
properly is tedious (we have to copy the rvalue-referenceness of the deduced
_Tuple&& onto the result of tuple_element).

rdar://problem/29537079


Repository:
  rL LLVM

https://reviews.llvm.org/D48669

Files:
  libcxx/include/utility
  libcxx/test/std/utilities/utility/pairs/pairs.pair/U_V.pass.cpp
  libcxx/test/std/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp
  libcxx/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp
  libcxx/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
  libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp
  libcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp
  libcxx/test/support/archetypes.hpp
  libcxx/test/support/archetypes.ipp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48669.153163.patch
Type: text/x-patch
Size: 25460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180627/c8db6482/attachment.bin>


More information about the llvm-commits mailing list