On Friday, 28 August 2015 at 18:46:23 UTC, Oleg wrote:
I found solution. I call length instead of reserve. It calls
ensureInitialized and everything works fine. By default, Array
won't initialize store.
Oh, reserve calls it too. My mistake.
I found the problem, that's because I passed an empt
On Friday, 28 August 2015 at 18:40:33 UTC, John Colvin wrote:
On Friday, 28 August 2015 at 18:31:00 UTC, Oleg wrote:
On Friday, 28 August 2015 at 18:21:04 UTC, John Colvin wrote:
On Friday, 28 August 2015 at 17:45:21 UTC, Oleg wrote:
Hello!
Is it possible to get pointer to a data in
std.conta
On Friday, 28 August 2015 at 18:21:04 UTC, John Colvin wrote:
On Friday, 28 August 2015 at 17:45:21 UTC, Oleg wrote:
Hello!
Is it possible to get pointer to a data in std.container.Array
like .ptr from an array? I need to pass a pointer to some C
function (from DerelictGL3 binding) and avoid G
Hello!
Is it possible to get pointer to a data in std.container.Array
like .ptr from an array? I need to pass a pointer to some C
function (from DerelictGL3 binding) and avoid GC allocation.
Thank you!
On Monday, 12 January 2015 at 16:44:42 UTC, ketmar via
Digitalmars-d-learn wrote:
nope, it means exactly what is written there. except that
dynamic array
is represented by struct like this:
struct {
void *dataptr;
size_t itemCount;
}
this is what D calls "dynamic array", and this i
On Monday, 12 January 2015 at 15:59:43 UTC, Adam D. Ruppe wrote:
Why are you using ref? Take that off and you can pass any
array, including null, with ease.
Because dynamic arrays are passed by value to functions. Will it
make another copy of array, if I'll pass array by value?
Looks like it
Hello. How can I call a function with null as parameter, which I
don't want to set. For example:
void foo(ref int[] param1) {}
I can't call this function like:
foo(null);
Is it possible to set default value for an array parameter or
pass null/empty array? I can create empty array and pass it, bu
Is this behavior normal or it's bug?
[code]
import std.stdio;
class A
{
float func( float x )
in
{
assert( x > 0 );
stderr.writeln( "A.func in block" );
}
body
{
stderr.writeln( "A.func body block" );
return x / 3;
}
}
class B : A
{
struct FooPasted(Args...){}
class A
{
mixin foo;
void func1() @mark { ... }
void func2( int x, string a ) @mark { ... }
}
must change to:
class A
{
void func1() @mark { ... }
void func2( int x, string a ) @mark { ... }
FooPasted!() func1_mark;
FooPasted!(int,string) func2_mark;
}
I want to write mixin template, what past and/or change some code
in class. Mixin must get all functions with user defined
attribute and past fields for example. It should looks like this
struct FooPasted(Args...){}
class A
{
mixin foo;
void func1() @mark { ... }
void func2( int x, string a )
renaming struct from 'Client' to 'MClient' resolve question
the same result of building release or profile
When I build my program with release flag I get an errors, in
debug build all works
.dub/build/application-profile-linux.posix-x86_64-dmd-AD20DEA65FEE410217932549C1D262EF/ftree.o:
In function
`_D3des4flow5event5Event27__T6__ctorTS6client6ClientZ6__ctorMFNcmKxS6client6ClientZS3des4flow5event5Ev
Hello. I can't find siple way to realization this behavior:
[code]
class A
{
A parent;
void someFunc() const { }
void parentCall() const
{
const(A) cur = this;
while( cur )
{
cur.someFunc();
cur = cur.parent;
}
}
}
[/code]
error: cannot modify const
On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote:
void* NotUsedAtAll, // Null variable
int argc, // What?
char** results, // Results?
char** columnNames //Column Names?
You can read about this agruments on
http://www.sqlite.org/c3ref/exec.html
Hello.
I'm developing library and want to add an examples to the same
project. If I understand corecly, DUB allows to build a
dependencies from another folder and use them to build a program.
I've tried two ways - subConfigurations and subPackages. For
example, there is subConfigurations confi
16 matches
Mail list logo