1 // 2 // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed 3 // under the Boost Software License, Version 1.0. (See accompanying 4 // file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 // 7 #include "boost/mpl/long.hpp" 8 #include "boost/mpl/alias.hpp" 9 10 template< long n > struct binary 11 : mpl::long_< ( binary< n / 10 >::value << 1 ) + n % 10 > 12 { 13 }; 14 15 template<> struct binary<0> 16 : mpl::long_<0> 17 { 18 }; 19