{"action":"opened","issue":{"url":"https://api.github.com/repos/kennykerr/modern/issues/4","labels_url":"https://api.github.com/repos/kennykerr/modern/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/kennykerr/modern/issues/4/comments","events_url":"https://api.github.com/repos/kennykerr/modern/issues/4/events","html_url":"https://github.com/kennykerr/modern/issues/4","id":98557454,"number":4,"title":"Implements Class template method \"FindInterface\" and const","user":{"login":"jamespack","id":2086722,"avatar_url":"https://avatars.githubusercontent.com/u/2086722?v=3","gravatar_id":"","url":"https://api.github.com/users/jamespack","html_url":"https://github.com/jamespack","followers_url":"https://api.github.com/users/jamespack/followers","following_url":"https://api.github.com/users/jamespack/following{/other_user}","gists_url":"https://api.github.com/users/jamespack/gists{/gist_id}","starred_url":"https://api.github.com/users/jamespack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamespack/subscriptions","organizations_url":"https://api.github.com/users/jamespack/orgs","repos_url":"https://api.github.com/users/jamespack/repos","events_url":"https://api.github.com/users/jamespack/events{/privacy}","received_events_url":"https://api.github.com/users/jamespack/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-01T19:36:45Z","updated_at":"2015-08-01T19:36:45Z","closed_at":null,"body":"Not sure if this is an issue but I have been working through your new course Windows Runtime Internals on Pluralsight and I grabbed a copy of the implements class template from here to use.\r\n\r\nWhen I compile the standard c++ project in the 'Core Apps in Standard C++' module with the class template I get the following compiler error:\r\n\r\n`error C2440: 'static_cast': cannot convert from 'const Modern::Implements<ABI::Windows::ApplicationModel::Core::IFrameworkView,ABI::Windows::ApplicationModel::Core::IFrameworkViewSource> *const ' to 'ABI::Windows::ApplicationModel::Core::IFrameworkViewSource *'`\r\n\r\nWhen I double click the error it drops me in this function from the class template:\r\n\r\n```cpp\r\ntemplate <typename First, typename ... Rest>\r\nvoid * FindInterface(GUID const & id) const noexcept\r\n{\r\n    if (id == __uuidof(First))\r\n    {\r\n        return static_cast<First *>(this);\r\n    }\r\n    return FindInterface<Rest ...>(id);\r\n}\r\n```\r\n\r\nIf I remove the const from the method the project builds without error.\r\n\r\n"}}