www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Any plans to make it possible to call C++ functions that reside in a namespace?

reply Dejan Lekic <dejan.lekic gmail.com> writes:
As subject says. I am pretty much happy with the current C++ support. The 
only thing I need is to be able to call functions from namespace(s). Any 
plans to add this feature?
Dec 14 2011
next sibling parent reply deadalnix <deadalnix gmail.com> writes:
Le 14/12/2011 22:47, Dejan Lekic a écrit :
 As subject says. I am pretty much happy with the current C++ support. The
 only thing I need is to be able to call functions from namespace(s). Any
 plans to add this feature?
That would be great. ATM, I just create dumb function in the global namespace and thoses functions forward to the function within the namespace.
Dec 15 2011
next sibling parent mta`chrono <chrono mta-international.net> writes:
Adding namespaces to C++ interfacing would be great. AFAIK you could
also create a linker file and rename the symbols before linking.

------ suggestion:

extern(C++, "MyNamespace") interface Foobar
{
     void foo();
     void bar();
}
Dec 15 2011
prev sibling parent "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Thursday, 15 December 2011 at 08:16:52 UTC, deadalnix wrote:
 That would be great. ATM, I just create dumb function in the 
 global namespace and thoses functions forward to the function 
 within the namespace.
That is what I do as well, but when I have thousands functions to add it takes time... ;)
Dec 17 2011
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 12/14/2011 1:47 PM, Dejan Lekic wrote:
 As subject says. I am pretty much happy with the current C++ support. The
 only thing I need is to be able to call functions from namespace(s). Any
 plans to add this feature?
I hadn't planned to, but it's a good idea. I suggest adding it as an enhancement request on bugzilla.
Dec 15 2011
parent "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Friday, 16 December 2011 at 00:44:07 UTC, Walter Bright wrote:
 I hadn't planned to, but it's a good idea. I suggest adding it 
 as an enhancement request on bugzilla.
I will do as you suggested. Thanks Walter.
Dec 17 2011