Why no short overloads for std::to_string? Why no noexcept?

c++, c++11

Solution

Exceptions: there's no `noexcept` constructor for `std::string`, so that's just not possible (i.e. the string memory allocation may fail).

Shorts: All integral types that are default-promoted are missing; I suppose there'd just be nothing to be gained from supporting them. By contrast, the longer types may be more expensive, so `int` should be offered for the space conscious.

Problem

Does anybody know why the various `to_string` functions declared in section 21.5 of the C++11 standard lack overloads for short and unsigned short? How about why these functions are not declared `noexcept`? This is the full set of overloads: ``` string to_string(int val); string to_string(unsigned val); string to_string(long val); string to_string(unsigned long val); string to_string(long long val); string to_string(unsigned long long val); string to_string(float val); string to_string(double val); string to_string(long double val); ``` I looked at the the proposals that led to these functions being adopted (N1803, N1982, N2408), but none of them have any motivation or rationale. If I'm violating protocol by putting two (rather related, IMO) questions in a single post, I apologize. I'm still new at SO.

Original source