Boost logo

Boost :

Subject: Re: [boost] [gil] ToolBox uploaded
From: TONGARI (tongari95_at_[hidden])
Date: 2013-02-14 11:46:39


2013/2/15 Christian Henning <chhenning_at_[hidden]>

> >
> > 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk