Re: About Int2Type

  • Permalink
  • submit to reddit
  • Email
  • Follow

cppcraze wrote:

> Hi,
> Since loki help forum is not responded timely, I would like to ask a
> simple question here about Int2Type defined by Mr Alexandrescu.
> Following is definition of Int2Type:
> template<int v>
> struct Int2Type
> {
>      enum { value = v };
> };
> My question is: is the enumeration inside above struct necessary? I
> have tested the version with the enum removed and it also works, i.e.
> it can also do the compile-time dispatch according some compile-time
> integer. So why the enum is there? Is there any other consideration I
> missed?

The enum is not needed to make the template work.
But if you ever need to access the value that the type was created with,
you need the enum (or a similar, less convenient, mechanism) to do so.
So, the enum exists primarily to enable a reverse mapping from Int2Type
back to int.

> Thanks,
> Martin

Bart v Ingen Schenau
a.c.l.l.c-c++ FAQ:
c.l.c FAQ:
c.l.c++ FAQ:

      [ See for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

Reply bart855 (270) 1/11/2008 9:58:56 PM

See related articles to this posting

comp.lang.c++.moderated 10703 articles. 11 followers. Post

0 Replies

Similar Articles

[PageSpeed] 44


Similar Artilces:

Re: Re: Re:
>From: David Elliott <> >To: "Yue Huang" <> >Subject: Re: Re: Re: >Date: Tue, 9 Dec 2003 23:29:13 -0500 > >On Dec 9, 2003, at 10:41 PM, Yue Huang wrote: > >> >>----- Original Message ----- >>From: "David Elliott" <> >>Newsgroups: comp.soft-sys.wxwindows >>Sent: Tuesday, December 09, 2003 12:44 AM >>Subject: Re: >> >> >>>You'll notice the code in that wxMac method sets the >>>kFloatingWindowClass Mac...

Re: Re: Re: Marc Re: Andreessen Re: created Re: the Re: first Re: web Re: browser
no. ...

RE : Re: RE : Re: copulas and SAS
Thanks, I appreciate your comments,I understand that copula is not the appropriate tool to use, what will be the alternative ? Adel David L Cassell <davidlcassell@MSN.COM> a �crit : joewhitehurst@GMAIL.COM replied: > >Adel, > >You may find the following artilce interesting. [article by Thomas Mikosch not copied] This is a really good article, and a really useful point to make. But 55K is a lot of article to copy. Would it have been easier to point to a URL? The people who read SAS-L as a digest and the people who have slow connections are probably not overly thrilled...

Re: Re: Re: Re: No future for DB2
Well, IDS 10 + XPS 9 as open source = Astonishing cool !! J. -----Original Message----- From: "Obnoxio The Clown" <> To: "Jean Sagi" <> Date: Wed, 27 Jul 2005 22:00:31 +0100 (BST) Subject: Re: Re: Re: No future for DB2 Jean Sagi said: > > Online 5. as open source = Quite cool. But hugely impractical, as it would reveal far too much about IDS to the competition. -- Bye now, Obnoxio "C'est pas parce qu'on n'a rien � dire qu'il faut fermer sa gueule"...

Re: Re: Re: Radio Re: Shack Re: TRP-100 Re: Printer Re:
> Also, trim your replies. Leaving a few pages of original text just so > you can add your few lines at the bottom is just insane. > > g. > > -- > Proud owner of F-15C 80-0007 > - The only one of its kind. > - Go Collimated or Go Home. > Some people collect things for a hobby. Geeks collect hobbies. > > ScarletDME - The red hot Data Management Environment > A Multi-Value database for the masses, not the classes. > - Get it _today_! > --- Synchrone...

RE: Re: Re: Bakefile
THX, that was the solution !!! ................................................. Greetings,=20 Eugen Rata.=20 The life is relative and reversible.=20 tel: (+386) (0) 51 355 822 =20 > -----Original Message----- > From: news [] On Behalf Of ABX > Sent: Wednesday, October 26, 2005 14:58 > To: > Subject: Re: Re: Bakefile >=20 > Eugen Rata <eugen.rata <at> PERFTECH.SI> writes: > > Thx, I read that help, but I didn't find any glue of how...

EEE ...

re: re
I am studying the re module and still do not understand how to do some really simple tasks: 1) say I need to capitalize any word that is between the words 'United' and 'of America'. So I do re.findall|match|search('United .* of America', s) this may return 'United States of America', but not 'States', which is the word of interest. 2) There is a further problem: even if I had a way to specify 'States' in the example above as the matched regex, the sub function proves insufficient: re.sub allows me to specify only the replacement string, but...

edward wrote: > Hi, > I was wondering if anybody could help with the implementation of ordinary texture mapping. I have an textured cube object, using .raw files & Visual Studio 2005. > > I now need to get this parallaxed mapped. From normal texture mapping to parallax mapping is a long way. Read up on: - Cg shaders - bumpmapping - parallax mapping (some tutorials avaiable on the internet) Once you get bumpmapping working (you need to work in tangent space, also generate tangents), parallax mapping is relatively easy in its simplest form. More exotic versions exist though...

EEE ...

RE : Re: RE : Re: contribution of independent variables in a
Thanks David, My question was about the "contribution of each indepedent vaiable in the variance of the dependent variable". I take your point , that it is not a correct question in the first time, I had some references from othe members of the list Thanks for the suggestions Adel David L Cassell <davidlcassell@MSN.COM> a �crit : adel_tangi@YAHOO.FR wrote back: > > >David L Cassell a �crit : > adel_tangi@YAHOO.FR wrote: > > > >Hi, > > > > I have a continuous depedent variable y and 3 independent variable X1 > >(binary), X2...

Anyway, Thank you Philip. I took a look at your co., I didn� t know about your WPS, and neither it did exist a open alternative for SPSS.... Daniel -----Mensaje original----- De: Philip Rack [] Enviado el: dilluns, 2 / novembre / 2009 17:59 Para: Fern�ndez Rodr�guez, Dani; SAS-L@LISTSERV.UGA.EDU Asunto: SUSPECT: RE: SUSPECT: RE: SUSPECT: RE: SUSPECT: RE: Download a file from HTTP I don't see a provision for this. Perhaps someone else on SAS-L has a workaround. Philip Rack MineQuest, LLC SAS & WPS Consulting and WPS Reseller Tel: (614) 457-3714 Web: ww...

Re: Re: Re: Re: Re: [ace-users] How to delete the handler object afterdisconnection?
Hi, Dr. Douglas, >Don't you mean "it will signal the named event on the *client* side? As far as I know, on window platform, named event can share between processes. So if the server signal the named event, I think the named event on the client side should be signaled. Best Regards! ����������������He HongFu ���������������� ��������������������2005-08-10 ======= Original Message on 2005-08-09 20:52:16 ======= >Hi, > >>> Dr. Douglas has told me use the overloaded method ACE_Reactor::register_handler() to implement the SPIPE w...

RE:Re: Re: Re: Your document
*** This is an automated message *** Your message was found to contain a virus in one or more of the attachments. The message has been deleted and will not be delivered. Please virus scan your attachments before re-sending. Your local Help Desk can provide assistance in virus checking/scanning files and attachments. Original Message Details.. Subject : Re: Re: Re: Your document Sender : Recipients : Date : Mon, 10 May 2004 14:37:48 +1000 ...

