On Wednesday, June 07, 2017 07:43:06 ag0aep6g via Digitalmars-d-learn wrote:
> You understand the spec to say that because `foo.capacity` is 15 at one
> point, you should then be able to put 15 elements into `foo` without
> relocation. And what `bar` does in the meantime shouldn't matter.
>
> I don
On 06/07/2017 12:12 AM, Ali Çehreli wrote:
On 06/06/2017 12:13 PM, Jesse Phillips wrote:
> On Monday, 5 June 2017 at 23:17:46 UTC, Ali Çehreli wrote:
>> auto a = [ 1, 2, 3, 4 ];
>> auto b = a;
[...]
The only issue remaining for me is the part that you've quoted:
Jesse Phillips did
On 06/06/2017 12:13 PM, Jesse Phillips wrote:
> On Monday, 5 June 2017 at 23:17:46 UTC, Ali Çehreli wrote:
>> auto a = [ 1, 2, 3, 4 ];
>> auto b = a;
>>
>> Both of those slices have non-zero capacity yet one of them will be
>> the lucky one to grab it. Such semantic issues make me unhappy.
On Monday, 5 June 2017 at 23:17:46 UTC, Ali Çehreli wrote:
auto a = [ 1, 2, 3, 4 ];
auto b = a;
Both of those slices have non-zero capacity yet one of them
will be the lucky one to grab it. Such semantic issues make me
unhappy. :-/
Ali
You have to remember that slices don't own the
Just import modules at local scopes. Here is something that works:
void displayinfo(T)(T v) {
import std.stdio : writefln;
writefln("%08x", v);
}
void foo() {
import std.meta : AliasSeq;
enum value = cast(ubyte[])x"33 3a 3f d4";
foreach (type; AliasSeq!(int, uint, byte)) {
On 06/06/2017 05:07 PM, Russel Winder via Digitalmars-d-learn wrote:
I hope I am just missing an option as everything seems to be there fore
this to work.
You are missing the `-shared-libphobos` option.
--
Mike Wey
On Monday, 5 June 2017 at 16:31:04 UTC, Anonymouse wrote:
I just sent a pre-compiled .exe of my project to a friend, and
his Avast anti-virus promptly quarantined it and sent it off
for analysis. I tried sending him a Hello World[1] with the
same results.
Is this something common for d progra
On Tuesday, June 06, 2017 15:00:50 Timoses via Digitalmars-d-learn wrote:
> Hey there,
>
> I'm wondering how I can use a template function within my mixin:
>
> ```
> ubyte[] value = x[33, 3a,3f, d4];
> foreach (type; TypeTuple!("int", "unsigned int",
> "byte"))
>
On Tuesday, 6 June 2017 at 15:00:50 UTC, Timoses wrote:
Hey there,
I'm wondering how I can use a template function within my mixin:
```
ubyte[] value = x[33, 3a,3f, d4];
foreach (type; TypeTuple!("int", "unsigned
int", "byte"))
{
using gdc (Debian 6.3.0-18) 6.3.0 20170516
I find:
gdc -I. -fPIC -c -o code.o code.d
gdc -o libanswer.so -shared code.o
leads to problems because the linker tries to link against:
/usr/lib/gcc/x86_64-linux-gnu/6/libgdruntime.a
instead of against one of:
/usr/lib/gcc/x86_64-linux-gnu/6/libgdru
Hey there,
I'm wondering how I can use a template function within my mixin:
```
ubyte[] value = x[33, 3a,3f, d4];
foreach (type; TypeTuple!("int", "unsigned int",
"byte"))
{
mixin(`if (value.length == type.sizeof)
11 matches
Mail list logo