Reference are always lvalue?

Discussion in 'C++' started by George2, Dec 21, 2007.

  1. George2

    George2 Guest

    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
    George2, Dec 21, 2007
    #1
    1. Advertising

  2. George2 wrote:
    > 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
    Victor Bazarov, Dec 21, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. danny van elsen
    Replies:
    6
    Views:
    3,709
    Pete Becker
    May 7, 2005
  2. Kavya
    Replies:
    9
    Views:
    508
    Dik T. Winter
    Oct 28, 2006
  3. Andrew Ward
    Replies:
    2
    Views:
    1,043
    Zorro
    Jul 19, 2005
  4. Replies:
    11
    Views:
    693
    James Kuyper
    Sep 22, 2008
  5. Julian Mehnle
    Replies:
    0
    Views:
    238
    Julian Mehnle
    Jul 17, 2003
Loading...

Share This Page