Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Effective C++: Item 26

Reply
Thread Tools

Effective C++: Item 26

 
 
ptyxs
Guest
Posts: n/a
 
      09-24-2012
Le 21/09/2012 14:05, Nobody a écrit :
> On Fri, 21 Sep 2012 13:14:56 +0200, ptyxs wrote:
>
>> In my Effective C++ THIRD EDITION, Item 26 is entitled : "Postpone
>> variable definitions as long as possible".
>>
>> Please tell what edition you are using and what is the title of the item
>> you are discussing.

>
> I'm fairly sure that it's the second edition, where item 26 is titled
> "Guard against potential ambiguity".
>


One interesting thing to note is that in the THIRD EDITION, pp.278-279,
Appendix B, Item Mapping Between Second and Third Edition shows that
there is no mapping from second edition item 26 to any third edition item.

Would that suggest that the author, as an afterthought, considered that
second edition item 26 was somehow inaccurate or useless ??

Ptyxs


 
Reply With Quote
 
 
 
 
ptyxs
Guest
Posts: n/a
 
      09-24-2012
> On Friday, September 21, 2012 2:05:03 PM UTC+2, Nobody wrote:
>>
>> I'm fairly sure that it's the second edition, where item 26 is titled
>> "Guard against potential ambiguity".

>
> Indeed.
>
> Regards,
> Bart
>



One interesting thing to note is that in the THIRD EDITION, pp.278-279,
Appendix B, Item Mapping Between Second and Third Edition shows that
there is no mapping from second edition item 26 to any third edition item.

Would that suggest that the author, as an afterthought, considered that
second edition item 26 was somehow inaccurate or useless ??

Ptyxs


 
Reply With Quote
 
 
 
 
Bart Vandewoestyne
Guest
Posts: n/a
 
      09-25-2012
On Saturday, September 22, 2012 10:19:50 AM UTC+2, Jorgen Grahn wrote:
>
> I've said it before, but I recommend always using -pedantic (and
> several other warning options) with g++. Lots of things which end up
> as questions here (often much more trivial than this) would have been
> caught that way.


It's nice to know that the ambiguity error pops up in pedantic mode. I have emailed Scott Meyers about this, and now both him and me are actually puzzled why it *only* pops up in pedantic mode... Shouldn't that ambiguity error pop up without the -pedantic option too?

Regards,
Bart
 
Reply With Quote
 
Nobody
Guest
Posts: n/a
 
      09-26-2012
On Tue, 25 Sep 2012 02:04:26 -0700, Bart Vandewoestyne wrote:

> It's nice to know that the ambiguity error pops up in pedantic mode. I
> have emailed Scott Meyers about this, and now both him and me are
> actually puzzled why it *only* pops up in pedantic mode... Shouldn't
> that ambiguity error pop up without the -pedantic option too?


Without -pedantic, gcc extensions are still enabled so long as they do not
affect the interpretation of valid code.

The -std= option should ensure that all valid code is interpreted as
specified by the standard. The -pedantic option is required if you
also want invalid code to be handled as specified by the standard (i.e.
generating any required diagnostics).

 
Reply With Quote
 
Balog Pal
Guest
Posts: n/a
 
      10-05-2012
On 9/24/2012 5:02 PM, ptyxs wrote:
> One interesting thing to note is that in the THIRD EDITION, pp.278-279,
> Appendix B, Item Mapping Between Second and Third Edition shows that
> there is no mapping from second edition item 26 to any third edition item.
>
> Would that suggest that the author, as an afterthought, considered that
> second edition item 26 was somehow inaccurate or useless ??


No, just less important than the other items that made into the 3rd ed.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
more effective c++ item 31 cfchou@gmail.com C++ 4 09-27-2005 09:15 AM
Effective C++ - item 7 (memory mgt). FBergemann@web.de C++ 1 08-07-2005 12:06 PM
meyers: Item 12: Effective C++ John C++ 4 04-27-2005 04:18 PM
Effective STL Item 4 (size() vs. empty()) Matthias C++ 25 02-01-2005 02:16 PM
Item 13 in Meyer's Effective C++ Don Kim C++ 9 05-23-2004 07:02 PM



Advertisments