This is still forced to do a linear search at run time since the code which passes the DDAxes to DDAxesNames::name doesn't see the implementation (plus the DDAxes is probably not chosen at compile time). Seems you'd do better with 
```C++
return axesNames[static_cast<unsigned int>(s)].label;
```
You could create a compile time check that the values (which in this case are enums) correspond to their indexes in the vector.