This is how it should behave according to standard:
2011 Standard wrote:
6.5.4/1 [stmt.ranged]
β otherwise, begin-expr and end-expr are begin(__range) and end(__range), respectively, where begin and end are looked up with argument-dependent lookup (3.4.2). For the purposes of this name lookup, namespace std is an associated namespace.
3.4.2/2 [basic.lookup.argdep]
For each argument type T in the function call, there is a set of zero or more associated namespaces and a set of zero or more associated classes to be considered. The sets of namespaces and classes is determined entirely by the types of the function arguments (and the namespace of any template template argument). Typedef names and using-declarations used to specify the types do not contribute to this set. The sets of
namespaces and classes are determined in the following way:
β If T is a fundamental type, its associated sets of namespaces and classes are both empty.
So as int is a fundamental type, your overload will not be found at all.
EDIT: it is even better, C++14 changed wording eliminating slight ambiguity:
2014 Standard wrote:
6.5.4/1 [stmt.ranged]
β otherwise, begin-expr and end-expr are begin(__range) and end(__range), respectively, where begin and end are looked up in the associated namespaces (3.4.2). [ Note: Ordinary unqualified lookup (3.4.1) is not performed. βend note ]