{"action":"created","issue":{"url":"https://api.github.com/repos/ericniebler/range-v3/issues/610","repository_url":"https://api.github.com/repos/ericniebler/range-v3","labels_url":"https://api.github.com/repos/ericniebler/range-v3/issues/610/labels{/name}","comments_url":"https://api.github.com/repos/ericniebler/range-v3/issues/610/comments","events_url":"https://api.github.com/repos/ericniebler/range-v3/issues/610/events","html_url":"https://github.com/ericniebler/range-v3/issues/610","id":216878022,"number":610,"title":"Concepts TS and polymorphism","user":{"login":"h-2","id":2996863,"avatar_url":"https://avatars1.githubusercontent.com/u/2996863?v=3","gravatar_id":"","url":"https://api.github.com/users/h-2","html_url":"https://github.com/h-2","followers_url":"https://api.github.com/users/h-2/followers","following_url":"https://api.github.com/users/h-2/following{/other_user}","gists_url":"https://api.github.com/users/h-2/gists{/gist_id}","starred_url":"https://api.github.com/users/h-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-2/subscriptions","organizations_url":"https://api.github.com/users/h-2/orgs","repos_url":"https://api.github.com/users/h-2/repos","events_url":"https://api.github.com/users/h-2/events{/privacy}","received_events_url":"https://api.github.com/users/h-2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-24T19:03:02Z","updated_at":"2017-03-24T20:27:40Z","closed_at":"2017-03-24T20:27:40Z","body":"If I understand the current implementation of range-v3 correctly, it never uses \"real\" Concepts (as specified in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4651.pdf ) and always uses the library implementation that works with C++14, right?\r\nAnd it seems this library implementation of concepts does not support static polymorphism, or is there some way to make it work?\r\n\r\nHere's a small example: \r\n\r\n```c++\r\n#include <string>\r\n#include <iostream>\r\n\r\n#include <range/v3/all.hpp>\r\n\r\ntemplate <typename type>\r\n    requires (bool)ranges::Range<type>()\r\nvoid test1(type const & range)\r\n{\r\n    std::cout << \"general\\n\";\r\n}\r\n\r\ntemplate <typename type>\r\n    requires (bool)ranges::RandomAccessRange<type>()\r\nvoid test1(type const & range)\r\n{\r\n    std::cout << \"special\\n\";\r\n}\r\n\r\nint main()\r\n{\r\n    std::string foo{\"abc\"};\r\n    ranges::any_random_access_view<char> bar = foo | ranges::view::drop(1);\r\n\r\n    test1(bar);\r\n}\r\n```\r\n\r\nThis is ambiguous, although with Concepts TS it wouldn't be, because Range is a strict subset of RandomAccessRange and the compiler always picks the strictest interface.\r\n\r\nI could of course reimplement all the concepts as \"real\" concepts, but I was hoping there is an easier way.\r\n\r\nThanks for your help!"},"comment":{"url":"https://api.github.com/repos/ericniebler/range-v3/issues/comments/289134532","html_url":"https://github.com/ericniebler/range-v3/issues/610#issuecomment-289134532","issue_url":"https://api.github.com/repos/ericniebler/range-v3/issues/610","id":289134532,"user":{"login":"h-2","id":2996863,"avatar_url":"https://avatars1.githubusercontent.com/u/2996863?v=3","gravatar_id":"","url":"https://api.github.com/users/h-2","html_url":"https://github.com/h-2","followers_url":"https://api.github.com/users/h-2/followers","following_url":"https://api.github.com/users/h-2/following{/other_user}","gists_url":"https://api.github.com/users/h-2/gists{/gist_id}","starred_url":"https://api.github.com/users/h-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-2/subscriptions","organizations_url":"https://api.github.com/users/h-2/orgs","repos_url":"https://api.github.com/users/h-2/repos","events_url":"https://api.github.com/users/h-2/events{/privacy}","received_events_url":"https://api.github.com/users/h-2/received_events","type":"User","site_admin":false},"created_at":"2017-03-24T20:27:40Z","updated_at":"2017-03-24T20:27:40Z","body":"Ah, ok, that's good to know! Thanks for the quick replies!"}}
{"actor":{"display_login":"h-2"}}