[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++



Fredag den 21. april 2006 13:20 skrev Michael Rasmussen:
> On Fri, 21 Apr 2006 13:05:33 +0200, Mads Bondo Dydensborg wrote:
> > Jeg vil gerne tvinge brugere af min template til at de strenge de sender
> > med skal være const.
>
> Har det ingen indflydelse, at din template specificerer, at name er af
> type const std::string?

Ikke så vidt jeg kan vurdere. Jeg tror det er et løfte til brugeren om at 
templaten ikke ændrer ved det referencen peger på... ?

>
> > Jeg forstår ikke hvad du mener med returværdien?
>
> Man kunne også tolke, det lidt man ser af din template, derhen, at det
> var en funktionstemplate; derfor returværdi:-)

Nårh ja, ok ;-)

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
The only way to truely protect your data is to grind up your hard drive
into powder, magnetize it all, then heat it into a liquid. Cool and grind
it up again, scatter it into the wind, and just HOPE entropy does the
rest.
                       - ./ comment on network security



 
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] *