🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

const and typedefs, inconsistent?

#2792
From: Kevin McIsaac
Date: Fri, 01 Dec 1995 00:10
20 lines
1368 bytes
A look at the April draft working papers at: 
http://www.cygnus.com/misc/wp/draft/dcl.html in section 7.1.2, shows the 
following examples:

  typedef char* Pc;
  void f(const Pc);       // void f(char* const)  (not const char*)
  void g(const int Pc);   // void g(const int)

May questions are: why the f(const Pc) resolves to char* const? Is the 
associativity changed? And is it possible to format f(), using Pc, such that 
it resolves to const char*? TIA.

-- 
// kev@lamsys.com
// What the heck did you think it was made with?


[ 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: <49ler5$qgu@shadow2.qnetix.ca>
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
From: KevinM@lamsys.com (Kevin McIsaac)
Newsgroups: comp.std.c++
Subject: const and typedefs, inconsistent?
Date: 1 Dec 1995 00:10:16 GMT
Organization: Lambda Systems Ltd
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <49ler5$qgu@shadow2.qnetix.ca>
Reply-To: kev@lamsys.com
NNTP-Posting-Host: taumet.eng.sun.com
Mime-Version: 1.0
Content-Type: Text/Plain; charset="US-ASCII"
Keywords: const typedef cast
X-Nntp-Posting-Host: 206.12.187.20
X-Newsreader: WinVN 0.99.7
X-Lines: 16
Content-Length: 533
Originator: clamage@taumet