Re: Puzzled by const string& parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Neo,

>Can you copy/paste for me? Thanks.

Excerpt from ISO 14882:1998 13.3.3.1.4.3

A standard conversion sequence cannot be formed if it requires binding a reference to a non-const to an rvalue (except when binding an implicit object parameter; see the special rules for that case in 13.3.1).  [Note: this means, for example, that a candidate function cannot be a viable function if it has a non-const reference parameter (other than the implicit object parameter) and the corresponding argument is a temporary or would require one to be created to initialize the reference (see 8.5.3).]

>Can you tell me where the DOH is?

Your example does not involve a temporary, which was the point of the example I was trying to contrive, and mimics the situation you had originally inquired about.

Sincerely,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux