Connecting Tech Pros Worldwide Help | Site Map

Reference are always lvalue?

  #1  
Old December 21st, 2007, 12:15 PM
George2
Guest
 
Posts: n/a
Hello everyone,


Is the conclusion correct? Both const reference and non-const
reference are lvalue?

I think it is true and I can not find a sample which does not follow
it.


thanks in advance,
George
  #2  
Old December 21st, 2007, 02:25 PM
Victor Bazarov
Guest
 
Posts: n/a

re: Reference are always lvalue?


George2 wrote:
Quote:
Is the conclusion correct? Both const reference and non-const
reference are lvalue?
>
I think it is true and I can not find a sample which does not follow
it.
If an expression has the type 'reference to T', it's an lvalue. See
[expr]/6. I presume by "const reference" and "non-const reference"
you actually mean "reference to const" and "reference to non-const".

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
reference type methods Ruben answers 22 July 19th, 2008 12:45 AM
non-const reference and const reference George2 answers 17 January 25th, 2008 05:38 AM
Reference are always lvalue? George2 answers 6 December 25th, 2007 02:29 PM
non-const reference and const reference George2 answers 5 December 17th, 2007 02:25 PM