Closed Laeeth closed 5 years ago
Could you provide an example please? D doesn't need forward declarations at module scope, so I can't see how this would come about.
Try autowrapping any non trivial C++ project using my fork. (yours won't finish because it will choke on things I just turn into an opaque). You will see what I mean. I will create test case if /when time.
The problem is that D forbids forward declarations!
It comes about via recursive header imports.
Example - try include bondconvention.h
I googled bondconvention.h
but didn't find anything. Is is this open source?
I sent you a link before. Git.kaleidic.io Xenoncpp
The problem is that D forbids forward declarations!
D forbids more than one declaration. Forward declarations are fine as long as they're the only one.
Command to try it:
./d++ --include-path ~/kaleidic/xenoncpp/Analytics/Analytics.Rates --include-path ~/kaleidic/xenoncpp/Analytics/Analytics.Numerical --include-path ~/kaleidic/xenoncpp/Analytics/Dlang/cpp --include-path ~/kaleidic/mir-algorithm/include --parse-as-cpp --ignore-macros xenon.dpp
For now I'm hitting a lot of unstranslatable cursors from boost but not anything to do with namespaces.
when namespaces are reopened then have problems with forward declaration. I think need to gather all declarations in each namespace and open an extern(C++) extern(C++,"foo") extern(C++,"bar") for everything in foo.bar namespace rather than reopening as currently happens.