How to Unqual an array?
Steven Schveighoffer
schveiguy at gmail.com
Sat Nov 16 16:39:13 UTC 2019
On 11/16/19 10:20 AM, James Blachly wrote:
> On 11/16/19 9:48 AM, James Blachly wrote:
>> I am trying to write templated code that will take a character array
>> -- mutable, const, or immutable (string).
>
> I am aware of isSomeString, but I am still curious about Unqual array
> from a learning perspective.
Unqual for the most port unqualifies the *head* of the type. This only
makes a difference in terms of pointers and arrays (where the tail can
be qualified separately from the head). For all other types, the whole
thing has it's qualifiers removed.
This is not explicitly stated in the docs, and it may be an accidental
result, but it's too late to change it now. It can be useful in some cases.
-Steve
More information about the Digitalmars-d-learn
mailing list