[Issue 21210] std.traits : isAssignable false positive on disabled copy struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 30 18:05:26 UTC 2020


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@Geod24 created dlang/phobos pull request #7612 "Fix 21210:  std.traits :
isAssignable false positive on disabled copy struct" fixing this issue:

- Fix 21210:  std.traits : isAssignable false positive on disabled copy struct

  `isAssignable` would previously return `true` for non-copyable types,
  even though code that tried to use an lvalue would not compile.
  This behavior was originally found when implementing `-preview=in`.

  With the new -preview=in check, the const-folding seemed to be a bit
  too aggressive when an rvalue is passed, meaning that the check might
  fail (probably due to the code that initialize the temporary).

https://github.com/dlang/phobos/pull/7612

--


More information about the Digitalmars-d-bugs mailing list