Is it legal to convert a pointer/reference to a fixed array size to a smaller size
问题 Is it legal as per the C++ standard to convert a pointer or reference to a fixed array (e.g. T(*)[N] or T(&)[N] ) to a pointer or reference to a smaller fixed array of the same type and CV qualification (e.g. T(*)[M] or T(&)[M] )? Basically, would this always be well-formed for all instantiations of T (regardless of layout-type): void consume(T(&array)[2]); void receive(T(&array)[6]) { consume(reinterpret_cast<T(&)[2]>(array)); } I don't see any references to this being a valid conversion in: