www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21340] New: extern(C++,) extern(C++, "") and

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

          Issue ID: 21340
           Summary: extern(C++,) extern(C++, "") and extern(C++,mixin(""))
                    should result in no namespace not an error
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: iamthewilsonator hotmail.com

```
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.

--
Oct 24 2020