[Issue 19702] New: Remove usage of DECLARE_HANDLE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 26 18:57:49 UTC 2019


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

          Issue ID: 19702
           Summary: Remove usage of DECLARE_HANDLE
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: andre at s-e-a-p.de

It seems the usage of template

package template DECLARE_HANDLE(string name, base = HANDLE) {
    mixin ("alias " ~ base.stringof ~ " " ~ name ~ ";");

in druntime is superfluous but causes headaches for IDEs like IntelliJ as it
cannot find the source of e.g. SC_HANDLE
which is defined as

mixin DECLARE_HANDLE!("SC_HANDLE");

As far as I understand the template can be removed and the handles can
be defined as e.g.

alias HANDLE SC_HANDLE;

See also 
https://forum.dlang.org/post/jqifbzadmpzxqxhzfsyl@forum.dlang.org

--


More information about the Digitalmars-d-bugs mailing list