[all-commits] [llvm/llvm-project] d2cb19: [libc++] Make future_error constructor standard-co...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Thu Oct 5 06:12:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2cb198f25c82bf77bb113763771590cc79a21a4
      https://github.com/llvm/llvm-project/commit/d2cb198f25c82bf77bb113763771590cc79a21a4
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M libcxx/docs/ReleaseNotes/18.rst
    M libcxx/include/future
    M libcxx/src/future.cpp
    M libcxx/test/std/thread/futures/futures.future_error/code.pass.cpp
    A libcxx/test/std/thread/futures/futures.future_error/ctor.pass.cpp
    A libcxx/test/std/thread/futures/futures.future_error/types.compile.pass.cpp
    R libcxx/test/std/thread/futures/futures.future_error/types.pass.cpp
    M libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
    M libcxx/utils/data/ignore_format.txt

  Log Message:
  -----------
  [libc++] Make future_error constructor standard-compliant

This patch removes the non compliant constructor of std::future_error
and adds the standards compliant constructor in C++17 instead.

Note that we can't support the constructor as an extension in all
standard modes because it uses delegating constructors, which require
C++11. We could in theory support the constructor as an extension in
C++11 and C++14 only, however I believe it is acceptable not to do that
since I expect the breakage from this patch will be minimal.

If it turns out that more code than we expect is broken by this, we can
reconsider that decision.

This was found during D99515.

Differential Revision: https://reviews.llvm.org/D99567
Co-authored-by: Louis Dionne <ldionne.2 at gmail.com>




More information about the All-commits mailing list