6 May
2009
6 May
'09
7:45 a.m.
Eugene Wee wrote:
One way to do this is to simply define new types instead of using typedef to create different aliases for the same type.
Do you mean like this? struct ConfigName { ConfigName(std::string const& value_) : value(value_) {} std::string value; }; struct PathName { PathName(std::string const& value_) : value(value_) {} std::string value; }; If so, I'm trying to cut down on code duplication and have a standard way of accessing my parameter values. By created each parameter value separately there is nothing that forces the programmer to have consistent interface to access the value. Ryan