TLS and object with constructor

Hello,
I have several global variables which are objects of user defined classes. I need to instantiate them with the thread attribute by using "__declspec (thread)".
but currently, Thread Local Storage (TLS) has only been implemented for aggregate types (such as int, float, char ...).

using "__declspec (thread)" to declare these objects, generetes following error:

error C2483: object with constructor cannot be declared 'thread'

How can I declare an object with constructor and data members as thread??
How can I resolve this problem?
Is there any library that supports TLS?

Thank you
If you're working with Windows, you could check out this example: http://msdn.microsoft.com/en-us/library/ms686991(VS.85).aspx . If Linux or other, I don't know.
Topic archived. No new replies allowed.