Boost logo

Boost :

From: Phil Bouchard (philippe_at_[hidden])
Date: 2008-03-18 03:38:24

"Steven Watanabe" <watanabesj_at_[hidden]> wrote in message


>> - I have changed the code for the following:
>> ((T *)(alignment_of<detail::max_align>::value)->* q)
> How is that better?

Well I anticipate certain compilers will report a warning or even an error
when faced with a null pointer being dereferenced. This address dissosiates
the pointer from an undefined behavior and is aligned for all types.

>> And made the following changes:
>> - I have prefixed sh::list & sh::stack with "intrusive_"
> You might look at Boost.Intrusive

How nice is that? member_hook<> template argument is a very nice way of
implementing it. I haven't seen that class in the latest version of the
code but this surely needs to be present.

It looks like a intrusive::stack<> derivative will need to be implemented
also. At the same time let's keep sizeof(stack_member_hook<>) ==
sizeof(void *) and let's make sure it can be used in an union (without
constructor / destructor)... for very versatile usages.


Boost list run by bdawes at, gregod at, cpdaniel at, john at