Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-19 08:46:29


Ken Hagan wrote:
[...]
> In implementation terms, pmk is a compile-time constant, so I think it
> could be an acceptable template parameter. On the other hand, the code
> required to extract the integer value is different from the code
> required
> to dereference a normal variable. On the third hand, compilers
> supporting
> TLS already face this problem when I write...
>
> __declspec(thread) int k;
> int* pk = &k;
>
> ...and I don't think being a template parameter adds anything new.

&k does not exist yet at compile-time (in a pointer to int form), when
templates are instantiated.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk