500. do_length cannot be implemented correctly

Section: 25.4.1.5 [locale.codecvt.byname] Status: NAD Submitter: Krzysztof Żelechowski Opened: 2005-05-24 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [locale.codecvt.byname].

View all issues with NAD status.

Discussion:

  1. codecvt::do_length is of type int;
  2. it is assumed to be sort-of returning from_next - from of type ptrdiff_t;
  3. ptrdiff_t cannot be cast to an int without data loss.

Contradiction.

Proposed resolution: