www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19702] New: Remove usage of DECLARE_HANDLE

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 puremagic.com
          Reporter: andre 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

--
Feb 26 2019