{"action":"created","issue":{"url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/206","labels_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/206/comments","events_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/206/events","html_url":"https://github.com/Mooophy/Cpp-Primer/pull/206","id":68913979,"number":206,"title":"fixed a serious bug may cause an infinite loop.","user":{"login":"XDXX","id":5459290,"avatar_url":"https://avatars.githubusercontent.com/u/5459290?v=3","gravatar_id":"","url":"https://api.github.com/users/XDXX","html_url":"https://github.com/XDXX","followers_url":"https://api.github.com/users/XDXX/followers","following_url":"https://api.github.com/users/XDXX/following{/other_user}","gists_url":"https://api.github.com/users/XDXX/gists{/gist_id}","starred_url":"https://api.github.com/users/XDXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XDXX/subscriptions","organizations_url":"https://api.github.com/users/XDXX/orgs","repos_url":"https://api.github.com/users/XDXX/repos","events_url":"https://api.github.com/users/XDXX/events{/privacy}","received_events_url":"https://api.github.com/users/XDXX/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mooophy/Cpp-Primer/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-16T12:31:38Z","updated_at":"2015-04-17T06:35:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Mooophy/Cpp-Primer/pulls/206","html_url":"https://github.com/Mooophy/Cpp-Primer/pull/206","diff_url":"https://github.com/Mooophy/Cpp-Primer/pull/206.diff","patch_url":"https://github.com/Mooophy/Cpp-Primer/pull/206.patch"},"body":"The current version has a serious bug which may cause an infinite loop.This bug will appear  when the oldVal is a substring of the newVal(eg: oldVal = \"tho\", newVal = \"tthough\").\r\nWhat's more, the exercise requires using iterators but the current version doesn't using any iterators.\r\nMy version is tested in Visual Studio 2013.But it can't pass the compilation in gcc 4.9.2 because gcc 4.9.2 doesn't support the c++11 feature \"iterator insert (iterator p, InputIterator first, InputIterator last);\"."},"comment":{"url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/comments/93909772","html_url":"https://github.com/Mooophy/Cpp-Primer/pull/206#issuecomment-93909772","issue_url":"https://api.github.com/repos/Mooophy/Cpp-Primer/issues/206","id":93909772,"user":{"login":"XDXX","id":5459290,"avatar_url":"https://avatars.githubusercontent.com/u/5459290?v=3","gravatar_id":"","url":"https://api.github.com/users/XDXX","html_url":"https://github.com/XDXX","followers_url":"https://api.github.com/users/XDXX/followers","following_url":"https://api.github.com/users/XDXX/following{/other_user}","gists_url":"https://api.github.com/users/XDXX/gists{/gist_id}","starred_url":"https://api.github.com/users/XDXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XDXX/subscriptions","organizations_url":"https://api.github.com/users/XDXX/orgs","repos_url":"https://api.github.com/users/XDXX/repos","events_url":"https://api.github.com/users/XDXX/events{/privacy}","received_events_url":"https://api.github.com/users/XDXX/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T06:35:17Z","updated_at":"2015-04-17T06:35:17Z","body":"@pezy \r\nThe function is perfect now.I recommend that we should provided two answers for this exercise.One for the purpose of using the c++11's features and one for the purpose of cross-platform.By the way,Do you mind if I change my codes style for the consistency?\r\nps:My English ability is limited.Please don't mind it."}}