On Fri, 2017-07-14 at 12:16 -0600, Neil Carlson wrote:
> I have some parsing code that processes a sequence of values arriving
> in class(*) variables and creates an array from them. The type of the
> array is established by that of the first value, and is not known
> beforehand. The first value is cached as the class(*) variable
> "mold", and I am checking that each subsequent "value" has the same
> type by using same_type_as(value, mold). This has worked as I
> expected for a number of compilers, but in looking at the standard
> again, I'm thinking this behavior is just a fortunate "extension" (not
> shared by a new compiler), and that the arguments to same_type_as
> cannot have dynamic types that are intrinsic types (non-extensible).
> Is that right?
Intrinsic types cannot be extended, but they can be the dynamic type of
unlimited polymorphic -- class(*) -- variables.
|