[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Konstante template argumenter i C++



Lørdag den 22. april 2006 14:55 skrev Lars Røeboe Hartmann:
> Hej Mads
>
> Har du kigget på boost TypeTraits. Der er der nogle template hacks til
> at sikre at en given type har nogle givne egenskaber.

Ah, det er rigtigt lækkert. Men, desværre er jeg jo i den situation, at når 
jeg først kommer ind i min template, så er parameteren ikke længere en type, 
men en konstant. :-(

>
> Det er længe siden jeg kiggede på det, men så vidt jeg husker kan man få
> oversætteren til at genere fejl, hvis template argument typen ikke har
> en given egenskab, så som const.

Jeps, så længe det er f.eks. en klasse.

Ellers rigtigt lækkert.

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
The rules of the game for future players are now ice-clear: anything you
say will be taken down and analysed for thousands of hours by people with
access to all the resources of the Net. You better be right, or you better
keep quiet: justice, free software style. Today is the day the law went open
source.
                                          - Rupert Goodwins, 22/4 2004.



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-05-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *