From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16617 invoked by alias); 14 Oct 2011 15:49:08 -0000 Received: (qmail 16596 invoked by uid 22791); 14 Oct 2011 15:49:06 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Oct 2011 15:48:51 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9EFmp6r004260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Oct 2011 11:48:51 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9EFmo2k005219; Fri, 14 Oct 2011 11:48:50 -0400 Received: from [0.0.0.0] (ovpn-113-114.phx2.redhat.com [10.3.113.114]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p9EFmmiC007056; Fri, 14 Oct 2011 11:48:49 -0400 Message-ID: <4E9859E0.9000909@redhat.com> Date: Fri, 14 Oct 2011 16:23:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Michael Spertus CC: Benjamin Kosnik , Jonathan Wakely , "gcc-patches@gcc.gnu.org" , "libstdc++@gcc.gnu.org" Subject: Re: Intrinsics for N2965: Type traits and base classes References: <20110913154324.4be22faf@shotwell> <4E809F45.2010908@symantec.com> <20110927195930.54e0d0df@shotwell> <4E830B10.8020802@symantec.com> <4E831DF8.9080700@symantec.com> <20110929102215.33af0ba9@shotwell> <20111003214035.2cbbcaf8@shotwell> <20111003220353.7d511557@shotwell> <4E91F45E.3000706@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg01304.txt.bz2 On 10/13/2011 01:35 PM, Michael Spertus wrote: > +int main() { > + assert(typeid(b::type) > + == typeid(types)); > + assert(typeid(db::type) == typeid(types)); > + assert(typeid(db::type) == typeid(types<>)); > + return 0; > +} Let's make this a compile-time test using something like template struct assert_same_type; template struct assert_same_type {}; Jason