On Aug 25, 2009, at 8:30 AM, Douglas Gregor wrote: >> >> Ok point taken. Here's another way to look at it: is it worthwhile >> (in terms of compile time) to check all uninstantiated templates? >> It would be better to only do these "heavier" semantic checks on >> inline functions and templates that are actually used in a >> translation unit rather than in every translation unit that they >> are parsed in. This applies equally well to C inline functions as >> it does to all the fun C++ stuff, it's just that C++ will suffer >> more if we don't do something like this. >> >> Thoughts? > > > I find these checks useful (as a programmer), as much in > uninstantiated templates and inline functions as anywhere else. > However, I suggest that we delay this discussion until we can > quantify the actual compile-time cost on, e.g., <algorithm>, > <numeric>, or <iostream>.
I don't disagree about either point. :) I'm just saying that one way to reduce the cost is to only check each inline function in translation units that use them. This doesn't help library authors, but does help application authors who (presumably) use every inline function at least once in their program. Deferring it is fine with me though :) -Chris _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
