
"Steven Watanabe" <watanabesj@gmail.com> wrote in message news:47DE9618.6030802@providere-consulting.com... [...]
- 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. -Phil