11 Jun
2015
11 Jun
'15
2:33 p.m.
Sam Kellett wrote:
I would prefer free-functions in a namespace. Something like:
better_enums::from_string<Channel>("Red");
I'm not a big fan of lexical_cast, but it should be noted that if Channel defines operator>>, the above could be spelled lexical_cast<Channel>("Red").