The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.c++.moderated
From: pdi...@mmltd.net (Peter Dimov)
Date: 18 Mar 2002 10:39:28 -0500
Local: Mon, Mar 18 2002 10:39 am
Subject: Re: is_enum<T> ATTN: Andrei Alexandrescu and ilk
rani_shar...@hotmail.com (Rani Sharoni) wrote in message <news:df893da6.0203170237.3760f3c4@posting.google.com>... > I looked at 14.8.2/2 (indicated by Peter) and wondered if it is > possible to use Paul technique in order to detect whether some type T > contains some type member. > This is known challenge by Andrei Alexandrescu (look for post named > "Reiterated question"). > > The code might look like the following: [...] > template<class U> static yes check(typename U::key_type *); > template<class U> static no check(...); > > public: > static const bool result = > sizeof(check<T>(0)) == sizeof(yes); > > is the above code is legal in standard C++? Amazingly, it think that it is. You are the proud inventor of the [ Send an empty e-mail to c++-h...@netlab.cs.rpi.edu for info ] You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||