[boost] Re: checked_delete.hpp fix

2003-02-24 Thread Nicola Musatti
Beman Dawes wrote:> At 07:32 PM 2/24/2003, Daniel Frey wrote: >Hi, > >I came across the following problem: > >When I have a class X which lives in a namespace where there's a function >'checked_delete' declared that can take a X*, smart_ptr (and probably >others) >that use checked_deleter (

[boost] RE: Any interest in a stats class

2003-02-24 Thread Jason D Schmidt
I know this is well after the discussion on the stats class has ended, but I think I have a good idea here.   Scott Kirkwood proposed a class that behaves something like this:     stats myStats;    for (int i = 0; i < 100; ++i) {    myStats.add(i);    }    cout << "Average: " << myStats.

[boost] Re: Re: Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread Edward Diener
William E. Kempf wrote: > Edward Diener said: >> "William E. Kempf" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> >>> Edward Diener said: "Alexander Terekhov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Ken Hagan wrote: >> >> Alexan

[boost] Re: Re: Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: [...] >> What will happen to a normal type then? > > What is a "normal type"? Any type besides optional. >> { >> T storage = T(x, y, z); // throws >> >> // storage.~T() destroys non-existent T > > Storage never gets constructed if T(x,y,z) throws, so it is also > n

[boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Fernando Cacciola wrote: [...] > Anyway, doesn't this require a definition of placement operator new > for each T? Maybe for each optional if I am on the same wave length. Philippe A. Bouchard ___ Unsubscribe & other changes: http://lists.boost.

[boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Fernando Cacciola wrote: [...] > It seems there is something one of us don't understand... > optional::m_storage has nothing to do with alignment to 'int' > unless T happens to be aligned just like 'int', which won't always be > the case, so I don't > see the relation between optional's storage a

Re: [boost] Re: io operations for stl containers?

2003-02-24 Thread Terje Slettebø
>From: "Jason House" <[EMAIL PROTECTED]> > Terje Slettebø wrote: > > > > >From: "Vladimir Prus" <[EMAIL PROTECTED]> > > > > Sorry for having taken so long to respond to these messages. I felt a need > > for a break, to consider how it might be done. > > I was wondering about this line of discussio

Re: [boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Fernando Cacciola" <[EMAIL PROTECTED]> writes: > No, right're right :-) > Is perfectly possible to simply discard it, though to me it looks kind of > akward in anything but deeply low-level code. > > Anyway, doesn't this require a definition of placement operator new for each > T? I don't know,

Re: [boost] Re: Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread William E. Kempf
Edward Diener said: > "William E. Kempf" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> Edward Diener said: >> > "Alexander Terekhov" <[EMAIL PROTECTED]> wrote in message >> > news:[EMAIL PROTECTED] >> >> >> >> Ken Hagan wrote: >> >> > >> >> > Alexander Terekhov wrote: >> >> >

[boost] Re: questions and comment about optional

2003-02-24 Thread Fernando Cacciola
"Stephen Lamb" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > I'm not absolutely sure I have the latest class optional but here goes. > > Why does optional not have an assignment operator which takes a value? > Experience shown that this question is hard to answer convincely..

Re: [boost] Review Managers Wanted

2003-02-24 Thread Beman Dawes
At 03:41 PM 2/24/2003, Thomas Witt wrote: >I am looking for volunteers who are willing to act as review manager. Due >to the increasing number of review requests the current pool of review >managers just isn't enough. As of now we do have a backlog of five >outstanding reviews. For those intereste

Re: [boost] checked_delete.hpp fix

2003-02-24 Thread Beman Dawes
At 07:32 PM 2/24/2003, Daniel Frey wrote: >Hi, > >I came across the following problem: > >When I have a class X which lives in a namespace where there's a function >'checked_delete' declared that can take a X*, smart_ptr (and probably >others) >that use checked_deleter (note the 'r'!) cannot call c

[boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Fernando Cacciola
"Philippe A. Bouchard" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Fernando Cacciola (Home) wrote: > > [...] > > >> Well it depends on the platform but if sizeof(bool) == sizeof(int) on > > Intel, > > > > ^^^ > > Were does this 'int' comes from? > > sizeof(bool) may vary

[boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Fernando Cacciola
"David Abrahams" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > "Fernando Cacciola" <[EMAIL PROTECTED]> writes: > > > I thougth about placement new as a way to achieve > > in-place optional construction, precisely because of the forwarding > > problem, but I couldn't get it to

Re: [boost] Re: Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > David Abrahams wrote: > > [...] > >> look: >> >> { >> aligned_storage::type storage; >> >> new ((void*)&storage) T(x, y, z); // throws >> >> // ~aligned_storage() destroys non-existent T >> } >

Re: [boost] checked_delete.hpp fix

2003-02-24 Thread David Abrahams
Daniel Frey <[EMAIL PROTECTED]> writes: > When I have a class X which lives in a namespace where there's a function > 'checked_delete' declared that can take a X*, smart_ptr (and probably others) > that use checked_deleter (note the 'r'!) cannot call checked_delete. It's > ambiguous due to argumen

[boost] Re: Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: [...] > look: > > { > aligned_storage::type storage; > > new ((void*)&storage) T(x, y, z); // throws > > // ~aligned_storage() destroys non-existent T > } What will happen to a normal type then? { T storage = T(x, y, z

[boost] ref.hpp patch

2003-02-24 Thread David Abrahams
I'm going to check in the following patch to ref.hpp, which makes the traits into valid MPL metafunctions. It introduces a dependency on one new file (boost/mpl/bool_c.hpp), but that's truly the cleanest way to get there. If there are any objections, I'm willing to employ less-clean methods, but

Re: [boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: >> And if the object's constructor throws an exception, what then? > > I am not familiar with exceptions that much, but calling implicitly > the object's destructor will not affect its construction if the user > does not forget to call its constru

[boost] checked_delete.hpp fix

2003-02-24 Thread Daniel Frey
Hi, I came across the following problem: When I have a class X which lives in a namespace where there's a function 'checked_delete' declared that can take a X*, smart_ptr (and probably others) that use checked_deleter (note the 'r'!) cannot call checked_delete. It's ambiguous due to argument depe

[boost] Re: Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread Edward Diener
"William E. Kempf" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Edward Diener said: > > "Alexander Terekhov" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > >> > >> Ken Hagan wrote: > >> > > >> > Alexander Terekhov wrote: > >> > > > >> > > I, for one, believe st

[boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: [...] >> Everything seems already defined ;) > > ??? Every time I'm thinking about something, I find that it was already defined somewhere else. >> Given the fact optional<>::m_storage is aligned like a bool...: >> >> - Maybe aligned_storage<> should always destruct its ob

[boost] Re: Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Fernando Cacciola (Home) wrote: [...] >> Well it depends on the platform but if sizeof(bool) == sizeof(int) on > Intel, > > ^^^ > Were does this 'int' comes from? sizeof(bool) may vary, you just don't know (1, 4, 8, ...). On Intel, if sizeof(bool) == 4 == sizeof(int) optional<>::m_storage w

[boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Fernando Cacciola wrote: [...] >> Yes, something like that. I am curious to know how in_place<> works. >> > Look at the thread "'optional' - request for extension" > Essentilly, > > in_place(a0,a1,a2...) > > just creates a function object which holds onto the argument list: > > template > struct

Re: [boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Fernando Cacciola" <[EMAIL PROTECTED]> writes: > I thougth about placement new as a way to achieve > in-place optional construction, precisely because of the forwarding > problem, but I couldn't get it to really work. > What would it be like, exactly? > > I considered: > > (a) > > optional opt (

[boost] Re: io operations for stl containers?

2003-02-24 Thread Jason House
Terje Slettebø wrote: > > >From: "Vladimir Prus" <[EMAIL PROTECTED]> > > Sorry for having taken so long to respond to these messages. I felt a need > for a break, to consider how it might be done. I was wondering about this line of discussion earlier today... wondering if it died on the vine o

[boost] How to convert a template parameter into a string

2003-02-24 Thread Robert Allan Schwartz
The attached document was submitted for publication to C/C++ Users Journal today, but I thought it might be worth submitting to Boost as well. Perhaps my spelling class template could be folded into type_traits? Robert Allan Schwartz Have you ever wished you could convert a template parameter to

Re: [boost] Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread William E. Kempf
Edward Diener said: > "Alexander Terekhov" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> Ken Hagan wrote: >> > >> > Alexander Terekhov wrote: >> > > >> > > I, for one, believe strongly that "&k" is nothing but >> > > >> > > "static_cast(pthread_getspecific(__k_key));" >>

[boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Fernando Cacciola
"Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Fernando Cacciola (Home) wrote: > > [...] > > > I'm still not sure I understand what are you trying to do, but it > > looks > > like you want optional with in-place construction (which bypasses the > > copy). In t

[boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Fernando Cacciola
"David Abrahams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Fernando Cacciola \(Home\)" <[EMAIL PROTECTED]> writes: > > > optional opt( in_place(point(0,0),point(10,10))); > > > > here, in_place() is used to forward T's ctor argument to optional<> so that > > T is effectively co

[boost] Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread Edward Diener
"Alexander Terekhov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Ken Hagan wrote: > > > > Alexander Terekhov wrote: > > > > > > I, for one, believe strongly that "&k" is nothing but > > > > > > "static_cast(pthread_getspecific(__k_key));" > > > > > > It *isn't* a compile-tim

Re: [boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Fernando Cacciola \(Home\)
- Original Message - From: "Philippe A. Bouchard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 6:31 PM Subject: [boost] Re: Re: Re: Re: partial<> proposal > Fernando Cacciola wrote: > > [...] > > >> Given the fact optional<>::m_storage is aligned like a boo

Re: [boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: >> Can you really do anything to make this cleaner? I guess: >> >> aligned_storage storage; >> new (storage.bytes) T(x, y, z); >> >> might be a help. What else are you gaining? And how do you destroy >> the T? If not explicitly and you

[boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Fernando Cacciola wrote: [...] >> Given the fact optional<>::m_storage is aligned like a bool...: >> > It is not aligned like a bool... Well it depends on the platform but if sizeof(bool) == sizeof(int) on Intel, m_storage will be aligned to the next word boundary i.e. aligned like an integer.

Re: [boost] Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Fernando Cacciola \(Home\)" <[EMAIL PROTECTED]> writes: > optional opt( in_place(point(0,0),point(10,10))); > > here, in_place() is used to forward T's ctor argument to optional<> so that > T is effectively constructed in-place right within the aligned storage. > > Is this what you want? I have

[boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Fernando Cacciola (Home) wrote: [...] > I'm still not sure I understand what are you trying to do, but it > looks > like you want optional with in-place construction (which bypasses the > copy). In this case, I recently explored something which would look > like: > > optional opt( in_place(point(

[boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Fernando Cacciola
"Philippe A. Bouchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > David Abrahams wrote: > > "Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > > > >> Yes, exactly. Sorry if I wasn't precise enough. > >> > >> The bool type will cancel type_with_alignment<> effects (at least on

[boost] Re: Re: More metaprogramming problems with MSVC7.0

2003-02-24 Thread Andreas Huber
[ ... ] > > Has anyone else ever encountered similar problems with either 7.0 or 6.5? > > > Yep, it's a known bug called "early template instantiation" (ETI). It's > briefly described here - > http://lists.boost.org/MailArchives/boost/msg39915.php. > > > Are there any workarounds? > > > Sure. In yo

[boost] Re: Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: > "Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > >> Yes, exactly. Sorry if I wasn't precise enough. >> >> The bool type will cancel type_with_alignment<> effects (at least on >> Intel compatible platforms); i.e. unique alignment of each >> optional type. > > Sounds like

[boost] Review Managers Wanted

2003-02-24 Thread Thomas Witt
Hi, I am looking for volunteers who are willing to act as review manager. Due to the increasing number of review requests the current pool of review managers just isn't enough. As of now we do have a backlog of five outstanding reviews. For those interested in the details I have updated the re

Re: [boost] Re: Re: Re: partial<> proposal

2003-02-24 Thread Fernando Cacciola \(Home\)
- Original Message - From: "Philippe A. Bouchard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 4:29 PM Subject: [boost] Re: Re: Re: partial<> proposal > David Abrahams wrote: > > [...] > > >> Example: > >> optional i; > >> > >> new (i) int(17); > > > > Whic

Re: [boost] Re: io operations for stl containers?

2003-02-24 Thread Terje Slettebø
>From: "Vladimir Prus" <[EMAIL PROTECTED]> Sorry for having taken so long to respond to these messages. I felt a need for a break, to consider how it might be done. In a way, something good came from it, as well: I've recently looked at Boost.Tuple, and I see that they have I/O operators defined

Re: [boost] Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > David Abrahams wrote: > > [...] > >>> Example: >>> optional i; >>> >>> new (i) int(17); >> >> Which copy ctor are you referring to? >> And why do we want to prevent copy ctor usages? > > Because optional<> will be able to handle types without co

Re: [boost] Re: Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > Yes, exactly. Sorry if I wasn't precise enough. > > The bool type will cancel type_with_alignment<> effects (at least on Intel > compatible platforms); i.e. unique alignment of each optional type. Sounds like you want type_with_alignment:

[boost] Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: [...] >> Example: >> optional i; >> >> new (i) int(17); > > Which copy ctor are you referring to? > And why do we want to prevent copy ctor usages? Because optional<> will be able to handle types without copy constructors (this was the main purpose of partial<> in fact). I

[boost] Re: Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: [...] >>> Example: >>> optional i; >>> >>> new (i) int(17); >> >> >> Ex. 1: >> // Class Widget has a heavy copy constructor >> optional i; >> >> new (i) Widget(this, ...); > > > Soo... what are you demonstrating here? Please spell it out. Normal > construction of a widget i

Re: [boost] Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > Maybe the following placement operator new can help prevent copy constructor > usages: > #include > > template > class optional > { > friend void * operator new (size_t, optional &); > > ... > }; > > template >

Re: [boost] Re: Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > Philippe A. Bouchard wrote: > > [...] > >> Example: >> optional i; >> >> new (i) int(17); > > > Ex. 1: > // Class Widget has a heavy copy constructor > optional i; > > new (i) Widget(this, ...); Soo... what are you demonstrating here? Please

Re: [boost] minor shared_ptr optimization detail

2003-02-24 Thread Peter Dimov
David Abrahams wrote: > I'd like to be able to stick all the generated code for using > get_deleter(sp), for a given X, on one side of a shared library > boundary. The closest thing I've been able to find in the public > interface is: > > my_get_deleter(shared_ptr(sp)) > > but that incurs refe

[boost] Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Philippe A. Bouchard wrote: [...] > Example: > optional i; > > new (i) int(17); Ex. 1: // Class Widget has a heavy copy constructor optional i; new (i) Widget(this, ...); Ex. 2: // The object A is aligned like a char struct A { char c_; A() : c_('\0') {} A(char a_c) : c_(a_c) {}

[boost] Re: Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: [...] >> 2) Placement operator new (size_t, boost::optional &) definition >> which I highly suggest. > > Your response is a bit too terse for me to understand. Care to > clarify a bit? Maybe the following placement operator new can help prevent copy constructor usages: #in

[boost] minor shared_ptr optimization detail

2003-02-24 Thread David Abrahams
I'd like to be able to stick all the generated code for using get_deleter(sp), for a given X, on one side of a shared library boundary. The closest thing I've been able to find in the public interface is: my_get_deleter(shared_ptr(sp)) but that incurs reference-counting, at the very least.

[boost] Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: > "Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > >> I would like to propose partial<> when you wish to postpone an >> object's construction: >> http://groups.yahoo.com/group/boost/files/shifted_ptr/partial.hpp > > How is this different from the recently-accepted opti

Re: [boost] Re: partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > David Abrahams wrote: >> "Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: >> >>> I would like to propose partial<> when you wish to postpone an >>> object's construction: >>> http://groups.yahoo.com/group/boost/files/shifted_ptr/partial.hp

[boost] Re: partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
David Abrahams wrote: > "Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > >> I would like to propose partial<> when you wish to postpone an >> object's construction: >> http://groups.yahoo.com/group/boost/files/shifted_ptr/partial.hpp > > How is this different from the recently-accepted opti

Re: [boost] Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread Gabriel Dos Reis
"Ken Hagan" <[EMAIL PROTECTED]> writes: | I could write... | | int fk() { return k; } | | and re-cast my template to expect a pointer to function and then | write C<&fk>. This is perfectly legal under the current language | rules, and gives a type whose behaviour depends on the thread that |

Re: [boost] Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread Gabriel Dos Reis
David Abrahams <[EMAIL PROTECTED]> writes: | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: | | > | OK, whatever. I guess I should've said that you can instantiate a | > | template on &k with sensible results. Whether or not you want to call | > | it a constant is another semantic matter. I'd ca

[boost] Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread Alexander Terekhov
Ken Hagan wrote: > > Alexander Terekhov wrote: > > > > I, for one, believe strongly that "&k" is nothing but > > > > "static_cast(pthread_getspecific(__k_key));" > > > > It *isn't* a compile-time constant (just like &errno isn't a compile > > time constant). > > MSVC has no pthread_getspecif

[boost] Variant Formal Review Reminder

2003-02-24 Thread Jeff Garland
All - This is a reminder about the variant formal review. The review period was scheduled to end on Tuesday Feb 25th, but since we got a late start I have asked and received additional time from the review wizard. The review is now scheduled to end Sunday March 2nd. The variant library offers a

Re: [boost] type traits proposal

2003-02-24 Thread John Maddock
PS: I guess your time is limited - as it seems to be for most people :) - but I just want to make sure you haven't missed it: Somewhere at the end of the ( heated :-9 ) discussion of is_class I proposed a small patch which removes the warnings from the regression tests for the GCC - at least it wor

Re: [boost] Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread David Abrahams
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | OK, whatever. I guess I should've said that you can instantiate a > | template on &k with sensible results. Whether or not you want to call > | it a constant is another semantic matter. I'd call it a constant > | which evaluates differently in di

Re: [boost] partial<> proposal

2003-02-24 Thread David Abrahams
"Philippe A. Bouchard" <[EMAIL PROTECTED]> writes: > I would like to propose partial<> when you wish to postpone an object's > construction: > http://groups.yahoo.com/group/boost/files/shifted_ptr/partial.hpp How is this different from the recently-accepted optional class template? -- Dave

[boost] Re: shared_ptr extension with counter in object header

2003-02-24 Thread Anthony Williams
Thomas Witt <[EMAIL PROTECTED]> writes: > Greg > > On Sunday 23 February 2003 20:03, Greg Colvin wrote: > > At 03:34 AM 2/23/2003, Thomas Witt wrote: > > >Greg, > > > > > >I can not figure out how you make sure to satisfy the alignment > > > constraints of T and counted_base_header_impl. Any hint

[boost] Re: Thread-Local Storage (TLS) and templates

2003-02-24 Thread Ken Hagan
Alexander Terekhov wrote: > > I, for one, believe strongly that "&k" is nothing but > > "static_cast(pthread_getspecific(__k_key));" > > It *isn't* a compile-time constant (just like &errno isn't a compile > time constant). MSVC has no pthread_getspecific(), so I venture to suggest that your b

[boost] partial<> proposal

2003-02-24 Thread Philippe A. Bouchard
Greeting, I would like to propose partial<> when you wish to postpone an object's construction: http://groups.yahoo.com/group/boost/files/shifted_ptr/partial.hpp The partial object is aligned like an object of type T and reserves enough memory space to hold it, of course. partial<> uses