[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Re: Just a Matter  of Style  (was: LaTeX file handling)
From:       Allan Rae <allan.rae () mailbox ! uq ! edu ! au>
Date:       1999-07-31 6:33:32
[Download RAW message or body]

On 30 Jul 1999, Lars Gullik Bjønnes wrote:

> "Arnd Hanses" <Arnd.H.Hanses@rz.ruhr-uni-bochum.de> writes:
> 
> | The reason for prefering to use a const function and an additional
> | variable is:
> 
> As I said below this is a matter of style.
> 
> a) void foo(string &);
> b) string foo(string const &);
> 
> I like b best since it does not change/modify its parameters.

(b) also allows you to do stuff like:

	bar(foo(str))

There are also a few optimisation tricks the compiler can do in a case
like this, especially if foo() is an inline function.

Allan. (ARRae)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic