D & C++ class question

2018-11-27 Thread bauss via Digitalmars-d-learn
If I have a class from D. How would you use that class in C++? Like what's the correct approach to this. Would it work just by doing "extern(C++)" or will that only work for D to use C++ classes?

Re: How to iterate getSymbolsByUDA

2018-11-27 Thread Eko Wahyudin via Digitalmars-d-learn
static foreach(sym; getSymbolsByUDA!(A, Attr)){ writeln(sym.stringof); // print variable name "a" this what i want } foreach(sym; getSymbolsByUDA!(A, Attr)){ writeln(sym.stringof); // print "sym" } foreach(sym; getSymbolsByUDA!(A, Attr)){ writeln(__traits(identifier,

Re: What can I use to parse a date string in a custom format?

2018-11-27 Thread Neia Neutuladh via Digitalmars-d-learn
On Tue, 27 Nov 2018 18:22:17 +, PacMan wrote: > I've been looking for a function or library to parse a date in a custom > format (for validation) similar to C#'s [1] > TryParseExactbut I couldn't find any. so far I only found > fromISOExtString(), and fromSimpleString() which doesn't allow me

What can I use to parse a date string in a custom format?

2018-11-27 Thread PacMan via Digitalmars-d-learn
I've been looking for a function or library to parse a date in a custom format (for validation) similar to C#'s [1] TryParseExactbut I couldn't find any. so far I only found fromISOExtString(), and fromSimpleString() which doesn't allow me to set a custom string format. I've looked up at

Re: How do I the temlate parameter name as string?

2018-11-27 Thread bauss via Digitalmars-d-learn
On Tuesday, 27 November 2018 at 02:00:44 UTC, PacMan wrote: ParameterIdentifierTuple from std.traits did work fine for regular functions but not for template functions: Error: template instance `std.traits.ParameterIdentifierTuple!(f)` does not match template declaration

Re: Integrate vibe.d into Windows Service

2018-11-27 Thread Daniel Kozak via Digitalmars-d-learn
On Wednesday, 21 November 2018 at 09:59:19 UTC, Andre Pany wrote: Hi, I translated the CPP example of a windows service to D. https://docs.microsoft.com/en-us/windows/desktop/Services/svc-cpp [...] Today I needed this too, and after some searching I came across this package which works ok

Re: dip1000 rule 5

2018-11-27 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 27 November 2018 at 08:56:47 UTC, sclytrack wrote: --- How is a person able to understand this DIP? ./dmd -betterC -dip1000 test.d I'll repeat: the DIP does not currently match the implementation. I was not involved in any of it and have no idea what the diff actually is.

Re: dip1000 rule 5

2018-11-27 Thread sclytrack via Digitalmars-d-learn
On Monday, 26 November 2018 at 09:10:23 UTC, sclytrack wrote: On Sunday, 25 November 2018 at 19:22:36 UTC, sclytrack wrote: There are 4 rules listed. https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md What is rule 5? int* global_ptr; void abc() { scope int* a; int* b;