Is there a reason for any C or C++ compiler to not define wctrans_t and wctype_t as the type wchar_t? -
actually, i'm working on comparison of data types between programming languages, , here problem when reading c , c++ standards.
quoted c11,
wctrans_ta scalar type can hold values represent locale-specific character mappings
wctype_ta scalar type can hold values represent locale-specific character classifications
the phrase a scalar type indicates c11 not restrict wctrans_t , wctype_t specific scalar type.
my gcc 4.8 of mingw implements wctrans_t , wctype_t typedef wchar_t, , can't think there reason other c compilers not define them is.
could proof otherwise, or give possibility happen?
i surprised defined them wchar_t, neither wctype_t nor wctrans_t have characters.
both platforms use define them else:
aix~$ grep wctype_t /usr/include/*h | grep typedef /usr/include/ctype.h: typedef unsigned int wctype_t; aix~$ grep wctrans_t /usr/include/*h | grep typedef /usr/include/wctype.h:typedef wint_t (*wctrans_t)(); solaris~$ grep wctype_t /usr/include/*h | grep typedef /usr/include/wchar.h:typedef int wctype_t; solaris~$ grep wctrans_t /usr/include/*/*h | grep typedef /usr/include/iso/wctype_iso.h:typedef unsigned int wctrans_t;
Comments
Post a Comment