A few questions

monarch_dodra monarchdodra at gmail.com
Fri Jul 27 03:57:11 PDT 2012


On Friday, 27 July 2012 at 10:29:15 UTC, Namespace wrote:
> 1.
> Why are these two method header identitcal?
>
> const Foo some_function() {
>
> and
>
> Foo some_function() const {
>
> ?
>
> IMO that isn't consistent. IMO only the last is valid.
> With this example, it is somewhat understandable.

Some would argue only the *first* should be valid:

----
@safe const @property nothrow
Foo some_function();
----

Basically, yeah, you have the option of putting qualifiers before 
or after.


More information about the Digitalmars-d-learn mailing list