摘要: declval作用:返回模板参数类型的右值引用 decltype作用:起别名 #include <utility> using namespace std; class A{}; class B{ public: A m; } decltype(declval<B>().m) n1; 阅读全文
posted @ 2021-08-02 21:15 Acception 阅读(127) 评论(0) 推荐(0)
摘要: 常用: using T = typename remove_reference<decltype(*declval<it>())>::type; template <typename T> class remove_reference { public: typedef T type; }; tem 阅读全文
posted @ 2021-08-02 02:32 Acception 阅读(45) 评论(0) 推荐(0)
摘要: int __builtin_clz(unsigned long long int a){ int res=0; while(!(a&0x80000000)){///0x80000000 = 1ll<<31 res++; a<<=1; } return res; } 阅读全文
posted @ 2021-08-02 02:02 Acception 阅读(240) 评论(0) 推荐(0)
摘要: A. Gregor and Cryptography 构造... #include <bits/stdc++.h> #define all(a) a.begin(),a.end() #define pb push_back using namespace std; using ll = long l 阅读全文
posted @ 2021-08-02 01:51 Acception 阅读(32) 评论(0) 推荐(0)