Lancern's Treasure Chest
16:49 · Aug 28, 2021 · Sat
Lancern's Treasure Chest
Compile-time Prime Numbers Table! 请各位 ACM 卡常选手务必掌握。
https://godbolt.org/z/Msb73T99n
godbolt.org
Compiler Explorer - C++ (x86-64 clang (trunk))
template <typename T>
constexpr T *allocate(size_t n) {
return std::allocator<T>().allocate(n);
}
template <typename T>
constexpr void deallocate(T *ptr, size_t n) {
std::allocator<T>().deallocate(ptr, n);
}
template <typename T>
class constexpr_vector…
Home
Powered by
BroadcastChannel
&
Sepia