[C++-sig] Re: args patch

Aleksey Gurtovoy agurtovoy at meta-comm.com
Sat Aug 2 09:21:10 CEST 2003

David Abrahams wrote:
> Nikolay Mladenov <nickm at sitius.com> writes:
> > The change that breaks it has happened between Feb 06 2003 and Feb 07
> > 2003
> > and as far as I can tell it comes from:
> > mpl/aux_/has_xxx.hpp around line 79
> > the definition of struct msvc_is_incomplete
> > and than detail/iterator.hpp around line 83
> > What do you think, can it be fixed?
> Hmm, it looks like /vmg has to completely break that
> msvc_is_incomplete template:
>     template< typename T >
>     struct msvc_is_incomplete
>     {
>         struct incomplete_;
>         BOOST_STATIC_CONSTANT(bool, value =
>               sizeof(void (T::*)()) == sizeof(void (incomplete_::*)())
>             );
>     };
> I think msvc_is_incomplete<T>::value would always be true.

Yeah. Unfortunately, that's the only way I know to implement 'has_xxx' on
MSVC so that it doesn't bark on incomplete types, and there is some code
around which relies on it. On the other hand, Boost.Python probably doesn't
depend on it, and since '/vmg' is not the default option, what we _can_ do
is to guard the 'is_incomplete' check with something like
BOOST_MPL_AUX_HAS_XXX_MSVC_NO_IS_INCOMPLETE and ask to define the symbol
when compiling with '/vmg' or '#pragma pointers_to_members(full_generality,

If that sounds like a reasonable compromise - in particular, to Nikolay -
please feel free to implement it.


More information about the Cplusplus-sig mailing list