🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1903

Re: string literals - lvalues ?

#1903
From: CS-Usenet
Date: Tue, 05 Sep 1995 05:00
23 lines
1447 bytes
krotoff@boy.rector.msu.su (Alexsander Krotoff) writes:

>I have a questio: is it mentioned in the c++ draft standard are
>string literals lvalues or not ? Is it possible to take an address
>of string ?

No, the current C++ draft does not specify this. :-(
However, the C standard does specify that string literals are lvalues
and hence that their address can be taken, and it is pretty likely
that the eventual C++ standard will say the same thing.

-- 
Fergus Henderson             |  #define x t=a[i],a[i]=a[m],a[m]=t
                             |  char a[]=" 12345678";main(m,i,j,t){for(i=m;i<
fjh@cs.mu.oz.au              |  9;x,i++)for(x,j=m;--j?(t=a[m-j]-a[m])-j&&t+j:
http://www.cs.mu.oz.au/~fjh  |  main(m+1)*0;);m-9||puts(a+1);} /* 8 queens */


---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <MATT.95Sep04210034@Austern>
Path: arc1-ca.pugleaf.net!newsxfer.itd.umich.edu!agate!agate!Matt
References: <427hu8$2k8@alpha.phys.msu.su>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newsxfer.itd.umich.edu!agate!agate!Matt
From: CS-Usenet <news@cs.mu.OZ.AU>
Newsgroups: comp.std.c++
Subject: Re: string literals - lvalues ?
Date: 05 Sep 1995 05:00:34 GMT
Organization: Computer Science, University of Melbourne, Australia
Sender: news@cs.mu.OZ.AU (CS-Usenet)
Approved: Matt@Austern
Message-ID: <MATT.95Sep04210034@Austern>
References: <427hu8$2k8@alpha.phys.msu.su>
NNTP-Posting-Host: austern.hip.berkeley.edu