double &rd1 = 0.0; double &rd2 = i; The initializer of const T& may be any type convertible to T and also it can be an rvalue; hence these two conditions are valid const double &rd1 = 0.0; const double &rd2 = i; are both valid (the compiler uses temporary objects to resolve these two conditions)
No comments:
Post a Comment