[libcxx-commits] [PATCH] D91992: [libc++] Add an extension to allow constructing std::thread from native handles

Jonathan Wakely via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 27 09:23:48 PST 2020


jwakely added a comment.

In D91992#2420452 <https://reviews.llvm.org/D91992#2420452>, @ldionne wrote:

> Right, thanks for these thoughts -- I agree that adding a public constructor taking `int` is not ideal.

It occurred to me later that a platform could in theory use `void(*)()` as `pthread_t`, as an opaque type that doesn't convert to other pointers or to integers. And then you'd have an ambiguity between the constructor taking a callable and the constructor taking a `native_handle_type`. Maybe unlikely, but not inconceivable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91992/new/

https://reviews.llvm.org/D91992



More information about the libcxx-commits mailing list