{"action":"opened","issue":{"url":"https://api.github.com/repos/aantron/better-enums/issues/29","repository_url":"https://api.github.com/repos/aantron/better-enums","labels_url":"https://api.github.com/repos/aantron/better-enums/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/aantron/better-enums/issues/29/comments","events_url":"https://api.github.com/repos/aantron/better-enums/issues/29/events","html_url":"https://github.com/aantron/better-enums/issues/29","id":167451655,"number":29,"title":"Switch not working with strict enums enabled","user":{"login":"rcdailey","id":1768054,"avatar_url":"https://avatars.githubusercontent.com/u/1768054?v=3","gravatar_id":"","url":"https://api.github.com/users/rcdailey","html_url":"https://github.com/rcdailey","followers_url":"https://api.github.com/users/rcdailey/followers","following_url":"https://api.github.com/users/rcdailey/following{/other_user}","gists_url":"https://api.github.com/users/rcdailey/gists{/gist_id}","starred_url":"https://api.github.com/users/rcdailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcdailey/subscriptions","organizations_url":"https://api.github.com/users/rcdailey/orgs","repos_url":"https://api.github.com/users/rcdailey/repos","events_url":"https://api.github.com/users/rcdailey/events{/privacy}","received_events_url":"https://api.github.com/users/rcdailey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-25T19:57:46Z","updated_at":"2016-07-25T19:57:46Z","closed_at":null,"body":"`switch()` doesn't seem to work when combined with `BETTER_ENUMS_STRICT_CONVERSION`. This is because it's using `BETTER_ENUMS_ENUM_CLASS_SWITCH_TYPE_GENERATE`, which creates a \"copy\" scoped enum with the same enumerators. The problem is that enumerators from `_enumerated` (which are also specified in each `case` section) cannot be compared to the like-named enumerators in the \"copy\" version.\r\n\r\nAny reason that in the strict case, the implicit typecast operator in the `Enum` class isn't just returning `_enumerated` and not this dummy scoped enum? Oddly though, the code compiles fine on MSVC 14 but on Android NDK GCC 4.9, it does not work:\r\n\r\n```\r\nMSRData.cpp: In constructor 'CMSRData::CMSRData(const char*, MsrEncryptionStatus)':\r\nMSRData.cpp:42:36: error: could not convert 'Ksn' from 'MsrEncryptionStatus::_enumerated' to 'better_enums::_data_MsrEncryptionStatus::_EnumClassForSwitchStatements'\r\n          case MsrEncryptionStatus::Ksn:\r\n                                    ^\r\nMSRData.cpp:51:36: error: could not convert 'None' from 'MsrEncryptionStatus::_enumerated' to 'better_enums::_data_MsrEncryptionStatus::_EnumClassForSwitchStatements'\r\n          case MsrEncryptionStatus::None:\r\n                                    ^\r\nMSRData.cpp:55:36: error: could not convert 'Dukpt' from 'MsrEncryptionStatus::_enumerated' to 'better_enums::_data_MsrEncryptionStatus::_EnumClassForSwitchStatements'\r\n          case MsrEncryptionStatus::Dukpt:\r\n                                    ^\r\n```"}}
{"actor":{"display_login":"rcdailey"}}