From 6009391358096565853
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,8cd1d287d11edee5
X-Google-Attributes: gidf78e5,public
From: juergen@monocerus.n-online.de (Juergen Heinzl)
Subject: Re: Quick question about const function parameters
Date: 2000/10/22
Message-ID: <slrn8v1j2s.51.juergen@monocerus.n-online.de>#1/1
X-Deja-AN: 684407813
Content-Transfer-Encoding: quoted-printable
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <39ef6c88$1_2@news.nwlink.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 972215657 mail2news:19527 mail2news mail2news.demon.co.uk
Organization: Rent A Bug Ltd
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
User-Agent: slrn/0.9.5.7 (UNIX)
Mime-Version: 1.0
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id WAA06935
Newsgroups: comp.std.c++

In article <39ef6c88$1_2@news.nwlink.com>, Gary Hinger wrote:
>Please tell me if am right (and that VS6 is wrong). Defining a function'=
s
>parameter to be const is completely irrelevant except in the actual
>implementation. Thus, the following should work according to the Standar=
d.
>Thanks.
>
>void foo( void (*)(int) );
>void bar( int const );
>
>void test() {foo( bar );}
[-]
8.3.5 Functions
---------------

3) ...=20
   Any cv-qualifier modifying a parameter type is deleted. [Example:
   the type void (*)( const int) becomes void (*)(int) -- end example]

   Such cv-qualifiers affect only the definition of the parameter within
   the the body of the function; they do not affect the function type.
   ...

Cheers,
Juergen

--=20
\ Real name     : J=FCrgen Heinzl         \       no flames      /
 \ EMail Private : monocerus@n-online.de \ send money instead /

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]
[ Note that the FAQ URL has changed!  Please update your bookmarks.     ]




