Boost logo

Boost :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-01-23 21:24:04

Howard Hinnant wrote:
>On Jan 23, 2004, at 7:21 PM, Jonathan Turkanis wrote:
>>Also, I'm a little nervous about relying on is_convertible, because of
>>problems like:
>> is_convertible<noncopyable,noncopyable>
><nod> has me worried too. This is a bigger problem than just move_ptr. It
>is effecting other projects too. I'm not sure of the answer.

I'm not sure of how is_convertable is implemented, but can't noncopyable be
added as a special case, like generating a compile-time error when used as a
parameter to it, e.g.
   error: cannot instantiate disallowed_conversion< noncopyable >
   from is_convertable< noncopyable, T >::type
or something similar.

This should be a case of adding some MPL code to detect is_same<
noncopyable, T >. The only problem I forsee would be in compile time, or am
I missing something?

e.g. (pseudocode style):

is_convertable_ex< T1, T2 >::type =
      or_< is_same< T1, noncopyable >, is_same< T2, noncopyable > >,
      disallowed_conversion< noncopyable >,
      is_convertable< T1, T2 >


Find a cheaper internet access deal - choose one to suit you.

Boost list run by bdawes at, gregod at, cpdaniel at, john at