Files
mpl/book/chapter1/binary.hpp
T

14 lines
217 B
C++
Raw Normal View History

2004-11-28 03:35:12 +00:00
#include "boost/mpl/long.hpp"
#include "boost/mpl/alias.hpp"
template< long n > struct binary
: mpl::long_< ( binary< n / 10 >::value << 1 ) + n % 10 >
{
};
template<> struct binary<0>
: mpl::long_<0>
{
};