/in/foo.cc: In function 'int rank(Node*, int)':
/in/foo.cc:101:29: error: reference to 'rank' is ambiguous
if ( cur->val>val ) return rank(cur->c[0],val);
^~~~
/in/foo.cc:95:12: note: candidates are: int rank(Node*, int)
inline int rank ( Node* cur , int val )
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/stl_pair.h:59,
from /usr/include/c++/6/utility:70,
from /usr/include/c++/6/algorithm:60,
from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc:102:25: error: reference to 'rank' is ambiguous
else return s+cur->cnt+rank(cur->c[1],val);
^~~~
/in/foo.cc:95:12: note: candidates are: int rank(Node*, int)
inline int rank ( Node* cur , int val )
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/stl_pair.h:59,
from /usr/include/c++/6/utility:70,
from /usr/include/c++/6/algorithm:60,
from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:148:30: error: reference to 'rank' is ambiguous
if ( op==3 ) printf("%d\n",rank(root,x));
^~~~
/in/foo.cc:95:12: note: candidates are: int rank(Node*, int)
inline int rank ( Node* cur , int val )
^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
from /usr/include/c++/6/bits/stl_pair.h:59,
from /usr/include/c++/6/utility:70,
from /usr/include/c++/6/algorithm:60,
from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note: template<class> struct std::rank
struct rank
^~~~