On Fri, 22 Nov 2002 13:48:01 +0200, "Peter Dimov" <[EMAIL PROTECTED]>
wrote:

>From: "David Abrahams" <[EMAIL PROTECTED]>
>>
>> Here's what I think might be a correct implementation:
>>
>>      template <class T, class U> T implicit_cast(U const& x) { return x; }
>>      template <class T, class U> T implicit_cast(U& x) { return x; }
>
>The correct implementation IIRC is
>
>template<class T> T implicit_cast(typename identity<T>::type x) { return
>x; }

Nice. I'm curious: besides preventing a call to implicit_cast without
an explicit specification of the destination type, is there any other
reason why identity<> is used?

Genny.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to