Prev: Detecting a static member variable
Next: How to obtain a typedef for the unsigned version of a signed character type
From: JohnW on 7 Mar 2010 05:01 I want to obtain a typedef for the unsigned version of a signed character type. The example below demonstrates the problem, I have a typedef for a signed character type but don't know how to obtain the corresponding unsigned type. template< class string_t > struct Example { typedef typename string_t::value_type char_t; typedef unsigned char_t uchar_t; // doesn't compile // ... }; Thanks John W -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |