Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19

Thread: vector iterators incompatible

  1. #16
    quentin kenihan is offline Junior Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default

    there like that, I do not see blatant error, therefore, apart from the fact that you assume that Boundary_ contains at least one element.

    Beware of side effects may be? Is that changing ptrArc (intersection, assigning a new value) does not invalidate your iterators?

  2. #17
    leonardo sbaraglia is offline Junior Member
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    0

    Default

    Code:
    Loop:: const_iterator toBeTested = boundary_.begin () -> end ();
    You retrieve the iterator end of the first list contained in Boundary_ gold crossing can belong to any of these lists. Comparing an iterator to a list with an iterator from another list is undefined behavior.

  3. #18
    rachel house is offline Junior Member
    Join Date
    Oct 2009
    Posts
    21
    Rep Power
    0

    Default

    Could you detail a little for your answer I see stp not well "Comparing an iterator to a list with an iterator from another list is undefined behavior." ?

    And another question, if this type of comparison is not allowed in C + +, why the tests passed successfully under GCC?


    Thank you

  4. #19
    quentin kenihan is offline Junior Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default

    Because an AC undefined behavior can be anything. Including this is what you expect at least until the demo to the client.

    VC + + has a way of validating that detects the problem and you indicated. g + + has a way of validating able to detect this kind of problem but you're not using it.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Vector Magic 1.17
    By reddevils in forum Operating System
    Replies: 0
    Last Post: 06-19-2010, 06:22 PM
  2. Blu-ray players are incompatible with large Blu-Ray discs
    By ruel in forum Latest Hardware News
    Replies: 0
    Last Post: 10-17-2009, 07:06 AM
  3. Replies: 0
    Last Post: 10-12-2009, 12:27 PM
  4. Apple Posts Mac OS X 10.6-Incompatible Software
    By Alan Knott in forum Latest Hardware News
    Replies: 0
    Last Post: 08-30-2009, 07:11 AM
  5. Vector Linux 6.0 review
    By Francis Ronaldo in forum Linux/Free BSD
    Replies: 0
    Last Post: 06-02-2009, 07:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48