
14 Feb
2013
14 Feb
'13
4:07 p.m.
Thanks, but not for bitsN? Like:
template <typename T, class = void> struct get_num_bits;
template<class T> struct get_num_bits<T, typename enable_if_c<is_integral<T>::value && !is_class<T>::value>::type> : mpl::int_<sizeof(T) * 8> {};
I have added this.
And you could avoid all the const duplicates as:
template <typename T> struct get_num_bits<T const> : get_num_bits<T> {};
That doesn't work for when I add get_num_bits for integral types. I have uploaded the changes. Please have a look when you got a chance. Thanks for your help, Christian