
At 09:15 2005-05-21, Eric Niebler wrote:
Arkadiy Vertleyb wrote:
Here is the minimal example:
[deleted]
I have experienced this problem before, and the fix is to calculate the return type of the sz() function as a separate step:
#include "boost/mpl/vector.hpp" #include "boost/mpl/size_t.hpp"
template<class T> T make();
template<class T> struct et { typedef boost::mpl::vector1<int> type; };
template<class T> struct sizer { typedef char(&type)[ boost::mpl::size< typename et<T>::type >::value ]; };
template<class T> typename sizer<T>::type sz(const T&);
template<class T, class U> struct add { typedef boost::mpl::vector1< boost::mpl::size_t<sizeof(sz(make<T>() + make<U>()))> > type; };
This compiles with VC7.1 and with gcc. I don't have VC8 beta installed.
compiles on my 8.0
Do Microsoft people read this list, or should I post it elsewhere?
Report the bug at the product feedback center:
http://lab.msdn.microsoft.com/productfeedback/
-- Eric Niebler Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law"