--- C:\Users\luke\Desktop\memory_util.hpp.orig 2012-01-02 16:53:54.000000000 +0100 +++ C:\Users\luke\Desktop\memory_util.hpp 2012-06-27 10:33:16.000000000 +0100 @@ -179,41 +179,43 @@ //struct type_rebind_mode /////////////////////////// template struct type_has_rebind { template +#if (!defined __SUNPRO_CC) static char test(int, typename X::template rebind*); +#else + static char test(int, typename X::rebind*); +#endif template static int test(boost::intrusive::detail::LowPriorityConversion, void*); static const bool value = (1 == sizeof(test(0, 0))); }; template struct type_has_rebind_other { template +#if (!defined __SUNPRO_CC) static char test(int, typename X::template rebind::other*); +#else + static char test(int, typename X::rebind::other*); +#endif template static int test(boost::intrusive::detail::LowPriorityConversion, void*); static const bool value = (1 == sizeof(test(0, 0))); }; template struct type_rebind_mode { - template - static char test(int, typename X::template rebind::other*); - - template - static int test(boost::intrusive::detail::LowPriorityConversion, void*); - static const unsigned int rebind = (unsigned int)type_has_rebind::value; static const unsigned int rebind_other = (unsigned int)type_has_rebind_other::value; static const unsigned int mode = rebind + rebind*rebind_other; }; ////////////////////////