20 Sep
2009
20 Sep
'09
11:34 p.m.
Does boost (or any other lib in C++) have facility to support smth that resembles hierarchical enumeration? I would like to have something like the following: enum Hierarchy { Store::Clothing = 1 Store::Electronics, Building::Residential, Building::Commercial } ... Hierarchy h = Hierarchy::Building::Commercial; ... if (h == Hierarchy::Store) { if (h == Hierarchy::Store::Clothing) std::cout<<"clothing"; } ...