I think that we have to take this into perspective. Are we likely to use this with hundreds of values? Meyers' example was with dates, in particular a Month class.
I did take it into perspective based on this reply from the original poster
Thing is I have some enums here with more than 100 values in it. So I better write a converter program. finally a reason to learn about boost::regex
Even 1 line functions will still get a bit unwieldy when you get up into a hundred, here's just 26 to make my point
Code:
enum alpha { a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z};
Versus
Code:
class alpha{
public:
static alpha a(){return alpha(1);}
static alpha b(){return alpha(2);}
static alpha c(){return alpha(3);}
static alpha d(){return alpha(4);}
static alpha e(){return alpha(5);}
static alpha f(){return alpha(6);}
static alpha g(){return alpha(7);}
static alpha h(){return alpha(8);}
static alpha i(){return alpha(9);}
static alpha j(){return alpha(10);}
static alpha k(){return alpha(11);}
static alpha l(){return alpha(12);}
static alpha m(){return alpha(13);}
static alpha n(){return alpha(14);}
static alpha o(){return alpha(15);}
static alpha p(){return alpha(16);}
static alpha q(){return alpha(17);}
static alpha r(){return alpha(18);}
static alpha s(){return alpha(19);}
static alpha t(){return alpha(20);}
static alpha u(){return alpha(21);}
static alpha v(){return alpha(22);}
static alpha w(){return alpha(23);}
static alpha x(){return alpha(24);}
static alpha y(){return alpha(25);}
static alpha z(){return alpha(26);}
//... rest of implementation
};