Template variable not reach at compile

2018-07-21 Thread Greatsam4sure via Digitalmars-d-learn
auto arithmetic(T, V, U)(T a, V b, U op){ return mixin("a"~op~"b"); } //call like this arithmetic(1.5,2.5,"op"); Compiler says the variable op is not reach at compile time. So how can the varible a and b be reach at compile time and op is not reach. I will appreciate any help. I have al

Template variable not reach at compile

2018-07-21 Thread Greatsam4sure via Digitalmars-d-learn
Sorry for the typo. This is the problem auto arithmetic(T, V, U)(T a, V b, U op){ return mixin("a"~op~"b"); } //call like this arithmetic(1.5,2.5,"+"); Compiler says the variable op is not reach at compile time. So how can the varible a and b be reach at compile time and op is not rea

Re: Template variable not reach at compile

2018-07-21 Thread rikki cattermole via Digitalmars-d-learn
On 22/07/2018 12:15 AM, Greatsam4sure wrote: auto arithmetic(T, V, U)(T a,  V b,  U op){    return mixin("a"~op~"b"); } //call like this arithmetic(1.5,2.5,"op"); Compiler says the variable op is not reach at compile time.  So how can the varible a and b be reach at compile time and op is no

Re: Template variable not reach at compile

2018-07-21 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 21 July 2018 at 12:17:54 UTC, Greatsam4sure wrote: Sorry for the typo. This is the problem auto arithmetic(T, V, U)(T a, V b, U op){ return mixin("a"~op~"b"); } //call like this arithmetic(1.5,2.5,"+"); Compiler says the variable op is not reach at compile time. So how ca

Re: Template variable not reach at compile

2018-07-21 Thread Greatsam4sure via Digitalmars-d-learn
On Saturday, 21 July 2018 at 13:13:11 UTC, Mike Parker wrote: On Saturday, 21 July 2018 at 12:17:54 UTC, Greatsam4sure wrote: Sorry for the typo. This is the problem auto arithmetic(T, V, U)(T a, V b, U op){ return mixin("a"~op~"b"); } //call like this arithmetic(1.5,2.5,"+"); Compiler

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-21 Thread Seb via Digitalmars-d-learn
On Friday, 20 July 2018 at 16:37:24 UTC, Seb wrote: On Friday, 20 July 2018 at 15:33:19 UTC, Radu wrote: On Thursday, 19 July 2018 at 18:16:17 UTC, kinke wrote: I'll go with Seb's suggestion and look at the betterC tests upstream for issues like this. FYI: I made a reboot of the old PR to a n

Re: Trying to use the libclang Dub package

2018-07-21 Thread Laurent Tréguier via Digitalmars-d-learn
On Friday, 20 July 2018 at 14:03:20 UTC, bachmeier wrote: Yeah, I didn't need the symlink on a different machine with Ubuntu 18.04. After some digging around, I found that I had libclang1-3.9, libclang-dev, and libclang-common-3.9-dev installed. libclang1-3.9 installs libclang.so.1. The one I w

QWebView requesting QtE5WebEng32.so on windows

2018-07-21 Thread Dr.No via Digitalmars-d-learn
So I went to try out QWebView on Windows from this wrapper: https://github.com/MGWL/QtE5 all the examples went fine until I tried QWebView: https://github.com/MGWL/QtE5/blob/master/examples/webview.d I compile using this command line: dmd -m32 webview.d qte5.d -oflol but when I run I get t

Request scoped information in Vibe.d

2018-07-21 Thread Venkat via Digitalmars-d-learn
How do I make variables available to diet templates ? Java has request.setAttribute. Vibe.d's HTTPServerRequest has params and queryString. But by the looks of it, neither one of them is created for the purpose of temporary storage in the request. Where do I store request scoped information ?