[libcxx-commits] [PATCH] D99567: [libc++] Make future_error constructor standard-compliant.

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 30 01:44:19 PDT 2021


curdeius created this revision.
curdeius added a reviewer: ldionne.
curdeius requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Found during D99515 <https://reviews.llvm.org/D99515>.
This patch tries not to change the behaviour for C++14 and below where there was no standard-compliant way for the user to construct a future_error.
>From C++17 onwards, this patch makes future_error(future_errc) ctor explicit and make future_error(error_code) ctor private.
This will break the code of users that depend on this (non-standard) extension.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99567

Files:
  libcxx/include/future
  libcxx/src/future.cpp
  libcxx/test/std/thread/futures/futures.future_error/code.pass.cpp
  libcxx/test/std/thread/futures/futures.future_error/ctor.fail.cpp
  libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99567.334074.patch
Type: text/x-patch
Size: 7021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210330/c15e3b51/attachment-0001.bin>


More information about the libcxx-commits mailing list