RE: Re: corrected RE: Re: Computing sets of equivalences
Bobby, it took me a while to discern what you added to Carl's algorithm. It's the line where you map addequiv over the rest of the argument sequence. But it is not at all obvious to do so, since in effect you do not built on the work done, but, in a way restore equivalences, which would give rise to the same result. But this can be done more effectively just by Join @@ (Partition[#, 2, 1] & /@ <the-connected-components>) and then using Carl's original program. I thought about a way to further use the already built connected components and cam...

Re Re Re CoBOL and Contracting
------------------------- There is a Job Postings Per Capita map at ------------------------- what are the chances that programming jobs fall within the norm on that graph? interesting spread don't you think? sss --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from =- On Fri, 5 Sep 2008 02:44:55 -0500, "SeaSideSam" <Sam@theSeaSide> wrote: > >------------------------- >There is a Job Postings Per Capita map at ...

Re: RE : Re: SAS on a Mac
Not sure why this has spawned 3 threads: ...

Re: Re, Re : set prompt
David Froble wrote: > I have a strange dislike of 'wasting' a 'real' system like VMS on a > user interface. When I think about it, it seems strange. What better > for a user interface than the best system available? Guess it comes > from the time when the best user interface was a TTY. At least that > beat punched cards. I couldn't agree wit you more, but you've just opened the door for another flame war from VMS purist that cannot accept that VMS has been, and continues to be, an awesome back-end and back-bone to a company, but using it to d...

Re: RE : Re: copulas and SAS
Adel, Think Joke! But, more seriously, it did prompt me to look up the origins of the copula as a functional. Joe On 9/27/06, adel F. <> wrote: > > Hi, > I do not know how this is related to my orginal question. > > My understanding of copula is, it is a joint distribution with uniform > margins, the problem how to obtain a copula which fits better a data? > > If there is any suggestion from members of SAS list, about examples for > copulae with SAS, I will appreciate that > > Thanks a lot > > Adel > Joe Whitehurst <joew...

Re: RE: Re: Let me be the first
Not at all ! J. -----Original Message----- From: "Jean Georges Perrin" <> To: "'Jean Sagi'" <>, <> Date: Tue, 26 Sep 2006 00:15:41 +0200 Subject: RE: Re: Let me be the first It has been on home page for quite a few hours now and I you had a= n RSS reader, you would have got the news earlier. Actually, Mark published it to CDI, between the time we got the news and we published it on the web. We are not that bad, I guess, are we? (this is a way to start a new trol...

Re: RE: RE: segmentation fault []
try setting term to ansi<br /><br />export TERM=3Dansi<br /><br />j.<br /><= br /><p>On Apr 20, 2009, <strong>Everett Mills</strong> &lt;Everett.Mills@n=; wrote: </p><div class=3D"replyBody"><blockquote style= =3D"padding-left: 1ex; margin: 0pt 0pt 0pt 1.8ex; border-left: #267fdb 2px = solid">Felix-<br />I'm not a Linux guru by any stretch of the imagination, = so I'm<br />cross posting this to the more general Informix news list,<br /= >comp.da...

Re: RE: RE: FW: Query
Ummm... What Doug propose was an stored procedure. If you are on 7.3 then maybe your engine won't accept decode. But you can do a stored procedure for decode yourself is pretty easy. J. -----Original Message----- From: "shahid.mehmood" <> To: "Jean Sagi" <> Date: Wed, 14 Sep 2005 14:43:43 +0500 Subject: RE: RE: FW: Query Thanks a lot J ... But "decode" runs on ORACLE only! Am I right? How about Informix? I missed the email from Doug Lawry ... Can you forward that to me? ...

Re: Re: Re: No future for DB2
Online 5. as open source = Quite cool. J. -----Original Message----- From: "rkusenet" <> To: Date: Wed, 27 Jul 2005 12:41:50 -0400 Subject: Re: Re: No future for DB2 "Jean Sagi" <> wrote in message news:1122479029.8c0a65f17276109f4e455911f99eca51@teranews... > I worked with oracle 6.5, 12 years ago, supporting an application I > received and its performace was _horrible_ (I don't blame oracle much > but the original developers). One of the things I had to frecuent...

Re: [Re] Re: PREPARE and transactions
Jeroen wrote: > Granted, that's probably going to force the issue. I do wonder though: > one of the arguments in favour of the current semantics is that the > problems can be worked around using nested transactions. Then what were > people doing before nested transactions, in Tom's scenario where the > programmer doesn't know where transactions begin? The trick is that with the current semantics, you don't have to watch transaction activity, just the prepare statements. You know if and when (from the client/driver's point of view) a prepared st...