mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-03 23:04:33 +02:00
new MPL docs
[SVN r26213]
This commit is contained in:
13
book/chapter1/binary.hpp
Executable file
13
book/chapter1/binary.hpp
Executable file
@@ -0,0 +1,13 @@
|
||||
|
||||
#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>
|
||||
{
|
||||
};
|
Reference in New Issue
Block a user