mirror of
https://github.com/boostorg/mpl.git
synced 2026-05-03 19:31:02 +02:00
14 lines
217 B
C++
14 lines
217 B
C++
|
|
|
||
|
|
#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>
|
||
|
|
{
|
||
|
|
};
|