Boost logo

Boost Users :

From: ShenLei (sweetmelon_at_[hidden])
Date: 2006-10-10 16:28:51


Hi,
   I used multi_index in the simple way: int<->int unique mapping. But in
VC7.1, warning level 4, I got many warnings for:
\boost_1_33_1\boost\multi_index\detail\ord_index_node.hpp(453): warning
C4510: 'boost::multi_index::detail::ordered_index_node<Super>' : default
constructor could not be generated.

I have read the doc of multi_index, and tried to turn off "\Gm", but the
problem is still. When compiled it in VC8.0 under warning level 4, these
warnings disappeared. It seems that, the template support in VC7.1 is not so
good. My test code is listed in the end of this article. How to get rid of
them? (...>_<... The webpage argues me about top-posting, so I cannot put them
on).

Another thing is about compile time. If multi_index is employed, the compile
time will be greatly increased (slower 10 times in VC7.1, 3 times in VC8.0).
Furthermore, the message generated by compiler is extremely long. I usually get
lost in it. ^_^ Is there any way to simplify them? Such as using struct T:S
rather than typedef in multi_index library?

Finally, I have a question on the design of
template<class Class,typename Type,Type Class::*PtrToMember>
struct member;
In practice, the user of "member" should provide the SAME type of PtrToMember
to the template arguments(Class & Type). If feeded with some wrong types,
errors message for the hell will be sent out. ^_^ Is there any way to improve
it? Such as simply member<T* PtrToMember>, and let the compiler to deduce the
type of this memberpointer?

Thank you.

ShenLei


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net