Is is possible to write a anonymous enum class and then comparing what it contains? Eg.

enum class { APPLE, BANANA } fruitType;
// ...
if (fruitType == fruitType::APPLE)
    // ...
Edit
Report