pointer to std.algorithm.iteration : splitter

2023-08-30 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below error Program ``` void main() { import std.stdio:writeln; import std.algorithm.iteration : splitter; auto splitter_ptr = &splitter!((a, b) => a.splitter(b).array); string str = "TEST1;TEST2;TEST3"; auto words = spl

Re: Function Pointer

2023-08-30 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 30 August 2023 at 17:48:19 UTC, Vino wrote: Hi All, Request your help on hot to create a pointer for a function whose function type is Result. ``` ReturnType!(typeof(&test)).stringof; // Result From Vino ``` To get a function pointer type from a function type, you can add `

Re: Pointer to environment.get

2023-08-30 Thread Vino via Digitalmars-d-learn
On Monday, 28 August 2023 at 10:27:07 UTC, Basile B. wrote: On Monday, 28 August 2023 at 10:20:14 UTC, Basile B. wrote: [...] To go further, the correct code for syntax you wanted to use is actually ```d alias Ext_T = string (const char[] a, string b); // define a function type alias Ext_

Ideas to reduce error message size?

2023-08-30 Thread Paolo Invernizzi via Digitalmars-d-learn
Hello everybody, If a compilation error is thrown with CTFE involved, the 'called from here' is like: ``` src/api3.d(2010): Error: uncaught CTFE exception `object.Exception("42703: column \"system_timestamp_ms\" does not exist. SQL: select coalesce(count(system_timestamp_ms),0) from dev_sa