当前位置:网站首页>D compile time count
D compile time count
2022-06-30 22:31:00 【fqbqrr】
enum counter(size_t x = [__traits(allMembers, mixin(__MODULE__))].length)=x;
char[] member(ulong x)
{
char[] buf = "void[0] _X0000000000000000;".dup;
enum mapping = "0123456789abcdef";
foreach_reverse(i; buf.length-17 .. buf.length-1)
{
buf[i] = mapping[x & 0xf];
x >>= 4;
}
return buf;
}
mixin template increment()
{
mixin(member(counter!()));
}
pragma(msg, counter!());
mixin increment;
pragma(msg, counter!());
mixin increment;
pragma(msg, counter!());
perhaps : Generate symbols :
enum gensym = q{
"_gensym" ~ __traits(identifier, {
})["__lambda".length .. $]};
// adopt λ To count .
// The same line , Work, too .
pragma(msg, mixin(gensym)); pragma(msg, mixin(gensym));
static this I can also help you .
边栏推荐
- Which direction should college students choose to find jobs after graduation?
- 项目管理到底管的是什么?
- 手机上怎么开股票账户?另外,手机开户安全么?
- A new one from Ali 25K came to the Department, which showed me what the ceiling is
- Summary of interesting websites
- latex字母头顶两个点
- Online education program user login and registration
- In depth analysis of Apache bookkeeper series: Part 4 - back pressure
- Is machine learning suitable for girls?
- 10 airbags are equipped as standard, and Chery arizer 8 has no dead corner for safety protection
猜你喜欢
![[introduction to MySQL] the first conversation · first time in the](/img/73/cc85eb469384c3df94479318293c6f.png)
[introduction to MySQL] the first conversation · first time in the "database" Mainland

远程办公期间,项目小组微信群打卡 | 社区征文

深入解析 Apache BookKeeper 系列:第四篇—背压
![[BSP video tutorial] BSP video tutorial issue 19: AES encryption practice of single chip bootloader, including all open source codes of upper and lower computers (June 26, 2022)](/img/ce/9ec74c4c26513e2479df29a1802168.png)
[BSP video tutorial] BSP video tutorial issue 19: AES encryption practice of single chip bootloader, including all open source codes of upper and lower computers (June 26, 2022)

MIT博士论文 | 优化理论与机器学习实践

In depth analysis of Apache bookkeeper series: Part 4 - back pressure

latex字母头顶两个点

Redis的缓存穿透、缓存击穿和缓存雪崩

Tencent has been conducting advanced automated functional testing for 3 years. It is a gift to you who are confused in manual testing
![[micro service ~nacos] configuration center of Nacos](/img/c3/9d8fb0fd49a0ebab43ed604f9bd1cc.png)
[micro service ~nacos] configuration center of Nacos
随机推荐
基于kubernetes平台微服务的部署
Technical principle of decentralized exchange system development - digital currency decentralized exchange system development (illustrative case)
牛逼|珍藏多年的工具让我实现了带薪摸鱼自由
"More Ford, more China" saw through the clouds, and the orders of Changan Ford's flagship products exceeded 10000
总结的一些内存问题
Nansen复盘加密巨头自救:如何阻止百亿多米诺倾塌
On several key issues of digital transformation
B_ QuRT_ User_ Guide(34)
Meet the streamnational | yangzike: what made me give up Dachang offer
Coredns modifying upstream
Cas classique multithreadé
《安富莱嵌入式周报》第270期:2022.06.13--2022.06.19
部门新来了个阿里25K出来的,让我见识到了什么是天花板
Store Nagios monitoring information into MySQL
腾讯3年,功能测试进阶自动化测试,送给在手工测试中迷茫的你
How to use data sets in machine learning?
MFC interface library bcgcontrolbar v33.0 - desktop alarm window, grid control upgrade, etc
Error reporting: internal error XFS_ WANT_ CORRUPTED_ GOTO at line 1635 of file fs/xfs/libxfs/xfs_ alloc. c.
深入解析 Apache BookKeeper 系列:第四篇—背压
AtCoder Beginner Contest 255