This is mistake. In [expr.sub] :
A postfix expression followed by an expression in square brackets is a postfix expression. One of the expressions must be of type "pointer to T", and the other must have an unlisted numbering or integral type.
I am not aware of the condition in the standard, which states that the conversion should happen here (though I wonβt be surprised if such a proposal existed), although testing with ideone.com caused a compilation error.
However, if you sign a class, not a pointer - for example, std::vector or std::array - then operator[] overloading will have the usual semantics of the function call, and floating-point arguments will be converted to the corresponding size_type .
Hurkyl
source share