[PATCH] D25389: Fix std::pair on FreeBSD
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 19:30:00 PDT 2016
EricWF created this revision.
EricWF added reviewers: emaste, dim, theraven, rsmith.
EricWF added a subscriber: cfe-commits.
FreeBSD ships an old ABI for std::pair which requires that it have non-trivial copy/move constructors. Currently the non-trivial copy/move is achieved by providing explicit definitions of the constructors. This is problematic because it means the constructors don't SFINAE properly. In order to SFINAE copy/move constructors they have to be explicitly defaulted and hense non-trivial.
This patch attempts to provide SFINAE'ing copy/move constructors for std::pair while still making them non-trivial. It does this by adding a base class with a non-trivial copy constructor and then allowing pair's constructors to be generated by the compiler. This also allows the constructors to be constexpr.
https://reviews.llvm.org/D25389
Files:
include/utility
test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25389.74009.patch
Type: text/x-patch
Size: 8206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161008/ca52a8ff/attachment-0001.bin>
More information about the cfe-commits
mailing list