To: J3 J3/25-204r2 From: generics Subject: Consolidated edits for Templates Date: 2025-November-11 References: 25-135r2, 25-136r2, 25-172r1, 25-173r1, 25-174r2, 25-175r5 Introduction ============ This paper combines 6 previously passed edits papers for templates: - 25-135r2 Templates - 25-136r2 Deferred arguments - 25-172r1 Instantiation - 25-173r1 Requirement and Require - 25-174r2 Consistency of deferred arguments - 25-175r5 miscellaneous edits to other sections This paper divides the edits into 2 sections. Section 1 comprises the first 5 papers above and are meant to be a contiguous new section (or clause). Section 2 contains miscellaneous edits to other sections. Changes from R0: - Fix wording of Ctt05 - Make constraint forbidding templates from instantiating themselves more clear - Add example in tt.5.3 - Fix example in NOTE 2 of tt.5.4 (missing import statements) - Add additional explanation to commentary about Ctt61. - Some other minor grammatical fixes - Make non-optional for templated procedures - Remove DEFERRED keyword from item that was not intended to be deferred in NOTE 2 of tt.4.1.3 - Improve comments in tt.8.2.2 NOTE 2 examples 1. Primary Edits ================ {-------- paper 25-135r2 -----------} * Insert the following text as a new clause. tt Type-safe generic programming with templates tt.1 The TEMPLATE construct tt.1.1 Syntax for the TEMPLATE construct A template contains declarations, specifications, and definitions that are parameterized by deferred arguments. Instantiation of a template creates entities based on the definitions in the template, and those with public identifiers are made accessible to the scoping unit in which the instantiation appears. Rtt10