[C++-sig] Re: const_argument test failures

Aleksey Gurtovoy agurtovoy at meta-comm.com
Wed Oct 20 14:14:58 CEST 2004


David Abrahams writes:
>>> This compiler bug should have been worked around on
>>> every platform that has partial specialization 
>>
>> Definitely possible, but then all platforms that support partial
>> specialization don't have a problem _compiling_ the code. I'm not
>> sure how run-time failures come into picture here.
>
> The type of the argument is translated into a typeid, and type
> converters are registered against a typeid.  If the type of the
> argument is wrong, it won't find the right registered converter.

Got it.

>
>>> (the test passes for me with vc7.1), 
>>
>> That's because the bug was fixed in the compiler.
>
> I don't think so.  It used to fail on vc7.1 IIUC.  I certainly ran
> the test, had it fail, applied a workaround, and had the test pass on
> some compiler.

We are talking about slightly different bugs here. On MSVC 6.5 the
following simply doesn't compile (bug #1):

    template< typename T > void f(void (*)(T));
    void g(int const);

    int main()
    {
        f(g);
    }

On VC 7 and higher it does, but T is deduced as 'int const' (bug #2).

>
>>> and it can be made to work on VC6/7 with
>>> 
>>> BOOST_TT_BROKEN_COMPILER_SPEC( object )
>>
>> I don't see how this one would help, though.
>
> It allows the workaround, which involves remove_cv, to work.

... taking care of the run-time failure. Got it. I was saying that it
won't help to get 'get_signature' compile on MSVC 6.5.

-- 
Aleksey Gurtovoy
MetaCommunications Engineering




More information about the Cplusplus-sig mailing list