- Why f1() and f2() are lvalue expressions?
Because each are a function call to a function that returns an lvalue reference.
Standard draft: [expr.call]
11 A function call is an lvalue if the result type is an lvalue reference type or ...
Why the & character after the type name makes it an lvalue reference?
Standard draft: [dcl.ref]
1 In a declaration T D where D has either of the forms
& attribute-specifier-seqopt D1
&& attribute-specifier-seqopt D1
and the type of the identifier in the declaration T D1 is “derived-declarator-type-list T”, then the type of the identifier of D is “derived-declarator-type-list reference to T” ...
2 A reference type that is declared using & is called an lvalue reference ...
- Why an addres of lvalue reference to rvalue is zero?
The behaviour is undefined.
Standard draft: [expr.unary.op]
3 The result of the unary & operator is ... the result has type “pointer to T” and is a prvalue that is the address of the designated object
There is no designated object, and the standard doesn't define the behaviour of the addressof operator in that case.
Standard draft: [defns.undefined]
behavior for which this document imposes no requirements
[ Note: Undefined behavior may be expected when this document omits any explicit definition of behavior ...
- Why are both definitions equivalent?
They aren't necessarily equivalent. One or both of them may be incorrect. Both appear to be descriptions of lvalue expressions, rather than definitions.
The normative definition is in the C++ standard document.
What is the definition of lvalue by the standard?
Standard draft: [basic.lval]
- (1.1) A glvalue is an expression whose evaluation determines the identity of an object, bit-field, or function.
...
(1.3) An xvalue is a glvalue that denotes an object or bit-field whose resources can be reused (usually because it is near the end of its lifetime).
[ Example: Certain kinds of expressions involving rvalue references ([dcl.ref]) yield xvalues, such as a call to a function whose return type is an rvalue reference or a cast to an rvalue reference type.
— end example
]
(1.4) An lvalue is a glvalue that is not an xvalue.
The [expr] section defines each possible expression in the language, and if the expression is an lvalue, then that is stated. "is an lvalue" occurs 37 times, but this simple search is not necessarily exhaustive.