Hi Christian,
On Mon, Aug 16, 2010 at 8:49 AM, Christian Henning
Hi there, I cannot understand why the code below gives me a static assertion. As far as I know I use a very common technique to to extract a type from templated class using specialization over this class.
I was surprised that this didn't work as well. After some investigation, I found that adding a 'const' to the specialization worked for me:
template< typename BitField, typename ChannelBitSizes, typename Layout, bool IsMutable > struct bit_field_type* change here*/ const bit_aligned_pixel_reference< BitField , ChannelBitSizes , Layout , IsMutable > > { typedef BitField type; };
It wasn't working because the unspecialized bit_field_type was getting instantiated instead. HTH, Nate