Boost logo

Boost :

From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-03-20 11:38:47


I couldn't get it to work for MSVC6. In fact, I had problems calling a
templated function in sizeof in a a class definition. The solution I
had sent here about a week ago makes use of a bug similar to the one we
had before. In particular, the following function:
template <class T> T* make_tptr(wraps<T>);
is instantiated as T** make_tptr(wraps<T*>); when called as
make_tptr(wraps<X&>)

I also tried an alternative implementation of is_class that is based on
inheritance. It doesn't work with MSVC6.5 though.

> -----Original Message-----
> From: David Abrahams [mailto:david.abrahams_at_[hidden]]
> Sent: Wednesday, March 20, 2002 8:57 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] is_class
>
>
> Amazing coincidence!
> These are the same techniques I was using to implement my new
> is_array/is_reference checks for MSVC.
> However, I wasn't clear how close to the edge of legality I might have
> been dancing. I wonder if this gives Howard his general "tell
> me if this
> construct compiles or not" compile-time check?
>
> -Dave
>
> ----- Original Message -----
> From: "Peter Dimov" <pdimov_at_[hidden]>
> To: "Boost List" <boost_at_[hidden]>
> Sent: Monday, March 18, 2002 8:20 AM
> Subject: [boost] is_class
>
>
> > This post
> >
> >
> http://groups.google.com/groups?selm=000001c1cc83%24e154d5e0%2
47772e50c%
40c1
> 61550a
>
> contains a clever is_class<> implementation based on the fact that
void T::*
> is only valid when T is a class.
>
> The thread contains another gem, has_key_type<T>::value which is true
only
> when T has a nested type named key_type.
>
> --
> Peter Dimov
> Multi Media Ltd.
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>

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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk