{"action":"created","issue":{"url":"https://api.github.com/repos/edouarda/brigand/issues/31","labels_url":"https://api.github.com/repos/edouarda/brigand/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/edouarda/brigand/issues/31/comments","events_url":"https://api.github.com/repos/edouarda/brigand/issues/31/events","html_url":"https://github.com/edouarda/brigand/issues/31","id":90167401,"number":31,"title":"key `void` not supported in map","user":{"login":"Jarod42","id":418006,"avatar_url":"https://avatars.githubusercontent.com/u/418006?v=3","gravatar_id":"","url":"https://api.github.com/users/Jarod42","html_url":"https://github.com/Jarod42","followers_url":"https://api.github.com/users/Jarod42/followers","following_url":"https://api.github.com/users/Jarod42/following{/other_user}","gists_url":"https://api.github.com/users/Jarod42/gists{/gist_id}","starred_url":"https://api.github.com/users/Jarod42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jarod42/subscriptions","organizations_url":"https://api.github.com/users/Jarod42/orgs","repos_url":"https://api.github.com/users/Jarod42/repos","events_url":"https://api.github.com/users/Jarod42/events{/privacy}","received_events_url":"https://api.github.com/users/Jarod42/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-22T17:57:05Z","updated_at":"2015-06-22T18:10:37Z","closed_at":null,"body":"`void` and other non default constructible type cannot be key of map:\r\n\r\nchanging in map.hpp\r\n\r\n    template <typename T>\r\n    struct Type {};\r\n\r\n    // fastlane for constant amortized time\r\n    template <class T0>\r\n    struct map_impl<T0>\r\n    {\r\n        static typename T0::second_type at(Type<typename T0::first_type>);\r\n\r\n        template <typename U>\r\n        static no_such_type_ at(U) {}\r\n    };\r\n\r\n    // .. other fastlane\r\n\r\n    template <typename M, typename K>\r\n    struct lookup\r\n    {\r\n        using type = decltype(M::at(std::declval<Type<K>>())); // or using type = std::result_of_t<M::at(Type<K>)>;\r\n    };\r\n\r\nand in at.hpp\r\n\r\n    template <typename T>\r\n    struct has_at_method\r\n    {\r\n        struct dummy {};\r\n        template <typename C, typename P>\r\n        static auto test(P*) -> decltype(static_cast<void>(C::at(std::declval<Type<P>>())) /*cast to handle comma operator */, std::true_type());\r\n        \r\n        // previous false case + bool value\r\n    };\r\n\r\nsolves that."},"comment":{"url":"https://api.github.com/repos/edouarda/brigand/issues/comments/114204189","html_url":"https://github.com/edouarda/brigand/issues/31#issuecomment-114204189","issue_url":"https://api.github.com/repos/edouarda/brigand/issues/31","id":114204189,"user":{"login":"jfalcou","id":285977,"avatar_url":"https://avatars.githubusercontent.com/u/285977?v=3","gravatar_id":"","url":"https://api.github.com/users/jfalcou","html_url":"https://github.com/jfalcou","followers_url":"https://api.github.com/users/jfalcou/followers","following_url":"https://api.github.com/users/jfalcou/following{/other_user}","gists_url":"https://api.github.com/users/jfalcou/gists{/gist_id}","starred_url":"https://api.github.com/users/jfalcou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfalcou/subscriptions","organizations_url":"https://api.github.com/users/jfalcou/orgs","repos_url":"https://api.github.com/users/jfalcou/repos","events_url":"https://api.github.com/users/jfalcou/events{/privacy}","received_events_url":"https://api.github.com/users/jfalcou/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T18:10:37Z","updated_at":"2015-06-22T18:10:37Z","body":"this type_ boxing seems to be rampant. I suggest making it a detail/type.hpp and fix it this way"}}