{"action":"created","issue":{"url":"https://api.github.com/repos/fenix0x/oop_labs/issues/2","labels_url":"https://api.github.com/repos/fenix0x/oop_labs/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/fenix0x/oop_labs/issues/2/comments","events_url":"https://api.github.com/repos/fenix0x/oop_labs/issues/2/events","html_url":"https://github.com/fenix0x/oop_labs/issues/2","id":54230366,"number":2,"title":"Замечания по лабораторной работе 3 задание 3","user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-13T18:37:26Z","updated_at":"2015-01-13T18:41:59Z","closed_at":null,"body":"```\r\nWordsCountMapping CountWords(string const & inputText)\r\n{\r\n\tWordsCountMapping result;\r\n\tchar_separator<char> sep(\" ,;\\t\\n\");\r\n\ttokenizer<char_separator<char>> tokens(inputText, sep);\r\n\tfor (const auto& token : tokens) {\r\n\t\tresult[to_lower_copy(token)]++;\r\n\t}\r\n\treturn result;\r\n}\r\n```\r\nВ цикле for лучше открывающую фигурную скобку разместить на новой строке.\r\nприучайся использовать прединкремент"},"comment":{"url":"https://api.github.com/repos/fenix0x/oop_labs/issues/comments/69795549","html_url":"https://github.com/fenix0x/oop_labs/issues/2#issuecomment-69795549","issue_url":"https://api.github.com/repos/fenix0x/oop_labs/issues/2","id":69795549,"user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T18:41:59Z","updated_at":"2015-01-13T18:41:59Z","body":"```\r\ntemplate <typename Map>\r\nbool map_compare(Map const &lhs, Map const &rhs) {\r\n\t// No predicate needed because there is operator== for pairs already.\r\n\treturn lhs.size() == rhs.size()\r\n\t\t&& std::equal(lhs.begin(), lhs.end(),\r\n\t\trhs.begin());\r\n}\r\n\r\nbool VerifyWordsCount(string const& inputText, WordsCountMapping const& expectedMap)\r\n{\r\n\treturn map_compare(CountWords(inputText), expectedMap);\r\n}\r\n```\r\nДля проверки содержимого контейнеров STL можно использовать оператор ==. Для map он также есть."}}