[ 2009-10-28 Ganesh provides two possible resolutions and expresses a preference for the second: ]
Replace [char.traits.specializations.char16_t] para 3 with:
The member eof() shall return
an implementation-defined constant that cannot appear as a valid UTF-16 code unitUINT_LEAST16_MAX [Note: this value is guaranteed to be a permanently reserved UCS-2 code position if UINT_LEAST16_MAX == 0xFFFF and it's not a UCS-2 code position otherwise — end note].Replace [char.traits.specializations.char32_t] para 3 with:
The member eof() shall return
an implementation-defined constant that cannot appear as a Unicode code pointUINT_LEAST32_MAX [Note: this value is guaranteed to be a permanently reserved UCS-4 code position if UINT_LEAST32_MAX == 0xFFFFFFFF and it's not a UCS-4 code position otherwise — end note].In [char.traits.specializations.char16_t], in the definition of char_traits<char16_t> replace the definition of nested typedef int_type with:
namespace std { template<> struct char_traits<char16_t> { typedef char16_t char_type; typedefuint_least16_tuint_fast16_t int_type; ...Replace [char.traits.specializations.char16_t] para 3 with:
The member eof() shall return
an implementation-defined constant that cannot appear as a valid UTF-16 code unitUINT_FAST16_MAX [Note: this value is guaranteed to be a permanently reserved UCS-2 code position if UINT_FAST16_MAX == 0xFFFF and it's not a UCS-2 code position otherwise — end note].In [char.traits.specializations.char32_t], in the definition of char_traits<char32_t> replace the definition of nested typedef int_type with:
namespace std { template<> struct char_traits<char32_t> { typedef char32_t char_type; typedefuint_least32_tuint_fast32_t int_type; ...Replace [char.traits.specializations.char32_t] para 3 with:
The member eof() shall return
an implementation-defined constant that cannot appear as a Unicode code pointUINT_FAST32_MAX [Note: this value is guaranteed to be a permanently reserved UCS-4 code position if UINT_FAST32_MAX == 0xFFFFFFFF and it's not a UCS-4 code position otherwise — end note].