[C++-sig] Re: args patch

David Abrahams dave at boost-consulting.com
Sun Aug 3 01:29:08 CEST 2003


Aleksey Gurtovoy <agurtovoy at meta-comm.com> writes:

> David Abrahams wrote:
>> >> 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.
>>
>>
>> It seems to me that it can't know the answer for incomplete types, and
>> therefore it shouldn't produce one - it should be an error.
>
> We don't really want that. Consider:
>
>     #include <iosfwd>
>
>     // ...
>     typedef find_if< types, is_same<_1,std::iostream> >::type r; // error?
>
>
>> How does the conforming version manage it?
>
> SFINAE-based version just works ('has_xxx' returns 'false').

So does my fix ;->

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list