[Issue 3567] std.traits: Unqual doesn't handle arrays well

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 18 07:25:35 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=3567

FeepingCreature <default_357-line at yahoo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |default_357-line at yahoo.de
         Resolution|INVALID                     |---

--- Comment #3 from FeepingCreature <default_357-line at yahoo.de> ---
This bug needs a second look.

Consider this code:

struct S
{
  int* ipointer;
}

pragma(msg, (Unqual!(const S)).stringof);

As can be seen, Unqual has just deeply stripped const, not shallowly.

Either Unqual must be made to error when passed a const struct with reference,
or Unqual must leave const(int[]) as int[].

The current state is broken.

--


More information about the Digitalmars-d-bugs mailing list