Topic: Is this valid?


Author: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Date: 1995/08/31
Raw View
va@styx.org.chemie.uni-frankfurt.de (Volker Apelt) writes:

>Is the declaration of two member functions which differ only in their
>ctor-qualifiers valid c++?

You mean cv-qualifiers?  Yes.

>eg.
>
>class A {
>public:
>   T& elem(int n)const;
>   T& elem(int n);
>};

Yes, that's perfectly legal.

--
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. ]