首页>
外国专利>
Sequencing and error detection of template instantiations during compilation of C++ Programs
Sequencing and error detection of template instantiations during compilation of C++ Programs
展开▼
机译:C ++程序编译过程中模板实例化的排序和错误检测
展开▼
页面导航
摘要
著录项
相似文献
摘要
A priority queue is used to sequence template instantiations in compiling C++ programs. If the analysis of a C++ code fragment encounters a name that requires full instantiation and no matching full instantiation exists, the parse is terminated and rescheduled, and a full instantiation is scheduled as an antecedent of the failed parse. "Antecedent" means that the failed parse code fragment will not be reparsed until after the full instantiation has succeeded. Only when the full instantiation has succeeded will the terminated parse be reconsidered. Parsing full instantiations may cause additional full instantiations. These are handled in the same manner; the additional instantiation is scheduled, and the current parse is failed and rescheduled. At the time of scheduling, the antecedent instantiation is marked with its dependent, so that the dependent chain give the chronology of the instantiation. This makes it easy to generate historical or "traceback" information for meaningful error messages.
展开▼