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: [patch] fix thread test cases for solaris.


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,
Paolo.


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