David Abrahams wrote: > "Peter Dimov" <[EMAIL PROTECTED]> writes: > >> Looks like a no-brainer, &k can't be a compile-time constant if k is >> thread-local. >> >> 1. >> >> void f() >> { >> C<&k> ck; >> } [...] >> The type of ck cannot depend on the thread that is executing f. > > It doesn't have to. When used as a template parameter, an address > could refer to something more like a member function pointer, i.e. an > offset in the thread's table of globals.
C has been declared as template<int * p> class C; An int* is an int*. I don't think that any implementation has mini-union-pointers to accomodate thread local addresses. The performance impact would kill pointers. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost