digitalmars.D - can't use extern(C++,std) in a module that imports std.whatever
- Timothee Cour via Digitalmars-d (10/10) Feb 13 2017 https://issues.dlang.org/show_bug.cgi?id=17178
- Nicholas Wilson (5/16) Feb 13 2017 Have you tried renaming? either the import of `std.exception` or
- Walter Bright (2/3) Feb 14 2017 See https://issues.dlang.org/show_bug.cgi?id=13183
https://issues.dlang.org/show_bug.cgi?id=17178 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 seems like a serious blocker to interface with C++ ; what's a workaround?
Feb 13 2017
On Monday, 13 February 2017 at 08:21:38 UTC, Timothee Cour wrote:https://issues.dlang.org/show_bug.cgi?id=17178 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 seems like a serious blocker to interface with C++ ; what's a workaround?Have you tried renaming? either the import of `std.exception` or the C++ namespace. I'm not sure if the latter is possible, if its not then it would be good to have: something like, `extern(C++, cppstd="std");`.
Feb 13 2017
On 2/13/2017 12:21 AM, Timothee Cour via Digitalmars-d wrote:what's a workaround?See https://issues.dlang.org/show_bug.cgi?id=13183
Feb 14 2017