Re: Type of result: const or not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wei,

>My questions is: which style is the better one to follow?

For your own code, I'd recommed Scott Meyer's guideline.

Keep in mind, it's a guideline.  Not an absolute commandment from on high.

The STL may-or-may-not follow Scott Meyer's guideline at the discretion of the compiler author.  And when they don't follow Scott Meyer's guideline, I'm willing to wager that it's for a good reason.

At times, there are very good reasons to ignore Scott Meyer's guidelines.  But, in the general case -- and especially if one doesn't understand the when & why -- Scott Meyer's guidelines are good advice.

Sincerely,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux