R
Road Tang
Greetings,
In standard, the multi-level pointer conversion whith cv-qualifiers is very
strict.
I wrote 3 converstion statement.
char t = 'a';
char **pp = &c;
char const **ppc = pp; //1. this is forbiden
BUT, for other 2 statment.
char const *const * pcpc = pp; //2
char const *const *const cpcpc = pp; //3
From clauses in C++Std 4.4 . I think the //2 is forbidden, and the //3 is
ok.
but after use g++ -ansi to compile, both //2 and //3 are passed.
So what happen?
Regards
-Road
In standard, the multi-level pointer conversion whith cv-qualifiers is very
strict.
I wrote 3 converstion statement.
char t = 'a';
char **pp = &c;
char const **ppc = pp; //1. this is forbiden
BUT, for other 2 statment.
char const *const * pcpc = pp; //2
char const *const *const cpcpc = pp; //3
From clauses in C++Std 4.4 . I think the //2 is forbidden, and the //3 is
ok.
but after use g++ -ansi to compile, both //2 and //3 are passed.
So what happen?
Regards
-Road