On Wednesday, 15 May 2019 at 22:03:39 UTC, Ferhat Kurtulmuş wrote:
Hi,
Maybe I already know the answer, but have to be sure about
this. I am emulating this cpp code "int val = mat.at(row,
col)" like:
T at(T)(int row, int col){
static if (T.stringof == "float"){
return
On Wednesday, 15 May 2019 at 22:13:18 UTC, Jonathan M Davis wrote:
On Wednesday, May 15, 2019 4:03:39 PM MDT Ferhat Kurtulmuş via
Digitalmars- d-learn wrote:
[...]
If you really want to see what happens (for any piece of code),
then you can look at the generated assembly, but static if is
On Wednesday, May 15, 2019 4:03:39 PM MDT Ferhat Kurtulmuş via Digitalmars-
d-learn wrote:
> Hi,
>
> Maybe I already know the answer, but have to be sure about this.
> I am emulating this cpp code "int val = mat.at(row, col)"
> like:
>
> T at(T)(int row, int col){
> static if (T.stringof
Hi,
Maybe I already know the answer, but have to be sure about this.
I am emulating this cpp code "int val = mat.at(row, col)"
like:
T at(T)(int row, int col){
static if (T.stringof == "float"){
return getFloatAt(row, col);
} else static if (T.stringof ==
On Wednesday, 15 May 2019 at 13:19:36 UTC, drug wrote:
You can use predicate for this purpose:
```
auto rbt = redBlackTree!((a, b) => a.ID < b.ID, KeyController);
```
https://run.dlang.io/is/CNRTQf
Even better, thank you!
On Wednesday, 15 May 2019 at 13:15:50 UTC, Stefan Koch wrote:
Key controller cannot be compared by less
which is why it fails, give it an opCmp and it'll work.
Works fine, thank you! For some reason, I thought that this
template uses references:
```
enum KeyID: uint
{
KEY_A,
On Wednesday, 15 May 2019 at 13:08:18 UTC, Bogdan wrote:
I don't have any experience with using templates. Is it
possible to create a RB tree containing structs, where the
nodes are ordered by one struct member?
```
import std.stdio;
import std.container;
enum KeyID: uint
{
KEY_A,
On 15.05.2019 16:08, Bogdan wrote:
I don't have any experience with using templates. Is it possible to
create a RB tree containing structs, where the nodes are ordered by one
struct member?
```
import std.stdio;
import std.container;
enum KeyID: uint
{
KEY_A,
KEY_S,
KEY_D,
I don't have any experience with using templates. Is it possible
to create a RB tree containing structs, where the nodes are
ordered by one struct member?
```
import std.stdio;
import std.container;
enum KeyID: uint
{
KEY_A,
KEY_S,
KEY_D,
KEY_W
}
struct
A hack:
On Tue, 14 May 2019 19:44:01 +0200, Mike Wey wrote:
On 14-05-2019 05:10, Alex X wrote:
Any news on this?
https://forum.dlang.org/thread/bznpylcjostbrrwzh...@forum.dlang.org
It's severely cramping my style ;/
Unfortunately no.
// The following code bypasses GTK windows hooking
On 5/14/19 10:41 PM, Steven Schveighoffer wrote:
OK, now that I have a compiler developer agreeing, I feel more
comfortable filing ;)
https://issues.dlang.org/show_bug.cgi?id=19874
-Steve
On Tuesday, 14 May 2019 at 14:36:21 UTC, Q. Schroll wrote:
[snip]
I've filed a bug report [1] some time ago. I'm posting here,
because I want to understand what's going on here.
I read through this post and while I don't know precisely what
the compiler is thinking, it seems for me that your
12 matches
Mail list logo