This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] improve exception text when threads not enabled


On 13 August 2012 18:49, Jonathan Wakely wrote:
> I suppose EOPNOTSUPP might be better, if it's supported everywhere.
> EPERM has the advantage of being a documented error for
> pthread_create.

We do define std::errc::operation_not_supported unconditionally on
most platforms, but not mingw or djgpp.  They don't necessarily
support std::errc::operation_not_permitted either, and so far noone
has made std::thread work on those targets anyway, so that's not a
showstopper.

e.g.

terminate called after throwing an instance of 'std::system_error'
  what():  Enable multithreading to use std::thread: Operation not supported
Aborted


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]