上一页 1 ··· 102 103 104 105 106 107 108 109 110 ··· 259 下一页
摘要: 必须设定函数为静,所有参数为共享.不允许tls. import std.concurrency; import core.thread; import std.stdio:writeln; void main() { Test.getInstance.run; } class Test { priv 阅读全文
posted @ 2021-12-29 09:58 zjh6 阅读(19) 评论(0) 推荐(0)
摘要: 如(总大小(小)>8)中 假; 如(均大小<4,2>(小))中 假;//汉字1个算2 中 真; 我代码是对了的,可是就是反反复复生不成正确结果. 对,说的就是微软的Cl编译器. 阅读全文
posted @ 2021-12-28 18:16 zjh6 阅读(19) 评论(0) 推荐(0)
摘要: enum instantiate(string type, string expr) = type ~ "(" ~ expr ~ ")"; pragma(msg, instantiate!("RVector!(SEXPTYPE.REALSXP)", "x")); 阅读全文
posted @ 2021-12-28 10:31 zjh6 阅读(15) 评论(0) 推荐(0)
摘要: escape应翻译为逃逸.而不是转义. 阅读全文
posted @ 2021-12-23 20:29 zjh6 阅读(129) 评论(0) 推荐(0)
摘要: 原文 该问题的修复避免了通过返回值转义,但有个已知限制:即使不能通过参数/或返回值转义,仍可放纯函数参数进异常并抛出: void f_throw(string x) @safe pure { throw new Exception(x);//参数进异常,逃逸. } void escape_throw 阅读全文
posted @ 2021-12-23 20:29 zjh6 阅读(11) 评论(0) 推荐(0)
摘要: 原文 Mike Parker: 除非C11改变了嵌套初化规则,应可编译.可显式嵌套: stb_easy_font_color c = { {255,255,255,255} }; 如未提交相应问题,请报告. "标签"是跟在构或联关键字后名: struct Foo {}; 这里,Foo是标签.必须按s 阅读全文
posted @ 2021-12-23 10:15 zjh6 阅读(15) 评论(0) 推荐(0)
摘要: 原文 import std; void main() { static foreach(Foo; ["Abc", "def"]) {{ string str = Foo; writeln("Hello D ", str, __VERSION__); }} } //输出 Hello D Abc2098 阅读全文
posted @ 2021-12-23 09:55 zjh6 阅读(565) 评论(0) 推荐(0)
摘要: name "dj" description "no" authors "Ste" license "mit" buildType "release" targetType "library" sourcePaths "dcollections" dub.sdl瞬间编译好了. 阅读全文
posted @ 2021-12-22 09:43 zjh6 阅读(14) 评论(0) 推荐(0)
摘要: import std.stdio; //this print args in reverse order: void print(T...)(string prompt, T args) { void print_arg(size_t index){ switch(index){ static fo 阅读全文
posted @ 2021-12-21 22:33 zjh6 阅读(13) 评论(0) 推荐(0)
摘要: 原文 -vasm选项,给dmd加了个为每个函数显示生成汇编代码的基于数字火星反汇编程序的内置反汇编器. 为什么? Godbolt要你准备小示例代码来上传.很麻烦. obj2asm工作,但打印出了目标文件中所有内容,信息太多.工作量很大. 让用户很易查看函数生成代码,鼓励它熟悉自己构造了啥代码.使用户 阅读全文
posted @ 2021-12-21 22:16 zjh6 阅读(22) 评论(0) 推荐(0)
上一页 1 ··· 102 103 104 105 106 107 108 109 110 ··· 259 下一页