Hello, > It would be great if it suggested a fixit to change the cast to the > correct C++ cast or a combination of those (for example, static cast > of a const cast). Is it always possible to do this in a template?
§5.4p4 specifies which conversions a C-style cast (called "explicit type conversion" in the standard) can perform: | - a const_cast | - a static_cast | - a static_cast followed by a const_cast | - a reinterpret_cast | - a reinterpret_cast followed by a const_cast It also states: | If a conversion can be interpreted in more than one of the ways listed above, | the interpretation that appears first in the list is used As the list of possible conversions depends on the concrete type, I don't think it is possible to provide a fix-it when dealing with dependent types of a template (non-dependent types should be fine though). Jonathan _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
