Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Swift: Madness of Generic Integer. Parent comment
template<typename T> typename std::enable_if<std::is_trivial<T>::value, T>::type getValue(std::array<char, sizeof(T)> bytes) { T toret; std::memcpy(&toret, bytes.data(), sizeof(toret)); return toret; }
btw, was your usage of trivial a pun? if so, that's amazing. we need more type traits puns.
There are no comments on this comment yet.
btw, was your usage of trivial a pun? if so, that's amazing. we need more type traits puns.