rmaprath added a comment.

In http://reviews.llvm.org/D20328#456271, @mclow.lists wrote:

> >   I've adopted a initialize-on-first-use policy to workaround this 
> > particular problem.
>
>
> That's not constexpr.
>
> You say it in your comment "This prohibits any prospects of calling a runtime 
> initialization routine", but then you have a runtime initialization routine.


`std::mutex()` constructor is still constexpr, what I've done is to defer the 
initialization to `lock()` and `unlock()` methods. This is pretty much the only 
way I can keep the constructor constexpr and allow an underlying platform 
implementation to provide the guts of `std::mutex`.

Hope that makes sense?


http://reviews.llvm.org/D20328



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to