diff --git a/include/boost/mpl/aux_/has_xxx.hpp b/include/boost/mpl/aux_/has_xxx.hpp index bcbe662..d413cf0 100644 --- a/include/boost/mpl/aux_/has_xxx.hpp +++ b/include/boost/mpl/aux_/has_xxx.hpp @@ -70,14 +70,28 @@ namespace boost { namespace mpl { namespace aux { struct has_xxx_tag; +# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + template + struct msvc_incomplete_array + { + typedef char (&type)[sizeof(U) + 1]; + }; +# endif + template struct msvc_is_incomplete { // MSVC is capable of some kinds of SFINAE. If U is an incomplete // type, it won't pick the second overload static char tester(...); + +# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) template - static char(& tester(type_wrapper) )[sizeof(U) + 1]; + static typename msvc_incomplete_array::type tester(type_wrapper); +# else + template + static char (& tester(type_wrapper) )[sizeof(U)+1]; +# endif BOOST_STATIC_CONSTANT( bool, value = sizeof(tester(type_wrapper())) == 1);