The function is named after the integer function ⍳ from the programming language APL. It was one of the STL components that were not included in C++98, but eventually made it into the standard library in C++11.