debugging and resolving these?
-Øivind
On Sunday, 10 January 2016 at 17:50:44 UTC, Vlad Leberstein wrote:
As I'm not very good at D, I would like to get some feedback
about this solutions' viability. AFAIU memcpy-ing struct here
is safe because all target arguments ever passed to tryPutting
are internal to implementation(and
On Saturday, 27 February 2016 at 04:35:41 UTC, Adam D. Ruppe
wrote:
It just isn't implemented in the compiler. Instead, you can
declare it outside and set it in a static module constructor:
That was quick! Thank you.
Should I file a ticket for this?
Shouldn't this work? According to "Static Initialization of AAs"
on this page, it should: https://dlang.org/spec/hash-map.html
enum DevicePropDataType {
dString,
dDateTime
}
enum DevicePropValType {
property,
miscDate
}
immutable DevicePropDataType[DevicePropValType] propDType =
[
Hi,
Why doesn't this work? Seems like it should:
enum {
A = 1,
version(xx) {
B = 2
}
}
void main() {
}
Compilation output:
/d732/f174.d(5): Error: basic type expected, not version
/d732/f174.d(5): Error: no identifier for declarator int
I am trying to figure out how to change the value of an element
in a BinaryHeap (from std.container) and have it repositioned
such that the heap is still valid.
Can anyone help me with this? The approach I would have taken (I
think) is to remove the elements that get new values from the
How can I achieve something like the following? I want to create
a class B that has all the interfaces of the class passed as a
template parameter.
import std.trats;
interface I0 {}
interface I1 {}
class A : I0, I1 {}
class B!C : InterfacesTuple!C {}
void main() {
B!A a;
}
On Wednesday, 25 December 2013 at 07:45:37 UTC, Øivind wrote:
How can I achieve something like the following? I want to
create a class B that has all the interfaces of the class
passed as a template parameter.
import std.trats;
interface I0 {}
interface I1 {}
class A : I0, I1 {}
class B!C
On Wednesday, 25 December 2013 at 07:49:35 UTC, Jakob Ovrum wrote:
On Wednesday, 25 December 2013 at 07:45:37 UTC, Øivind wrote:
class B!C : InterfacesTuple!C {}
You probably meant:
class B(C) : InterfacesTuple!C {}
Yes, stupid typo. Thanks for the quick answer. Awesome that this
works :)
On Thursday, 20 September 2012 at 00:23:33 UTC, Jonathan M Davis
wrote:
On Wednesday, September 19, 2012 22:25:46 Øivind wrote:
I am struggeling to get around the cycle detection kicking in
when I have static init in modules that depend on eachother.
I have seen some threads on 'fixes
!().getName(this M) cannot deduce
template function from argument types !()()
If not possible, just getting the name of the enclosing struct
would help a lot!
-Øivind
Thanks a lot both of you. The code below worked. I did not expect
'this' to be available in the static function, but of course the
type of 'this' is available.
mixin template MsgMixin(T ...) {
shared static this() {
import std.stdio;
writeln(register ~
it be possible in e.g. main() to get a list of all
compiled-in modules, and then iterate over them and call an init
function where it exists? As long as there is a way to list the
name of the modules at compile-time, this should be pretty easy..?
-Øivind
On Wednesday, 19 September 2012 at 20:56:17 UTC, Simen Kjaeraas
wrote:
On Wed, 19 Sep 2012 22:25:46 +0200, Øivind
oivind@gmail.com wrote:
I am struggeling to get around the cycle detection kicking in
when I have static init in modules that depend on eachother.
I have seen some threads
Another way of approaching this would be if I could feed a list
of modules into DMD during compile time. In C++, i would be
able to do this by passing a define to g++ on the command line
when invoking it. Is it possible to do something similar with
DMD? E.g. create a list of modules before
When building my program by compiling .o files first and then
linking, everything links fine, but when I try to compile all the
source files at once, I get the following link error:
build/debug/dboss-debug.o: In function `@property
boss.proc.proccmd.ProcCmd.Cmd[immutable(char)[]]
Given e.g. a function template
void f(T ...)(T t) {
writeln(t.length);
}
How can I call this function with an already-constructed tuple
but pass the pule as an expressiontuple?
auto v = tuple(1, 2, 3);
f(v);
In the case above, f will print 1 because 1 tuple is given to the
function, but
On Tuesday, 7 August 2012 at 16:11:05 UTC, Andrej Mitrovic wrote:
On 8/7/12, Øivind oivind@gmail.com wrote:
How can I call this function with an already-constructed tuple
but pass the pule as an expressiontuple?
auto v = tuple(1, 2, 3);
f(v);
Use the .expand property:
f(v.expand)
Works
18 matches
Mail list logo