[all-commits] [llvm/llvm-project] c77af0: [libc++] mark barrier constructor as explicit in <...

Edo via All-commits all-commits at lists.llvm.org
Wed Jul 12 12:31:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c77af00eb98c8029b29b5b86396b109fd343c11b
      https://github.com/llvm/llvm-project/commit/c77af00eb98c8029b29b5b86396b109fd343c11b
  Author: Edoardo Sanguineti <edoardo.sanguineti222 at gmail.com>
  Date:   2023-07-12 (Wed, 12 Jul 2023)

  Changed paths:
    M libcxx/include/barrier
    A libcxx/test/std/thread/thread.barrier/ctor.compile.pass.cpp

  Log Message:
  -----------
  [libc++] mark barrier constructor as explicit in <barrier>

If I read the standard correctly, the public constructor of "barrier" should be marked as "constexpr explicit".
I see some of the internal classes used by the barrier header are correctly marked but I think, if I'm not mistaken, the standard would like the public class to have the correct definition as well.

Because the implementation that llvm uses by default is not constexpr friendly at this time, this revision will focus on only marking it as explicit.

Reviewed By: #libc, philnik, Mordante

Spies: philnik, Mordante, libcxx-commits

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




More information about the All-commits mailing list