main is not a function

Pages: 12
Caveat: This is my annotation:

A function template has a declaration, can have a definition, and has linkage.
But it does not have a type - rather, it declares a family of possible functions.
The name of a function template is not an 'lvalue that refers to a function'

An instantiated function has a precise type; it is a function.

decltype (std::addressof<int>) is fine (the instantiated function has a type)

decltype (std::addressof) isn't (the function template std::addressof refers to a family of (conceptually overloaded) functions, each of which has a different type).
It's called, passed parameters, has a call stack, and returns to the caller in the end. It's just a special function reserved to be the entry point and exit point to and from the underlying library.
Topic archived. No new replies allowed.
Pages: 12