]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
Pull in r283944 from upstream libc++ trunk (by Eric Fiselier):
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Mar 2017 18:28:13 +0000 (18:28 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Mar 2017 18:28:13 +0000 (18:28 +0000)
commitb0185a71cda775841829d13085de9fad519bd624
treef58d1e22f5bd337e634bc6ae0767026a66f86df9
parentcaee39569e6b7782ab147bd68223876ad7f3fe15
Pull in r283944 from upstream libc++ trunk (by Eric Fiselier):

  Fix std::pair on FreeBSD

  Summary:
  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.

  Reviewers: emaste, theraven, rsmith, dim

  Subscribers: cfe-commits

  Differential Revision: https://reviews.llvm.org/D25389

This should fix building www/chromium 57.0.2987.110 on stable/10 and
stable/9 without having to use -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 (which
changes the ABI).  Direct commit to stable/10 and stable/9, since head
already has libc++ 4.0, which includes this fix.

git-svn-id: svn://svn.freebsd.org/base/stable/10@315915 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/libc++/include/utility