I need an explanation on this example from standard [basic.lookup.unqual]/3:

```
typedef int f;
namespace N {
struct A {
    friend void f(A &);
    operator int();
    void g(A a) {
        int i = f(a); // f is the typedef, not the friend
                      // function: equivalent to int(a)
    }
};
}

```

I would argue that `void N::f(A &)` is closer than `int(a)` because it does not involve the type-cast operator. I cannot however be sure because the standard contains only one instance of "type cast".

---

By the way, compiling that code fails in MSVC2015 (but it works in clang and g++).

> 
> Error C2440 'initializing': cannot convert from 'void' to 'int'
> 
> 
> 

---

**UPDATE**
Addressing some of the comments.

1. Type casting is formally known as "type conversions" and they are covered in (12.3) (thanks jefffrey).
2. What I am looking for is a description of the syntax parsing. In particular, why `postfix-expression ( expression-list opt )` is trampled over by `simple-type-specifier ( expression-list opt )`. Since according to (5.2), both of those expression are evaluated left-to-right. Hence, out of the two candidates to be before the `(a)`, `::N::f` should be closer than `::f` when evaluating expressions in `::N::A::g`.