Bug 21340 – extern(C++,(emptyTuple)) should result in no namespace not an error
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2020-10-24T12:16:31Z
Last change time
2020-11-03T01:32:12Z
Keywords
C++
Assigned to
No Owner
Creator
Nicholas Wilson
Comments
Comment #0 by iamthewilsonator — 2020-10-24T12:16:31Z
```
extern(C++)
struct A {}
extern(C++,)
struct A {}
extern(C++, "")
struct A {}
extern(C++,mixin(""))
struct A {}
```
should be all equivalent, currently only the first compiles.
```
extern(C++, true ? "ns" : "")
struct B {}
```
compiles, but
```
extern(C++, false ? "ns" : "")
struct B {}
```
does not.
Comment #1 by dlang-bot — 2020-10-25T00:25:37Z
@thewilsonator created dlang/dmd pull request #11905 "Fix issue 21340- extern(C++,) extern(C++, "") and extern(C++,mixin(""…" fixing this issue:
- Fix issue 21340- extern(C++,) extern(C++, "") and extern(C++,mixin("")) should result in no namespace not an error
https://github.com/dlang/dmd/pull/11905
Comment #2 by iamthewilsonator — 2020-10-25T00:32:44Z
that should be
extern(C++,mixin("\"\""))
struct A {}
dlang/dmd pull request #11905 "Fix issue 21340 - extern(C++,(emptyTuple)) should result in no namespace not an error" was merged into master:
- 17845af13059f8d03dc80af0fdcbcf639b877c13 by Nicholas Lindsay Wilson:
Fix issue 21340 - extern(C++,(emptyTuple)) should result in no namespace not an error
https://github.com/dlang/dmd/pull/11905
Comment #5 by dlang-bot — 2020-11-03T01:32:12Z
dlang/dlang.org pull request #2872 "Document issue 21340 - `extern(C++, (expression))` now accepts empty tuples" was merged into master:
- 4f3b1fad4532e2513c5ef74ed288419933b27ab7 by Nicholas Lindsay Wilson:
document issue 21340 - extern(C++, (emptyTuple))
https://github.com/dlang/dlang.org/pull/2872