Each Axis is represented with a different enumerator, with a unique number:
enum Axis
{
X, ///< The X axis
Y, ///< The Y axis
Z, ///< The Z axis
R, ///< The R axis
U, ///< The U axis
V, ///< The V axis
PovX, ///< The X axis of the point-of-view hat
PovY ///< The Y axis of the point-of-view hat
};
Joystick buttons on the other hand are integers, indexed starting from 0. You can easily solve your problem by not mixing Axis and Button -- this is the reason why different types are used to represent both in SFML.
Of course, if you need to have a single address space to represent both axis and button (e.g. for serialization), it should be an easy exercise to achieve that in client code
By the way, in case you use Thor, I'm providing functions to serialize joystick axes from/to strings. This would allow you to display this in the game's UI. The documentation can be found
here.