frank said:
Am I correct to think that wchar_t *a is compatible with const wchar_t *
restrict format in this context:
Whether two types are compatible or not depends on the types
themselves are does not vary from one context to another. wchar_t *
is not compatible with either const wchar_t * or with const wchar_t *
restrict.
What you are discussing is something else that, sadly, does not have a
name. It is the property that type T1 can be passed as argument to
a function that has a parameter of T2 in that position. This is
closely related to question whether an expression of type T1 can be
assigned to a object of type T2 because parameter passing is defined
in terms of assignment.
Unfortunately neither of these two properties is symmetric, so we have
to careful when inverting a term. Maybe just using "may be assigned
to" and "passed to" will do as a shorthand. In that case, wchar_t *
may be passed to both const wchar_t * and to const wchar_t * restrict.
To take another example, wchar_t * may be passed to const wchar_t *
const but it may no be assigned to that type.
None of these different types are compatible with each other.
<snip>