diff -urw -x .svn trunk/boost/mpl/string.hpp trunk_patched/boost/mpl/string.hpp --- trunk/boost/mpl/string.hpp 2009-04-22 10:39:02.000000000 +0400 +++ trunk_patched/boost/mpl/string.hpp 2009-04-22 10:38:26.000000000 +0400 @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include #include @@ -243,12 +245,13 @@ type; }; +#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) template struct apply, Value, false> { typedef mpl::string<(char)Value::value> type; }; - +#endif #define M0(z,n,data) \ template \ struct apply, Value, true> \ @@ -268,10 +271,19 @@ struct apply, Value, false> { typedef +#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) + typename mpl::if_< + mpl::empty > + , mpl::string<(char)Value::value> + , +#endif mpl::string< ((((unsigned char)Value::value)<<(BOOST_MPL_MULTICHAR_LENGTH(C0)*8))|C0) , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C) > +#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) + >::type +#endif type; }; }; diff -urw -x .svn trunk/libs/mpl/test/string.cpp trunk_patched/libs/mpl/test/string.cpp --- trunk/libs/mpl/test/string.cpp 2009-04-22 10:39:02.000000000 +0400 +++ trunk_patched/libs/mpl/test/string.cpp 2009-04-22 10:26:26.000000000 +0400 @@ -293,6 +293,9 @@ BOOST_MPL_ASSERT((boost::is_same >)); } + BOOST_MPL_ASSERT((mpl::empty >)); + BOOST_MPL_ASSERT_NOT((mpl::empty >)); + // testing push_front { typedef mpl::push_front, mpl::char_<'a'> >::type t1; @@ -343,9 +346,6 @@ mpl::for_each >(push_char(result)); BOOST_TEST("Hello world!" == result); - BOOST_MPL_ASSERT((mpl::empty >)); - BOOST_MPL_ASSERT_NOT((mpl::empty >)); - BOOST_TEST(('h' == mpl::front >::type())); BOOST_TEST(('!' == mpl::back >::type()));