
11 Aug
2007
11 Aug
'07
4:52 p.m.
AMDG Andreas Huber <ahd6974-spamboostorgtrap <at> yahoo.com> writes:
See above, your finding of flaws with these warnings is not exactly common.
It's happened to me too. I was accidentally passing a reference type to alignment_of. I knew there was a problem in my code but the warning helped my find it immediately. If you really need to suppress this warning for users you can write template<class T> class C { public: C(const C& c) { BOOST_STATIC_ASSERT((!boost::is_same<T, T>::value)); } C& operator=(const C& c) { BOOST_STATIC_ASSERT((!boost::is_same<T, T>::value)); } }; In Christ, Steven Watanabe