On Saturday, 29 April 2017 at 01:49:56 UTC, Atila Neves wrote:
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App, afa
On Saturday, 29 April 2017 at 05:58:35 UTC, Stanislav Blinov
wrote:
On Friday, 28 April 2017 at 20:43:50 UTC, Alex wrote:
void main()
{
foreach(o1; __traits(getOverloads, S1, "opCall"))
{
alias P1 = Parameters!o1;
foreach(o2; __traits(getOverloads, S2, "opCall"))
On Friday, 28 April 2017 at 20:43:50 UTC, Alex wrote:
Hi all,
I have a question about the Parameters trait from
https://dlang.org/phobos/std_traits.html#Parameters
The following code does not compile. Why?
Is it mainly assumed to use it with functions without overloads?
Rather, it is to be use
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App, afaik in
that case the MS Visual Studio linker is used instead of
On Friday, 28 April 2017 at 19:08:18 UTC, ParticlePeter wrote:
On Friday, 28 April 2017 at 17:57:34 UTC, Ali Çehreli wrote:
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
On Friday, 28 April 2017 at 09:25:31 UTC, John Chapman wrote:
On Thursday, 27 April 2017 at 20:20:23 UTC, Nierjerson wrote:
QueryInterface is COM's version of opCast. It asks if you
support the interface represented by an IID (riid). If you
don't, then you return E_NOINTERFACE. If you do, t
On Friday, 28 April 2017 at 09:25:31 UTC, John Chapman wrote:
On Thursday, 27 April 2017 at 20:20:23 UTC, Nierjerson wrote:
I think the main issue though, is that I really don't know
what is going on when I invoke the PS function. It seems to
call the server method that takes the interface an
Hi all,
I have a question about the Parameters trait from
https://dlang.org/phobos/std_traits.html#Parameters
The following code does not compile. Why?
import std.traits : Parameters;
void main()
{
static assert(is(Parameters!S1 == Parameters!S2));
}
struct S1
{
auto opCall() {
On Friday, 28 April 2017 at 17:57:34 UTC, Ali Çehreli wrote:
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
> float[3] my_color;
> cppFunc( my_color );
>
> -> Error: Intern
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App, afaik in
that case the MS Visual Studio linker is used instead of
optilink. Will add your findings to the bug report.
A
On Fri, Apr 28, 2017 at 04:42:28PM +, via Digitalmars-d-learn wrote:
[...]
> writefln(text("%.", i, "f"), x);
[...]
There's no need to use text() here:
writefln("%.*f", i, x);
does what you want.
T
--
"You know, maybe we don't *need* enemies." "Yeah, best friends are abou
On Friday, 28 April 2017 at 17:57:34 UTC, Ali Çehreli wrote:
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
> float[3] my_color;
> cppFunc( my_color );
>
> -> Error: Intern
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
> float[3] my_color;
> cppFunc( my_color );
>
> -> Error: Internal Compiler Error: unable to pass static array to
That part i
On Friday, 28 April 2017 at 17:15:54 UTC, kinke wrote:
On Friday, 28 April 2017 at 15:56:17 UTC, ParticlePeter wrote:
So what next? How can I interface to the cpp function?
*** C++:
bool cppFunc(float (&color)[3])
{
color[0] = 1;
color[1] = 2;
color[2] = 3;
return true;
}
***
On Friday, 28 April 2017 at 15:56:17 UTC, ParticlePeter wrote:
So what next? How can I interface to the cpp function?
*** C++:
bool cppFunc(float (&color)[3])
{
color[0] = 1;
color[1] = 2;
color[2] = 3;
return true;
}
*** D:
extern(C++) bool cppFunc(ref float[3] color);
void
On Friday, 28 April 2017 at 16:42:28 UTC, Petar Kirov
[ZombineDev] wrote:
On Friday, 28 April 2017 at 16:24:55 UTC, Suliman wrote:
On Friday, 28 April 2017 at 15:45:25 UTC, Suliman wrote:
I am using https://github.com/mysql-d/mysql-native
It's return from DB variant data-type.
My DB include va
On Friday, 28 April 2017 at 16:49:18 UTC, kinke wrote:
On Friday, 28 April 2017 at 16:24:55 UTC, Suliman wrote:
import std.stdio;
import std.variant;
void main()
{
Variant b = 56.051151;
float x = b.coerce!float;
writeln(x);
}
56.0512
void main()
{
import core.st
On Friday, 28 April 2017 at 16:24:55 UTC, Suliman wrote:
import std.stdio;
import std.variant;
void main()
{
Variant b = 56.051151;
float x = b.coerce!float;
writeln(x);
}
56.0512
void main()
{
import core.stdc.stdio;
import std.stdio;
double d = 56.05115
Report a bug.
On Friday, 28 April 2017 at 16:24:55 UTC, Suliman wrote:
On Friday, 28 April 2017 at 15:45:25 UTC, Suliman wrote:
I am using https://github.com/mysql-d/mysql-native
It's return from DB variant data-type.
My DB include value: 56.051151 (double type in DB)
I need to extract it. I tried several v
On Friday, 28 April 2017 at 15:45:25 UTC, Suliman wrote:
I am using https://github.com/mysql-d/mysql-native
It's return from DB variant data-type.
My DB include value: 56.051151 (double type in DB)
I need to extract it. I tried several variants:
writeln(point[3].coerce!float);
writeln(point[3]
On Friday, 28 April 2017 at 16:01:58 UTC, yawniek wrote:
On Wednesday, 26 April 2017 at 17:06:52 UTC, krylon wrote:
I looked at the DUB package registry and asked Google quite a
bit now, but I did not found such a package for D. So my first
question is - did I not look hard enough? I found a
r
On Wednesday, 26 April 2017 at 17:06:52 UTC, krylon wrote:
I looked at the DUB package registry and asked Google quite a
bit now, but I did not found such a package for D. So my first
question is - did I not look hard enough? I found a
reimplentation of QDBM [1] (the spiritual ancestor of
Toky
C++ Function:
bool cppFunc( float[3] color );
D binding:
extern(C++) bool cppFunc( float[3] color );
Using with:
float[3] my_color;
cppFunc( my_color );
-> Error: Internal Compiler Error: unable to pass static array to
extern(C++) function.
Error: Use pointer instead.
Using with:
cppFunc( m
I am using https://github.com/mysql-d/mysql-native
It's return from DB variant data-type.
My DB include value: 56.051151 (double type in DB)
I need to extract it. I tried several variants:
writeln(point[3].coerce!float);
writeln(point[3].coerce!string);
writeln(point[3].coerce!double);
but all
On Thursday, 27 April 2017 at 20:20:23 UTC, Nierjerson wrote:
I think the main issue though, is that I really don't know what
is going on when I invoke the PS function. It seems to call the
server method that takes the interface and then the server does
it's "magic"(which is calling my QueryI
On Friday, 28 April 2017 at 05:21:26 UTC, ag0aep6g wrote:
Instead of removing `in`/`const` from the ref overload, you can
also add it to the non-ref overload. Again, the overloads will
have the same match level ("match with conversion to const"),
and the ref version will win.
It works. I do
27 matches
Mail list logo