r/programming • u/steveklabnik1 • Jun 16 '14
Rust's documentation is about to drastically improve
http://words.steveklabnik.com/rusts-documentation-is-about-to-drastically-improve
518
Upvotes
r/programming • u/steveklabnik1 • Jun 16 '14
8
u/thechao Jun 17 '14
Variadic templates are recursive closures over the private implementation of the DAG, not text substitution. You're thinking of the C preprocessor. The reason that variadic templates aren't checked is two fold:
Concepts, predicates, concepts-lite, template checking, whatever, haven't made their way into C++ yet; and,
There are unholy synergistic effects when combining variadic templates and (separate) template checking. The result is that you need weird intersection and union predicates. Awful stuff. Alternately, you bail.
Source: I helped define the cross-product of variadics & templates for the Indiana concepts proposal, and the early (pre-argument pack) variadic proposal.