Errors, bugs, questions - page 1731

 
Комбинатор:
Seriously? Bummer, it shouldn't be like that.
That makes sense.
 
fxsaber:
Then there should be no equivalence in your statement
Yes, we corrected the other one. In your case the compiler error is valid (due to the stated equivalence)
 
const A const * Method( const A const * const & a[] ) const
Is the second const able to influence anything? I can't think of any such example.
 
A100:
Yes, corrected the other. In your case, the error produced by the compiler is valid (due to the stated equivalence)
You want to confuse me.Is the statement"A const *" equal to "const A *" correct? I believe that it is not.
 
fxsaber:
That makes sense.
If you think of [] as part of a type, then no
 
A100:
Correct [in pattern - as appropriate].

And how do you justify that? My arguments are.

A const A * is NOT a constant pointer to a constant object.

A const * is a constant pointer to a non-const object.

These seem to be different entities.

 
fxsaber:

And how do you justify this?

A * const?
 
fxsaber:
You want to confuse me.Is the statement"A const *" equal to "const A *" correct? I don't think so.
Equivalent. Usually the second one is used, and the first one is used to confuse at the interview. ) And there you are.
 
Комбинатор:
A * const?
How do you justify that const A * == A const *? It's not like that.
 
Комбинатор:
If you think of [] as part of a type, then no
So it's not a constant reference.