Bug 17178 – namespace bar.std conflicts with namespace bar.std
Status
RESOLVED
Resolution
DUPLICATE
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2017-02-13T08:09:00Z
Last change time
2017-02-13T12:52:09Z
Assigned to
nobody
Creator
timothee.cour2
Comments
Comment #0 by timothee.cour2 — 2017-02-13T08:09:52Z
```
module bar;
extern (C++, std) { struct Foo1 { } }
extern (C++, std) { struct Foo2 { } }
```
DMD64 D Compiler v2.073.0
dmd -c -o- bar.d
Error: namespace bar.std conflicts with namespace bar.std at bar.d(2)
this should work, no reason to require all `extern (C++, std)` declarations to be in 1 block, sometimes this is not desirable
Comment #1 by timothee.cour2 — 2017-02-13T08:18:13Z
other bug:
dmd -c -o- bar.d
Error: namespace bar.std conflicts with import bar.std at bar.d(2)
```
module bar;
import std.exception;
extern (C++, std) { struct Foo1 { } }
```
this makes it impossible to mix phobos code (requiring import std.some_package) and `extern(C++,std)`
Comment #2 by dfj1esp02 — 2017-02-13T12:52:09Z
*** This issue has been marked as a duplicate of issue 13183 ***