
14 Feb
2013
14 Feb
'13
4:46 p.m.
2013/2/15 Christian Henning <chhenning@gmail.com>
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 suppose that add !is_const<T>::value into enable_if for integral types would help. But since you're done, it does't matter how it worked -- it just works :) Thanks