
Daniel Wessl?n wrote:
Yes, I think it should be accepted. Thanks!
I think it should be applied to lexical_cast as previously suggested, and if it is already included with the distribution for that purpose then making it a public interface does little harm while making a useful feature easily accessible for others to use, who would otherwise probably not bother or think to implement it.
I'm going to post a suggestion about splitting lexical_cast into inlined public function and non-inline imlementation. Code size can be optimized even without applying integral_promotion.
- What is your evaluation of the documentation?
Minimal but sufficient. The examples could use some tweaking - "int const" is always used as the example of a type that isn't promoted, while none of the promoted types are cv-qualified. I would rather see a plain "int" as non-promoted and "short const" -> "int const". This to demonstrate that cv-qualifiers are kept and to take a way a possible first-glance impression that const inhibits promotion.
Good point. -- Alexander Nasonov