{"action":"created","issue":{"url":"https://api.github.com/repos/boostorg/spirit/issues/430","repository_url":"https://api.github.com/repos/boostorg/spirit","labels_url":"https://api.github.com/repos/boostorg/spirit/issues/430/labels{/name}","comments_url":"https://api.github.com/repos/boostorg/spirit/issues/430/comments","events_url":"https://api.github.com/repos/boostorg/spirit/issues/430/events","html_url":"https://github.com/boostorg/spirit/issues/430","id":394432358,"node_id":"MDU6SXNzdWUzOTQ0MzIzNTg=","number":430,"title":"`extract_int` overflow difference between Qi and X3 ","user":{"login":"Kojoley","id":2743474,"node_id":"MDQ6VXNlcjI3NDM0NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2743474?v=4","gravatar_id":"","url":"https://api.github.com/users/Kojoley","html_url":"https://github.com/Kojoley","followers_url":"https://api.github.com/users/Kojoley/followers","following_url":"https://api.github.com/users/Kojoley/following{/other_user}","gists_url":"https://api.github.com/users/Kojoley/gists{/gist_id}","starred_url":"https://api.github.com/users/Kojoley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kojoley/subscriptions","organizations_url":"https://api.github.com/users/Kojoley/orgs","repos_url":"https://api.github.com/users/Kojoley/repos","events_url":"https://api.github.com/users/Kojoley/events{/privacy}","received_events_url":"https://api.github.com/users/Kojoley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-27T16:09:42Z","updated_at":"2018-12-28T03:14:53Z","closed_at":null,"author_association":"COLLABORATOR","body":"```cpp\r\n#include <boost/spirit/home/x3/support/numeric_utils/extract_int.hpp>\r\n#include <boost/spirit/home/qi/numeric/numeric_utils.hpp>\r\n#include <iostream>\r\n\r\nint main()\r\n{\r\n    namespace x3 = boost::spirit::x3;\r\n    namespace qi = boost::spirit::qi;\r\n\r\n    char const* s = \"70000\", * it = s, * const end = s + std::strlen(s);\r\n    short x;\r\n    std::cout << std::boolalpha;\r\n    std::cout << \"qi:\\n\";\r\n    x = -1; it = s; std::cout << qi::extract_int<short, 10, 1, -1>::call(s, end, x) << ' ' << x << '\\n';\r\n    x = -1; it = s; std::cout << qi::extract_int<short, 10, 1, 5>::call(s, end, x) << ' ' << x << '\\n';\r\n    std::cout << \"x3:\\n\";\r\n    x = -1; it = s; std::cout << x3::extract_int<short, 10, 1, -1>::call(s, end, x) << ' ' << x << '\\n';\r\n    x = -1; it = s; std::cout << x3::extract_int<short, 10, 1, 5>::call(s, end, x) << ' ' << x << '\\n';\r\n}\r\n```\r\nOutput:\r\n```\r\nqi:\r\nfalse 7000\r\nfalse 7000\r\nx3:\r\nfalse -1\r\ntrue 7000\r\n```\r\nhttps://wandbox.org/permlink/TnmsMtZcTMvFAfgr\r\n\r\nIs this intended? From my point of view all the parsers must fail and even output variable be untouched (`false -1` on all cases).\r\n"},"comment":{"url":"https://api.github.com/repos/boostorg/spirit/issues/comments/450280459","html_url":"https://github.com/boostorg/spirit/issues/430#issuecomment-450280459","issue_url":"https://api.github.com/repos/boostorg/spirit/issues/430","id":450280459,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDI4MDQ1OQ==","user":{"login":"djowel","id":568094,"node_id":"MDQ6VXNlcjU2ODA5NA==","avatar_url":"https://avatars0.githubusercontent.com/u/568094?v=4","gravatar_id":"","url":"https://api.github.com/users/djowel","html_url":"https://github.com/djowel","followers_url":"https://api.github.com/users/djowel/followers","following_url":"https://api.github.com/users/djowel/following{/other_user}","gists_url":"https://api.github.com/users/djowel/gists{/gist_id}","starred_url":"https://api.github.com/users/djowel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djowel/subscriptions","organizations_url":"https://api.github.com/users/djowel/orgs","repos_url":"https://api.github.com/users/djowel/repos","events_url":"https://api.github.com/users/djowel/events{/privacy}","received_events_url":"https://api.github.com/users/djowel/received_events","type":"User","site_admin":false},"created_at":"2018-12-28T03:14:53Z","updated_at":"2018-12-28T03:14:53Z","author_association":"MEMBER","body":"I think it's documented ( somewhere :-) )  that the attribute value is undefined on a failed parse, for the sake of efficiency. OTOH, if it won't affect efficiency, then the qi behavior is preferred."}}
{"actor":{"display_login":"djowel"}}