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"); }
@WalterBright created dlang/dmd pull request #14014 "fix Issue 23029 - ImportC: _Generic treats pointer to const and regul…" fixing this issue: - fix Issue 23029 - ImportC: _Generic treats pointer to const and regular pointers as the same type https://github.com/dlang/dmd/pull/14014
dlang/dmd pull request #14014 "fix Issue 23029 - ImportC: _Generic treats pointer to const and regul…" was merged into master: - 2debd946c8d5c24e47436f657d49bb3257daf1fc by Walter Bright: fix Issue 23029 - ImportC: _Generic treats pointer to const and regular pointers as the same type https://github.com/dlang/dmd/pull/14014