Re: C++/STL interop

2015-08-25 Thread anonymous via Digitalmars-d-learn
On Monday 24 August 2015 17:37, anonymous wrote:

> I saw https://issues.dlang.org/show_bug.cgi?id=14956 .
> 
> 
> questions:
> - is std.basic_string released into the wild?
> - where do I find std.basic_string?
> - does std.vector exist? That would allow me to get rid of some
> C++ clue code (build an C-like interface, copy data etc)...

basic_string and char_traits are C++ things. If you're looking for D 
bindings for them, I don't know if they exist or where to find them. You 
could try asking in the bugzilla issue you linked.


C++/STL interop

2015-08-24 Thread anonymous via Digitalmars-d-learn

I saw https://issues.dlang.org/show_bug.cgi?id=14956 .


questions:
- is std.basic_string released into the wild?
- where do I find std.basic_string?
- does std.vector exist? That would allow me to get rid of some 
C++ clue code (build an C-like interface, copy data etc)...


Putting

extern(C++)
{
  void foo14a(std.basic_string!(char) *p);
  void foo14b(std.basic_string!(int) *p);
  void foo14f(std.char_traits!char* x, std.basic_string!char* p, 
std.basic_string!char* q);

}

into a file results in " Error: undefined identifier" (dmd 2.068).