template
struct NBits
{
enum { value = NBits<(n >> 1)>::value + 1 };
};
template<>
struct NBits<0>
{
enum { value = 0 };
};
Tuesday, September 29, 2009
How to count bits to save a number
Subscribe to:
Post Comments (Atom)
Powered by Blogger.
0 коммент.:
Post a Comment