🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1487

Re: typeid & template func woes

#1487
From: Miro Jurisic
Date: Wed, 12 Feb 2003 15:03
29 lines
1833 bytes
In article <b2dg2g$1117$1@news.dataguard.no>, "Conrad Weyns" <weyns@online.no> 
wrote:

> compiler: CW Pro 8.3 Mac & Win.
> issue: how can I get hold of the real type name of T that is part of a
> function signature in the following stripped to the bone but working code:
> 
> Output of this running program:
> 
> 1A. tA.report() gives:
>    function name: _report<long>(long &)
>    using __typeof__: long
>    sWoes address: 0x00420460 sWoes = 999
>    type of _t: long
>    value of _t 123
> 
> 2A. tA.const_report() gives:
>    function name: _report<const long>(const long &)
>    using __typeof__: long
>    sWoes address: 0x00420454 sWoes = 999
>    type of _t: long
>    value of _t 123

My understanding is that typeof (T) == typeof (const T) == typeof (volatile T) 
== etc. Perhaps if you explain exactly what you are trying to do with this 
information we can come up with an answer. (Which will involve type traits, I am 
sure.)

meeroh
Technical Details
Message-ID: <macdev-B2A383.10035512022003@senator-bedfellow.mit.edu>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail
References: <b2dg2g$1117$1@news.dataguard.no>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd047,d1f7d1bdb1e475a0
X-Google-Attributes: gidfd047,public
X-Google-Thread: f635e,d1f7d1bdb1e475a0
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2003-02-12 07:03:58 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail
From: Miro Jurisic <macdev@meeroh.org>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.windows
Subject: Re: typeid & template func woes
References: <b2dg2g$1117$1@news.dataguard.no>
User-Agent: MT-NewsWatcher/3.2.1 (PPC Mac OS X)
Date: Wed, 12 Feb 2003 10:03:55 -0500
Message-ID: <macdev-B2A383.10035512022003@senator-bedfellow.mit.edu>
Lines: 29
NNTP-Posting-Host: TITANIUM-48.MIT.EDU
X-Trace: 1045062230 senator-bedfellow.mit.edu 3951 18.101.0.199