digitalmars.D.bugs - [Issue 23029] New: ImportC: _Generic treats pointer to const and
- d-bugmail puremagic.com (25/25) Apr 17 2022 https://issues.dlang.org/show_bug.cgi?id=23029
https://issues.dlang.org/show_bug.cgi?id=23029 Issue ID: 23029 Summary: ImportC: _Generic treats pointer to const and regular pointers as the same type Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: ImportC, rejects-valid Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: dave287091 gmail.com void print_const(const char*); void print(char*); int main(){ (void)_Generic("", // Error: generic association type `char*` can only appear once char*: print, const char*: print_const )("hello"); } --
Apr 17 2022