[patch] fix thread test cases for solaris.

Paolo Carlini paolo.carlini@oracle.com
Tue Jan 13 00:22:00 GMT 2009

Chris Fairles wrote:
> this_thread::yield can be inlined, thread::swap can be inlined.
> Working on defining thread::id inline but running into issues with
> "thread::id this_thread::get_id()" function which requires the private
> ctor of thread::id. Thus, it is declared a friend in thread::id, but
> the friend decl needs a decl of the function... which nees a
> declaration of thread::id ... which, for inner classes can't be at
> namespace scope. Boo-urns. Will have to get around it with helper
> functions or something but i'm sure it can be done.
I see, but you can as well move this_thread::get_id to <thread> by
defining it in the proper place, that is after the entire thread::id,
marked inline. Likewise for thread::joinable, I think.

Thanks again,

More information about the Gcc-patches mailing list