摘要:
#define assert_static(e) do{ enum{ assert_static__ = 1 / (e) }; } while(0)template<typename T, typename U>int bit_copy(T& a, U& b) { assert_static(siz 阅读全文
posted @ 2020-06-30 17:20
zJanly
阅读(186)
评论(0)
推荐(0)
摘要:
int m=9;struct C{ int f() const{ return ++e; }private: mutable int e; static int d;};int C::d = 2;int main(int argc, char *argv[]){ int c = 4; std::co 阅读全文
posted @ 2020-06-30 16:47
zJanly
阅读(334)
评论(0)
推荐(0)
摘要:
https://www.jianshu.com/p/8df45004bbcb #include <stdio.h>#include <pthread.h>#include <unistd.h>thread_local int a = 0;void* f(void *){ static int i=1 阅读全文
posted @ 2020-06-30 15:30
zJanly
阅读(175)
评论(0)
推荐(0)
摘要:
https://en.cppreference.com/w/ The zero-overhead principle is a C++ design principle that states: You don't pay for what you don't use. What you do us 阅读全文
posted @ 2020-06-30 13:46
zJanly
阅读(154)
评论(0)
推荐(0)

浙公网安备 33010602011771号